]> git.mxchange.org Git - friendica.git/commitdiff
Improve field_checkbox.tpl
authorHypolite Petovan <ben.lort@gmail.com>
Sun, 2 Oct 2016 19:21:20 +0000 (15:21 -0400)
committerHypolite Petovan <ben.lort@gmail.com>
Sun, 2 Oct 2016 19:21:20 +0000 (15:21 -0400)
- Adds a hidden field to ensure the checkbox item will have a value
during save.
- Fix quotes for HTML attribute values

view/templates/field_checkbox.tpl
view/theme/decaf-mobile/templates/field_checkbox.tpl
view/theme/frio/templates/field_checkbox.tpl
view/theme/frost-mobile/templates/field_checkbox.tpl

index 06796376b60a5f4d52f2c94de7f1d5cbe1f77f1c..3d4a4284b6b6859001d77250b315fecdd032a70d 100644 (file)
@@ -1,5 +1,6 @@
-       <div class='field checkbox' id='div_id_{{$field.0}}'>
-               <label for='id_{{$field.0}}'>{{$field.1}}</label>
-               <input type="checkbox" name='{{$field.0}}' id='id_{{$field.0}}' aria-describedby='{{$field.0}}_tip' value="1" {{if $field.2}}checked="checked"{{/if}}>
-               <span class='field_help' role='tooltip' id='{{$field.0}}_tip'>{{$field.3}}</span>
+       <div class="field checkbox" id="div_id_{{$field.0}}">
+               <label for="id_{{$field.0}}">{{$field.1}}</label>
+               <input type="hidden" name="{{$field.0}}" value="0">
+               <input type="checkbox" name="{{$field.0}}" id="id_{{$field.0}}" aria-describedby="{{$field.0}}_tip" value="1" {{if $field.2}}checked="checked"{{/if}}>
+               <span class="field_help" role="tooltip" id="{{$field.0}}_tip">{{$field.3}}</span>
        </div>
index ddcc05aa5148cd813324ada7f1993dbc13aebcbb..4f094e089345bb2c68b75bd8049c596098781505 100644 (file)
@@ -1,7 +1,8 @@
 
-       
-       <div class='field checkbox' id='div_id_{{$field.0}}'>
-               <label id='label_id_{{$field.0}}' for='id_{{$field.0}}'>{{$field.1}}</label>
-               <input type="checkbox" name='{{$field.0}}' id='id_{{$field.0}}' value="1" {{if $field.2}}checked="checked"{{/if}}><br />
-               <span class='field_help' id='help_id_{{$field.0}}'>{{$field.3}}</span>
+
+       <div class="field checkbox" id="div_id_{{$field.0}}">
+               <label id="label_id_{{$field.0}}" for="id_{{$field.0}}">{{$field.1}}</label>
+               <input type="hidden" name="{{$field.0}}" value="0">
+               <input type="checkbox" name="{{$field.0}}" id="id_{{$field.0}}" value="1" {{if $field.2}}checked="checked"{{/if}}><br />
+               <span class="field_help" id="help_id_{{$field.0}}">{{$field.3}}</span>
        </div>
index 112208c1da128448987a986731eb07475a30e7c9..10622692364a2fd2835cadd06a585105b90edb3b 100644 (file)
@@ -1,6 +1,7 @@
 
-       <div class="field checkbox" id='div_id_{{$field.0}}'>
-                       <input type="checkbox" name='{{$field.0}}' id='id_{{$field.0}}' value="1" {{if $field.2}}checked="checked"{{/if}}>
+       <div class="field checkbox" id="div_id_{{$field.0}}">
+                       <input type="hidden" name="{{$field.0}}" value="0">
+                       <input type="checkbox" name="{{$field.0}}" id="id_{{$field.0}}" value="1" {{if $field.2}}checked="checked"{{/if}}>
                        <label for="id_{{$field.0}}">
                        {{$field.1}}
                        <p class="help-block">{{$field.3}}</p>
index ddcc05aa5148cd813324ada7f1993dbc13aebcbb..4f094e089345bb2c68b75bd8049c596098781505 100644 (file)
@@ -1,7 +1,8 @@
 
-       
-       <div class='field checkbox' id='div_id_{{$field.0}}'>
-               <label id='label_id_{{$field.0}}' for='id_{{$field.0}}'>{{$field.1}}</label>
-               <input type="checkbox" name='{{$field.0}}' id='id_{{$field.0}}' value="1" {{if $field.2}}checked="checked"{{/if}}><br />
-               <span class='field_help' id='help_id_{{$field.0}}'>{{$field.3}}</span>
+
+       <div class="field checkbox" id="div_id_{{$field.0}}">
+               <label id="label_id_{{$field.0}}" for="id_{{$field.0}}">{{$field.1}}</label>
+               <input type="hidden" name="{{$field.0}}" value="0">
+               <input type="checkbox" name="{{$field.0}}" id="id_{{$field.0}}" value="1" {{if $field.2}}checked="checked"{{/if}}><br />
+               <span class="field_help" id="help_id_{{$field.0}}">{{$field.3}}</span>
        </div>