Issue:
The checkbox only appears if the template exists on a page with either value of 0 or 1.
Steps to reproduce:
- Create a template "testbool"
- Add the following to the template:
<noinclude><templatedata> { "params": { "p1": { "type": "boolean" } } } </templatedata></noinclude> test {{{p1}}}
- Go to test page
- Click insert template
- Insert "testbool"
- Add p1
Expected
A checkbox to select or deselect (or unset) a true / false parameter.
Actual
The interface presents a blank text box.
Proposed solution
- Always show the checkbox with false as the default, and unset it (e.g.{{testbool}}) when the user
- removes the parameter from the insert dialog
Alternate solutions
- Add a new toggleswitch with the three states (on, off, unset (e.g. {{testbool|p1=}} or {{testbool}}) , e.g. http://www.jqueryscript.net/demo/jQuery-Plugin-For-Tri-state-Toggle-Switch-Candlestick/
Notes: It was initially quite confusing that the value 1 or 0 must be set to see the checkbox. It took me quite a while to figure that out. Even setting the parameter default as 1 doesn't make the checkbox initially appear.