Skip to content

Commit

Permalink
#8818 fix default checkbox checked value issue on anon config modal
Browse files Browse the repository at this point in the history
  • Loading branch information
webplusai committed Dec 17, 2024
1 parent 67232aa commit 96a9acc
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions plugins/tiddlywiki/multiwikiserver/templates/anon-config-modal.tid
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,22 @@ class: mws-modal
<form class="mws-anon-config-form" method="POST" action="/admin/post-anon-config">
<div class="mws-modal-section">
<$set name="isChecked" value={{{ [[$:/config/MultiWikiServer/AllowAnonymousReads]get[text]] }}}>
<input type="checkbox" name="allowReads" checked=<<isChecked>>/> Allow anonymous reads
<$list filter="[<isChecked>match[yes]]">
<input type="checkbox" name="allowReads" checked/> Allow anonymous reads
</$list>
<$list filter="[<isChecked>!match[yes]]">
<input type="checkbox" name="allowReads"/> Allow anonymous reads
</$list>
</$set>
</div>
<div class="mws-modal-section">
<$set name="isChecked" value={{{ [[$:/config/MultiWikiServer/AllowAnonymousWrites]get[text]] }}}>
<input type="checkbox" name="allowWrites" checked=<<isChecked>>/> Allow anonymous writes
<$list filter="[<isChecked>match[yes]]">
<input type="checkbox" name="allowWrites" checked/> Allow anonymous writes
</$list>
<$list filter="[<isChecked>!match[yes]]">
<input type="checkbox" name="allowWrites"/> Allow anonymous writes
</$list>
</$set>
</div>
<div class="mws-modal-buttons">
Expand Down

0 comments on commit 96a9acc

Please sign in to comment.