From 317091533e1206a438a2f217aed98d72c83ce576 Mon Sep 17 00:00:00 2001
From: Aaron LI <aaronly.me@outlook.com>
Date: Fri, 11 Nov 2016 23:27:41 +0800
Subject: webui: configs.html: Set single checkbox with "data-type" of
 "boolean"

For simplicity, a single checkbox is used to control the boolean
configuration.  For better manipulations of its value, a custom data
"data-type=boolean" is attached to such checkbox.
---
 fg21sim/webui/templates/configs.html | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

(limited to 'fg21sim/webui/templates')

diff --git a/fg21sim/webui/templates/configs.html b/fg21sim/webui/templates/configs.html
index f1bb640..2d728f6 100644
--- a/fg21sim/webui/templates/configs.html
+++ b/fg21sim/webui/templates/configs.html
@@ -171,25 +171,25 @@
       </div>
       <div class="row">
         <div class="column form-group">
-          <input class="form-control" type="checkbox" id="conf-output-use-float" name="output/use_float" value="true" checked />
+          <input class="form-control" type="checkbox" id="conf-output-use-float" name="output/use_float" value="true" data-type="boolean" checked />
           <label for="conf-output-use-float">Use single-precision float instead of double</label>
         </div>
       </div>
       <div class="row">
         <div class="column form-group">
-          <input class="form-control" type="checkbox" id="conf-output-checksum" name="output/checksum" value="true" />
+          <input class="form-control" type="checkbox" id="conf-output-checksum" name="output/checksum" value="true" data-type="boolean" />
           <label for="conf-output-checksum">Calculate the checksum for output files</label>
         </div>
       </div>
       <div class="row">
         <div class="column form-group">
-          <input class="form-control" type="checkbox" id="conf-output-clobber" name="output/clobber" value="true" />
+          <input class="form-control" type="checkbox" id="conf-output-clobber" name="output/clobber" value="true" data-type="boolean" />
           <label for="conf-output-clobber">Overwrite existing files</label>
         </div>
       </div>
       <div class="row">
         <div class="column form-group">
-          <input class="form-control" type="checkbox" id="conf-output-combine" name="output/combine" value="true" />
+          <input class="form-control" type="checkbox" id="conf-output-combine" name="output/combine" value="true" data-type="boolean" />
           <label for="conf-output-combine">Add all components and save the combined maps</label>
         </div>
       </div>
@@ -272,7 +272,7 @@
             <input class="form-control code" type="text" id="conf-logging-logfile" name="logging/filename" />
           </div>
           <div class="form-group">
-            <input class="form-control" type="checkbox" id="conf-logging-logfile-append" name="logging/appendmode" value="true" checked />
+            <input class="form-control" type="checkbox" id="conf-logging-logfile-append" name="logging/appendmode" value="true" data-type="boolean" checked />
             <label for="conf-logging-logfile-append">Append mode</label>
           </div>
         </div>
@@ -309,13 +309,13 @@
         </div>
         <div class="row">
           <div class="column form-group">
-            <input class="form-control" type="checkbox" id="conf-g-synchrotron-smallscales" name="galactic/synchrotron/add_smallscales" value="true" checked />
+            <input class="form-control" type="checkbox" id="conf-g-synchrotron-smallscales" name="galactic/synchrotron/add_smallscales" value="true" data-type="boolean" checked />
             <label for="conf-g-synchrotron-smallscales">Add fluctuations on the small scales based on the angular power spectrum</label>
           </div>
         </div>
         <div class="row">
           <div class="column form-group">
-            <input class="form-control" type="checkbox" id="conf-g-synchrotron-save" name="galactic/synchrotron/save" value="true" checked />
+            <input class="form-control" type="checkbox" id="conf-g-synchrotron-save" name="galactic/synchrotron/save" value="true" data-type="boolean" checked />
             <label for="conf-g-synchrotron-save">Save this component standalone</label>
           </div>
         </div>
@@ -358,7 +358,7 @@
         </div>
         <div class="row">
           <div class="column form-group">
-            <input class="form-control" type="checkbox" id="conf-g-freefree-save" name="galactic/freefree/save" value="true" checked />
+            <input class="form-control" type="checkbox" id="conf-g-freefree-save" name="galactic/freefree/save" value="true" data-type="boolean" checked />
             <label for="conf-g-freefree-save">Save this component standalone</label>
           </div>
         </div>
@@ -397,7 +397,7 @@
         </div>
         <div class="row">
           <div class="column form-group">
-            <input class="form-control" type="checkbox" id="conf-g-snr-save" name="galactic/snr/save" value="true" checked />
+            <input class="form-control" type="checkbox" id="conf-g-snr-save" name="galactic/snr/save" value="true" data-type="boolean" checked />
             <label for="conf-g-snr-save">Save this component standalone</label>
           </div>
         </div>
@@ -448,7 +448,7 @@
         </div>
         <div class="row">
           <div class="column form-group">
-            <input class="form-control" type="checkbox" id="conf-eg-clusters-save" name="extragalactic/clusters/save" value="true" checked />
+            <input class="form-control" type="checkbox" id="conf-eg-clusters-save" name="extragalactic/clusters/save" value="true" data-type="boolean" checked />
             <label for="conf-eg-clusters-save">Save this component standalone</label>
           </div>
         </div>
-- 
cgit v1.2.2