1
1
Fork 0

extend checkbox template for customized attributes

This commit is contained in:
rabuzarus 2017-10-15 18:45:49 +02:00
parent 4584670af4
commit 74d813042f
3 changed files with 4 additions and 4 deletions

View 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),

View 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>

View 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>