Completely hide the UI instead

809-global-notification-settings-fix
dgtlmoon 2 years ago
parent 59b3bbf195
commit 09c9239aab

@ -29,12 +29,14 @@ $(document).ready(function () {
function toggle_default_notifications() { function toggle_default_notifications() {
var n=$('#notification_urls, #notification_title, #notification_body, #notification_format'); var n=$('#notification_urls, #notification_title, #notification_body, #notification_format');
if ($('#notification_use_default').is(':checked')) { if ($('#notification_use_default').is(':checked')) {
$('#notification-field-group').fadeOut();
$(n).each(function (e) { $(n).each(function (e) {
$(this).attr('readonly', true).css('opacity',0.5); $(this).attr('readonly', true);
}); });
} else { } else {
$('#notification-field-group').show();
$(n).each(function (e) { $(n).each(function (e) {
$(this).attr('readonly', false).css('opacity',1); $(this).attr('readonly', false);
}); });
} }
} }

@ -136,10 +136,10 @@ User-Agent: wonderbra 1.0") }}
<div class="tab-pane-inner" id="notifications"> <div class="tab-pane-inner" id="notifications">
<fieldset> <fieldset>
<div class="field-group">
<div class="pure-control-group inline-radio"> <div class="pure-control-group inline-radio">
{{ render_checkbox_field(form.notification_use_default) }} {{ render_checkbox_field(form.notification_use_default) }}
</div> </div>
<div class="field-group" id="notification-field-group">
{{ render_common_settings_form(form, current_base_url, emailprefix) }} {{ render_common_settings_form(form, current_base_url, emailprefix) }}
</div> </div>
</fieldset> </fieldset>

Loading…
Cancel
Save