]> git.mxchange.org Git - friendica.git/commitdiff
extend checkbox template for customized attributes
authorrabuzarus <>
Sun, 15 Oct 2017 16:45:49 +0000 (18:45 +0200)
committerrabuzarus <>
Sun, 15 Oct 2017 16:45:49 +0000 (18:45 +0200)
mod/events.php
view/templates/field_checkbox.tpl
view/theme/frio/templates/field_checkbox.tpl

index 4959212ec6f816c579e0e7448b6bebe799537625..eec970d0360d1016604fbe1848592e10d20fa59c 100644 (file)
@@ -442,7 +442,7 @@ function events_content(App $a) {
                }
 
                if ($cid || ($mode !== 'new')) {
-                       $sh_checked .= ' disabled="disabled" ';
+                       $sh_disabled = 'disabled="disabled"';
                }
 
                $sdt = ((x($orig_event)) ? $orig_event['start'] : 'now');
@@ -511,7 +511,7 @@ function events_content(App $a) {
                        '$t_orig' => $t_orig,
                        '$summary' => array('summary', t('Title:'), $t_orig, '', '*'),
                        '$sh_text' => t('Share this event'),
-                       '$share' => array('share', t('Share this event'), $sh_checked, ''),
+                       '$share' => array('share', t('Share this event'), $sh_checked, '', $sh_disabled),
                        '$sh_checked' => $sh_checked,
                        '$nofinish' => array('nofinish', t('Finish date/time is not known or not relevant'), $n_checked),
                        '$adjust' => array('adjust', t('Adjust for viewer timezone'), $a_checked),
index 3d4a4284b6b6859001d77250b315fecdd032a70d..b66cced8767f0c778ec01a47ccd385892d5cc615 100644 (file)
@@ -1,6 +1,6 @@
        <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}}>
+               <input type="checkbox" name="{{$field.0}}" id="id_{{$field.0}}" aria-describedby="{{$field.0}}_tip" value="1" {{if $field.2}}checked="checked"{{/if}} {{if $field.4}}{{$field.4}}{{/if}}>
                <span class="field_help" role="tooltip" id="{{$field.0}}_tip">{{$field.3}}</span>
        </div>
index f938b55aa1cd1c082ce474eaf31498436ddea09c..787a82ebdcd14f7d3bbf7c3cb7973070b76148cf 100644 (file)
@@ -1,7 +1,7 @@
 
        <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}} aria-checked="{{if $field.2}}true{{else}}false{{/if}}" aria-describedby="{{$field.0}}_tip">
+                       <input type="checkbox" name="{{$field.0}}" id="id_{{$field.0}}" value="1" {{if $field.2}}checked="checked"{{/if}} aria-checked="{{if $field.2}}true{{else}}false{{/if}}" aria-describedby="{{$field.0}}_tip" {{if $field.4}}{{$field.4}}{{/if}}>
                        <label for="id_{{$field.0}}">
                                {{$field.1}}
                                <span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3}}</span>