diff --git a/doc/AddonStorageBackend.md b/doc/AddonStorageBackend.md index 17c3f0414..3e3a2aaba 100644 --- a/doc/AddonStorageBackend.md +++ b/doc/AddonStorageBackend.md @@ -52,7 +52,7 @@ The info array for each option is defined as: 'type', define the field used in form, and the type of data. -one of 'checkbox', 'combobox', 'custom', 'datetime', 'input', 'intcheckbox', 'password', 'radio', 'richtext', 'select', 'select_raw', 'textarea', 'yesno' +one of 'checkbox', 'combobox', 'custom', 'datetime', 'input', 'intcheckbox', 'password', 'radio', 'richtext', 'select', 'select_raw', 'textarea' 'label', diff --git a/doc/smarty3-templates.md b/doc/smarty3-templates.md index 27e2a0230..b39fa117e 100644 --- a/doc/smarty3-templates.md +++ b/doc/smarty3-templates.md @@ -178,14 +178,3 @@ Field parameter: 2. Current text for the 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, - -### 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". diff --git a/mod/settings.php b/mod/settings.php index 3ba5dc2b3..277470ad5 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -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"]; } - $opt_tpl = Renderer::getMarkupTemplate("field_yesno.tpl"); + $opt_tpl = Renderer::getMarkupTemplate("field_checkbox.tpl"); if (DI::config()->get('system', 'publish_all')) { $profile_in_dir = ''; } else { diff --git a/view/js/main.js b/view/js/main.js index 95ee4b8ed..41bae7cf2 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -160,23 +160,6 @@ $(function() { $(textarea).trigger('change'); }); - /* setup onoff widgets */ - $(".onoff input").each(function() { - val = $(this).val(); - id = $(this).attr("id"); - $("#"+id+"_onoff ." + (val == 0 ? "on":"off")).addClass("hidden"); - }); - - $(".onoff > a").click(function(event) { - event.preventDefault(); - var input = $(this).siblings("input"); - var val = 1-input.val(); - var id = input.attr("id"); - $("#"+id+"_onoff ." + (val == 0 ? "on":"off")).addClass("hidden"); - $("#"+id+"_onoff ." + (val == 1 ? "on":"off")).removeClass("hidden"); - input.val(val); - }); - /* popup menus */ function close_last_popup_menu() { if (last_popup_menu) { diff --git a/view/templates/admin/features.tpl b/view/templates/admin/features.tpl index f0b696fae..b1c8bad8f 100644 --- a/view/templates/admin/features.tpl +++ b/view/templates/admin/features.tpl @@ -11,8 +11,8 @@