Uncheck 'Report to Archives' and disable details field by default. #1745

This commit is contained in:
ccd0 2018-09-19 15:28:05 -07:00
parent 2409834dc3
commit 31d6a0aa31
2 changed files with 5 additions and 3 deletions

View File

@ -40,6 +40,9 @@ Report =
reason = $ '#archive-report-reason', fieldset
submit = $ '#archive-report-submit', fieldset
$.on enabled, 'change', ->
reason.disabled = !@checked
if form and types
fieldset.hidden = !$('[value="31"]', types).checked
$.on types, 'change', (e) ->
@ -54,7 +57,6 @@ Report =
@action = '#archiveresults=' + encodeURIComponent JSON.stringify results
@submit()
else if message
enabled.checked = false
fieldset.hidden = /Report submitted!/.test(message.textContent)
$.on enabled, 'change', ->
submit.hidden = !@checked

View File

@ -1,4 +1,4 @@
<legend><label><input id="archive-report-enabled" type="checkbox" checked>Report illegal content to archives</label></legend>
<legend><label><input id="archive-report-enabled" type="checkbox">Report illegal content to archives</label></legend>
<label for="archive-report-reason">Details</label>
<textarea id="archive-report-reason">Illegal content</textarea>
<textarea id="archive-report-reason" disabled>Illegal content</textarea>
<button id="archive-report-submit" hidden>Submit</button>