add more subnavigation for customer-email section; correctly display next_to elements when type=label in formfields
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -285,7 +285,26 @@ if ($page == 'overview' || $page == 'emails') {
|
|||||||
|
|
||||||
UI::view('user/form.html.twig', [
|
UI::view('user/form.html.twig', [
|
||||||
'formaction' => $linker->getLink(['section' => 'email', 'id' => $id]),
|
'formaction' => $linker->getLink(['section' => 'email', 'id' => $id]),
|
||||||
'formdata' => $account_add_data['emails_addaccount']
|
'formdata' => $account_add_data['emails_addaccount'],
|
||||||
|
'actions_links' => [
|
||||||
|
[
|
||||||
|
'class' => 'btn-secondary',
|
||||||
|
'href' => $linker->getLink([
|
||||||
|
'section' => 'email',
|
||||||
|
'page' => 'emails',
|
||||||
|
'action' => 'edit',
|
||||||
|
'id' => $id
|
||||||
|
]),
|
||||||
|
'label' => lng('emails.emails_edit'),
|
||||||
|
'icon' => 'fa-solid fa-pen'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'class' => 'btn-secondary',
|
||||||
|
'href' => $linker->getLink(['section' => 'email', 'page' => 'emails']),
|
||||||
|
'label' => lng('menue.email.emails'),
|
||||||
|
'icon' => 'fa-solid fa-envelope'
|
||||||
|
]
|
||||||
|
],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -324,7 +343,26 @@ if ($page == 'overview' || $page == 'emails') {
|
|||||||
|
|
||||||
UI::view('user/form.html.twig', [
|
UI::view('user/form.html.twig', [
|
||||||
'formaction' => $linker->getLink(['section' => 'email', 'id' => $id]),
|
'formaction' => $linker->getLink(['section' => 'email', 'id' => $id]),
|
||||||
'formdata' => $account_changepw_data['emails_accountchangepasswd']
|
'formdata' => $account_changepw_data['emails_accountchangepasswd'],
|
||||||
|
'actions_links' => [
|
||||||
|
[
|
||||||
|
'class' => 'btn-secondary',
|
||||||
|
'href' => $linker->getLink([
|
||||||
|
'section' => 'email',
|
||||||
|
'page' => 'emails',
|
||||||
|
'action' => 'edit',
|
||||||
|
'id' => $id
|
||||||
|
]),
|
||||||
|
'label' => lng('emails.emails_edit'),
|
||||||
|
'icon' => 'fa-solid fa-pen'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'class' => 'btn-secondary',
|
||||||
|
'href' => $linker->getLink(['section' => 'email', 'page' => 'emails']),
|
||||||
|
'label' => lng('menue.email.emails'),
|
||||||
|
'icon' => 'fa-solid fa-envelope'
|
||||||
|
]
|
||||||
|
],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -358,7 +396,26 @@ if ($page == 'overview' || $page == 'emails') {
|
|||||||
|
|
||||||
UI::view('user/form.html.twig', [
|
UI::view('user/form.html.twig', [
|
||||||
'formaction' => $linker->getLink(['section' => 'email', 'id' => $id]),
|
'formaction' => $linker->getLink(['section' => 'email', 'id' => $id]),
|
||||||
'formdata' => $quota_edit_data['emails_accountchangequota']
|
'formdata' => $quota_edit_data['emails_accountchangequota'],
|
||||||
|
'actions_links' => [
|
||||||
|
[
|
||||||
|
'class' => 'btn-secondary',
|
||||||
|
'href' => $linker->getLink([
|
||||||
|
'section' => 'email',
|
||||||
|
'page' => 'emails',
|
||||||
|
'action' => 'edit',
|
||||||
|
'id' => $id
|
||||||
|
]),
|
||||||
|
'label' => lng('emails.emails_edit'),
|
||||||
|
'icon' => 'fa-solid fa-pen'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'class' => 'btn-secondary',
|
||||||
|
'href' => $linker->getLink(['section' => 'email', 'page' => 'emails']),
|
||||||
|
'label' => lng('menue.email.emails'),
|
||||||
|
'icon' => 'fa-solid fa-envelope'
|
||||||
|
]
|
||||||
|
],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -425,7 +482,26 @@ if ($page == 'overview' || $page == 'emails') {
|
|||||||
|
|
||||||
UI::view('user/form.html.twig', [
|
UI::view('user/form.html.twig', [
|
||||||
'formaction' => $linker->getLink(['section' => 'email', 'id' => $id]),
|
'formaction' => $linker->getLink(['section' => 'email', 'id' => $id]),
|
||||||
'formdata' => $forwarder_add_data['emails_addforwarder']
|
'formdata' => $forwarder_add_data['emails_addforwarder'],
|
||||||
|
'actions_links' => [
|
||||||
|
[
|
||||||
|
'class' => 'btn-secondary',
|
||||||
|
'href' => $linker->getLink([
|
||||||
|
'section' => 'email',
|
||||||
|
'page' => 'emails',
|
||||||
|
'action' => 'edit',
|
||||||
|
'id' => $id
|
||||||
|
]),
|
||||||
|
'label' => lng('emails.emails_edit'),
|
||||||
|
'icon' => 'fa-solid fa-pen'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'class' => 'btn-secondary',
|
||||||
|
'href' => $linker->getLink(['section' => 'email', 'page' => 'emails']),
|
||||||
|
'label' => lng('menue.email.emails'),
|
||||||
|
'icon' => 'fa-solid fa-envelope'
|
||||||
|
]
|
||||||
|
],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,10 @@
|
|||||||
{% if em %}
|
{% if em %}
|
||||||
<mark>
|
<mark>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ field.label.title|raw }}{% if field.mandatory is defined and field.mandatory %}<span class="text-danger">*</span>{% endif %}
|
{{ field.label.title|raw }}
|
||||||
|
{% if field.mandatory is defined and field.mandatory %}
|
||||||
|
<span class="text-danger">*</span>
|
||||||
|
{% endif %}
|
||||||
{% if em %}
|
{% if em %}
|
||||||
</mark>
|
</mark>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -19,7 +22,10 @@
|
|||||||
{% if em %}
|
{% if em %}
|
||||||
<mark>
|
<mark>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ field.label|raw }}{% if field.mandatory is defined and field.mandatory %}<span class="text-danger">*</span>{% endif %}
|
{{ field.label|raw }}
|
||||||
|
{% if field.mandatory is defined and field.mandatory %}
|
||||||
|
<span class="text-danger">*</span>
|
||||||
|
{% endif %}
|
||||||
{% if em %}
|
{% if em %}
|
||||||
</mark>
|
</mark>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -116,9 +122,6 @@
|
|||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro plain(id, field) %}
|
{% macro plain(id, field) %}
|
||||||
{% if field.next_to is defined %}
|
|
||||||
<div class="input-group">
|
|
||||||
{% endif %}
|
|
||||||
<input type="text" readonly class="form-control-plaintext" id="{{ id }}" name="{{ id }}" value="{{ field.value|raw }}">
|
<input type="text" readonly class="form-control-plaintext" id="{{ id }}" name="{{ id }}" value="{{ field.value|raw }}">
|
||||||
{% if field.next_to is defined %}
|
{% if field.next_to is defined %}
|
||||||
{% for nid, nfield in field.next_to %}
|
{% for nid, nfield in field.next_to %}
|
||||||
@@ -127,7 +130,6 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{{ _self.fieldrow(nid, nfield, true) }}
|
{{ _self.fieldrow(nid, nfield, true) }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user