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:
File diff suppressed because one or more lines are too long
@@ -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 %}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user