Acessibility: A checkbox is a checkbox
This commit is contained in:
parent
480d936685
commit
07148ecf6b
|
@ -178,14 +178,3 @@ Field parameter:
|
||||||
2. Current text for the box,
|
2. Current text for the box,
|
||||||
3. Help text for the input box.
|
3. Help text for the input box.
|
||||||
4. if set to "required" modern browser will check that this input box is filled when submitting the form,
|
4. if set to "required" modern browser will check that this input box is filled when submitting the form,
|
||||||
|
|
||||||
### field_yesno.tpl
|
|
||||||
|
|
||||||
A button that has two states *yes* or *no*.
|
|
||||||
Field parameter:
|
|
||||||
|
|
||||||
0. Name of the input field,
|
|
||||||
1. Label for the button,
|
|
||||||
2. Current value,
|
|
||||||
3. Help text for the button
|
|
||||||
4. if set to an array of two values, these two will be used, otherwise "off" and "on".
|
|
||||||
|
|
|
@ -1075,7 +1075,7 @@ function settings_content(App $a)
|
||||||
$openid_field = ['openid_url', DI::l10n()->t('OpenID:'), $openid, DI::l10n()->t("\x28Optional\x29 Allow this OpenID to login to this account."), "", "readonly", "url"];
|
$openid_field = ['openid_url', DI::l10n()->t('OpenID:'), $openid, DI::l10n()->t("\x28Optional\x29 Allow this OpenID to login to this account."), "", "readonly", "url"];
|
||||||
}
|
}
|
||||||
|
|
||||||
$opt_tpl = Renderer::getMarkupTemplate("field_yesno.tpl");
|
$opt_tpl = Renderer::getMarkupTemplate("field_checkbox.tpl");
|
||||||
if (DI::config()->get('system', 'publish_all')) {
|
if (DI::config()->get('system', 'publish_all')) {
|
||||||
$profile_in_dir = '<input type="hidden" name="profile_in_directory" value="1" />';
|
$profile_in_dir = '<input type="hidden" name="profile_in_directory" value="1" />';
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
<div class="settings-content-block">
|
<div class="settings-content-block">
|
||||||
{{foreach $f.1 as $fcat}}
|
{{foreach $f.1 as $fcat}}
|
||||||
<div class="settings-block">
|
<div class="settings-block">
|
||||||
{{include file="field_yesno.tpl" field=$fcat.0}}
|
{{include file="field_checkbox.tpl" field=$fcat.0}}
|
||||||
{{include file="field_yesno.tpl" field=$fcat.1}}
|
{{include file="field_checkbox.tpl" field=$fcat.1}}
|
||||||
</div>
|
</div>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
|
|
||||||
<div id="dfrn-request-info-wrapper" >
|
<div id="dfrn-request-info-wrapper" >
|
||||||
|
|
||||||
{{include file="field_yesno.tpl" field=$does_know_you}}
|
{{include file="field_checkbox.tpl" field=$does_know_you}}
|
||||||
<!--
|
<!--
|
||||||
<p id="doiknowyou">
|
<p id="doiknowyou">
|
||||||
{{$does_know}}
|
{{$does_know}}
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
|
|
||||||
<div class="field yesno">
|
|
||||||
<label for="id_{{$field.0}}">{{$field.1}}</label>
|
|
||||||
<div class="onoff" id="id_{{$field.0}}_onoff">
|
|
||||||
<input type="hidden" name="{{$field.0}}" id="id_{{$field.0}}" value="{{$field.2 nofilter}}" aria-describedby="{{$field.0}}_tip">
|
|
||||||
<a href="#" class="off">
|
|
||||||
{{if $field.4}}{{$field.4.0}}{{else}}OFF{{/if}}
|
|
||||||
</a>
|
|
||||||
<a href="#" class="on">
|
|
||||||
{{if $field.4}}{{$field.4.1}}{{else}}ON{{/if}}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
{{if $field.3}}
|
|
||||||
<span class="field_help" role="tooltip" id="{{$field.0}}_tip">{{$field.3 nofilter}}</span>
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
|
@ -10,7 +10,7 @@
|
||||||
<div class="settings-content-block">
|
<div class="settings-content-block">
|
||||||
|
|
||||||
{{foreach $f.1 as $fcat}}
|
{{foreach $f.1 as $fcat}}
|
||||||
{{include file="field_yesno.tpl" field=$fcat}}
|
{{include file="field_checkbox.tpl" field=$fcat}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
<div class="settings-submit-wrapper" >
|
<div class="settings-submit-wrapper" >
|
||||||
<input type="submit" name="submit" class="settings-features-submit" value="{{$submit}}" />
|
<input type="submit" name="submit" class="settings-features-submit" value="{{$submit}}" />
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<div id="profile-edit-hide-friends-wrapper">
|
<div id="profile-edit-hide-friends-wrapper">
|
||||||
{{include file="field_yesno.tpl" field=$yesno}}
|
{{include file="field_checkbox.tpl" field=$yesno}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -72,10 +72,10 @@
|
||||||
<div style="display: none;">
|
<div style="display: none;">
|
||||||
<div id="advanced-expire-popup" style="width:auto;height:auto;overflow:auto;">
|
<div id="advanced-expire-popup" style="width:auto;height:auto;overflow:auto;">
|
||||||
<h3>{{$expire.advanced}}</h3>
|
<h3>{{$expire.advanced}}</h3>
|
||||||
{{include file="field_yesno.tpl" field=$expire.items}}
|
{{include file="field_checkbox.tpl" field=$expire.items}}
|
||||||
{{include file="field_yesno.tpl" field=$expire.notes}}
|
{{include file="field_checkbox.tpl" field=$expire.notes}}
|
||||||
{{include file="field_yesno.tpl" field=$expire.starred}}
|
{{include file="field_checkbox.tpl" field=$expire.starred}}
|
||||||
{{include file="field_yesno.tpl" field=$expire.network_only}}
|
{{include file="field_checkbox.tpl" field=$expire.network_only}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@
|
||||||
{{include file="field_checkbox.tpl" field=$email_textonly}}
|
{{include file="field_checkbox.tpl" field=$email_textonly}}
|
||||||
{{include file="field_checkbox.tpl" field=$detailed_notif}}
|
{{include file="field_checkbox.tpl" field=$detailed_notif}}
|
||||||
|
|
||||||
{{include file="field_yesno.tpl" field=$desktop_notifications}}
|
{{include file="field_checkbox.tpl" field=$desktop_notifications}}
|
||||||
<script>
|
<script>
|
||||||
(function(){
|
(function(){
|
||||||
var elm = $("#id_{{$desktop_notifications.0}}_onoff");
|
var elm = $("#id_{{$desktop_notifications.0}}_onoff");
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
|
|
||||||
<div id="dfrn-request-info-wrapper" >
|
<div id="dfrn-request-info-wrapper" >
|
||||||
|
|
||||||
{{include file="field_yesno.tpl" field=$does_know_you}}
|
{{include file="field_checkbox.tpl" field=$does_know_you}}
|
||||||
<!--
|
<!--
|
||||||
<p id="doiknowyou">
|
<p id="doiknowyou">
|
||||||
{{$does_know}}
|
{{$does_know}}
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
|
|
||||||
<div class="field yesno">
|
|
||||||
<label for="id_{{$field.0}}">{{$field.1}}</label>
|
|
||||||
<div class="onoff toggle btn btn-xs pull-right" id="id_{{$field.0}}_onoff">
|
|
||||||
|
|
||||||
<div class="switchlabel toggle-group">
|
|
||||||
<input type="hidden" name="{{$field.0}}" id="id_{{$field.0}}" value="{{$field.2 nofilter}}" aria-describedby="{{$field.0}}_tip">
|
|
||||||
<label class="btn btn-default btn-xs active toggle-off">
|
|
||||||
{{if $field.4}}{{$field.4.0}}{{else}}OFF{{/if}}
|
|
||||||
</label>
|
|
||||||
<label class="btn btn-primary btn-xs toggle-on">
|
|
||||||
{{if $field.4}}{{$field.4.1}}{{else}}ON{{/if}}
|
|
||||||
</label>
|
|
||||||
<span class="toggle-handle btn btn-default btn-xs"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{if $field.3}}
|
|
||||||
<span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3 nofilter}}</span>
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
<div class="clear"></div>
|
|
|
@ -19,7 +19,7 @@
|
||||||
<div id="{{$g}}-settings-content" class="panel-collapse collapse" role="tabpanel" aria-labelledby="{{$g}}-settings-title">
|
<div id="{{$g}}-settings-content" class="panel-collapse collapse" role="tabpanel" aria-labelledby="{{$g}}-settings-title">
|
||||||
<div class="section-content-tools-wrapper">
|
<div class="section-content-tools-wrapper">
|
||||||
{{foreach $f.1 as $fcat}}
|
{{foreach $f.1 as $fcat}}
|
||||||
{{include file="field_yesno.tpl" field=$fcat}}
|
{{include file="field_checkbox.tpl" field=$fcat}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
|
|
||||||
<div class="form-group pull-right settings-submit-wrapper" >
|
<div class="form-group pull-right settings-submit-wrapper" >
|
||||||
|
|
|
@ -113,10 +113,10 @@
|
||||||
<h4 class="modal-title">{{$expire.advanced}}</h4>
|
<h4 class="modal-title">{{$expire.advanced}}</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
{{include file="field_yesno.tpl" field=$expire.items}}
|
{{include file="field_checkbox.tpl" field=$expire.items}}
|
||||||
{{include file="field_yesno.tpl" field=$expire.notes}}
|
{{include file="field_checkbox.tpl" field=$expire.notes}}
|
||||||
{{include file="field_yesno.tpl" field=$expire.starred}}
|
{{include file="field_checkbox.tpl" field=$expire.starred}}
|
||||||
{{include file="field_yesno.tpl" field=$expire.network_only}}
|
{{include file="field_checkbox.tpl" field=$expire.network_only}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -192,7 +192,7 @@
|
||||||
</div>
|
</div>
|
||||||
*}}
|
*}}
|
||||||
|
|
||||||
{{include file="field_yesno.tpl" field=$desktop_notifications}}
|
{{include file="field_checkbox.tpl" field=$desktop_notifications}}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
(function(){
|
(function(){
|
||||||
var elm = $("#id_{{$desktop_notifications.0}}_onoff");
|
var elm = $("#id_{{$desktop_notifications.0}}_onoff");
|
||||||
|
|
Loading…
Reference in a new issue