move email settings to the top and hide then optional domain-settings when adding/editing domain as admin; fixes #1012

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-03-15 09:05:05 +01:00
parent af6b5f0ec5
commit 0d282d29d8
7 changed files with 99 additions and 69 deletions

File diff suppressed because one or more lines are too long

View File

@@ -3,8 +3,8 @@
{% import "Froxlor/form/formfields.html.twig" as formfields %}
<form action="{{ formaction|default("") }}" method="post" enctype="application/x-www-form-urlencoded" class="form">
{% for section in form_data.sections %}
<div class="card mb-3">
{% for sid,section in form_data.sections %}
<div class="card mb-3" id="{{ sid }}">
{% if section.title is not empty %}
<div class="card-header">
{% if section.image is not empty %}

View File

@@ -56,4 +56,27 @@ $(document).ready(function () {
});
}
if ($('#id') && $('#email_only').is(':checked')) {
// hide unnecessary sections
$('#section_b').hide();
$('#section_bssl').hide();
$('#section_c').hide();
$('#section_d').hide();
}
$('#email_only').click(function () {
if ($(this).is(':checked')) {
// hide unnecessary sections
$('#section_b').hide();
$('#section_bssl').hide();
$('#section_c').hide();
$('#section_d').hide();
} else {
// show sections
$('#section_b').show();
$('#section_bssl').show();
$('#section_c').show();
$('#section_d').show();
}
})
});