update some more formfields; improved formfields with wrapper fieldrow()-macro to reduce duplicate markup; enable next_to functionality for some fields
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
return array(
|
||||
'domain_ssleditor' => array(
|
||||
'title' => $lng['panel']['ssleditor'],
|
||||
'image' => 'icons/ssl.png',
|
||||
'image' => 'fa-solid fa-lock',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => 'SSL certificates',
|
||||
@@ -30,7 +30,6 @@ return array(
|
||||
'display' => $result_domain['domain']
|
||||
),
|
||||
'ssl_cert_file' => array(
|
||||
'style' => 'align-top',
|
||||
'label' => $lng['admin']['ipsandports']['ssl_cert_file_content'],
|
||||
'desc' => $lng['admin']['ipsandports']['ssl_paste_description'],
|
||||
'type' => 'textarea',
|
||||
@@ -39,7 +38,6 @@ return array(
|
||||
'value' => $result['ssl_cert_file']
|
||||
),
|
||||
'ssl_key_file' => array(
|
||||
'style' => 'align-top',
|
||||
'label' => $lng['admin']['ipsandports']['ssl_key_file_content'],
|
||||
'desc' => $lng['admin']['ipsandports']['ssl_paste_description'],
|
||||
'type' => 'textarea',
|
||||
@@ -48,7 +46,6 @@ return array(
|
||||
'value' => $result['ssl_key_file']
|
||||
),
|
||||
'ssl_cert_chainfile' => array(
|
||||
'style' => 'align-top',
|
||||
'label' => $lng['admin']['ipsandports']['ssl_cert_chainfile_content'],
|
||||
'desc' => $lng['admin']['ipsandports']['ssl_paste_description'] . $lng['admin']['ipsandports']['ssl_cert_chainfile_content_desc'],
|
||||
'type' => 'textarea',
|
||||
@@ -57,7 +54,6 @@ return array(
|
||||
'value' => $result['ssl_cert_chainfile']
|
||||
),
|
||||
'ssl_ca_file' => array(
|
||||
'style' => 'align-top',
|
||||
'label' => $lng['admin']['ipsandports']['ssl_ca_file_content'],
|
||||
'desc' => $lng['admin']['ipsandports']['ssl_paste_description'] . $lng['admin']['ipsandports']['ssl_ca_file_content_desc'],
|
||||
'type' => 'textarea',
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
return array(
|
||||
'domain_add' => array(
|
||||
'title' => $lng['domains']['subdomain_add'],
|
||||
'image' => 'icons/domain_add.png',
|
||||
'image' => 'fa-solid fa-plus',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['domains']['subdomain_add'],
|
||||
@@ -25,15 +25,14 @@ return array(
|
||||
'fields' => array(
|
||||
'subdomain' => array(
|
||||
'label' => $lng['domains']['domainname'],
|
||||
'type' => 'textul',
|
||||
'ul_field' => '',
|
||||
'has_nextto' => true
|
||||
),
|
||||
'domain' => array(
|
||||
'next_to' => 'subdomain',
|
||||
'next_to_prefix' => ' . ',
|
||||
'type' => 'select',
|
||||
'select_var' => $domains
|
||||
'type' => 'text',
|
||||
'next_to' => [
|
||||
'domain' => [
|
||||
'next_to_prefix' => ' . ',
|
||||
'type' => 'select',
|
||||
'select_var' => $domains
|
||||
]
|
||||
]
|
||||
),
|
||||
'alias' => array(
|
||||
'label' => $lng['domains']['aliasdomain'],
|
||||
@@ -45,7 +44,7 @@ return array(
|
||||
'desc' => (\Froxlor\Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescriptionSubdomain'] : null) . (isset($pathSelect['note']) ? $pathSelect['note'] . '<br />' . $pathSelect['value'] : ''),
|
||||
'type' => $pathSelect['type'],
|
||||
'select_var' => $pathSelect['value'],
|
||||
'value' => $pathSelect['value']
|
||||
'selected' => $pathSelect['value']
|
||||
),
|
||||
'url' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('panel.pathedit') == 'Dropdown' ? true : false),
|
||||
@@ -86,85 +85,53 @@ return array(
|
||||
'sslenabled' => array(
|
||||
'label' => $lng['admin']['domain_sslenabled'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
'1'
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => true
|
||||
),
|
||||
'ssl_redirect' => array(
|
||||
'label' => $lng['domains']['ssl_redirect']['title'],
|
||||
'desc' => $lng['domains']['ssl_redirect']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
'value' => '1',
|
||||
'checked' => false
|
||||
),
|
||||
'letsencrypt' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('system.leenabled') == '1' ? true : false),
|
||||
'label' => $lng['customer']['letsencrypt']['title'],
|
||||
'desc' => $lng['customer']['letsencrypt']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
'value' => '1',
|
||||
'checked' => false
|
||||
),
|
||||
'http2' => array(
|
||||
'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.http2_support') == '1',
|
||||
'label' => $lng['admin']['domain_http2']['title'],
|
||||
'desc' => $lng['admin']['domain_http2']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
'value' => '1',
|
||||
'checked' => false
|
||||
),
|
||||
'hsts_maxage' => array(
|
||||
'label' => $lng['admin']['domain_hsts_maxage']['title'],
|
||||
'desc' => $lng['admin']['domain_hsts_maxage']['description'],
|
||||
'type' => 'int',
|
||||
'int_min' => 0,
|
||||
'int_max' => 94608000, // 3-years
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 94608000, // 3-years
|
||||
'value' => 0
|
||||
),
|
||||
'hsts_sub' => array(
|
||||
'label' => $lng['admin']['domain_hsts_incsub']['title'],
|
||||
'desc' => $lng['admin']['domain_hsts_incsub']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
'value' => '1',
|
||||
'checked' => false
|
||||
),
|
||||
'hsts_preload' => array(
|
||||
'label' => $lng['admin']['domain_hsts_preload']['title'],
|
||||
'desc' => $lng['admin']['domain_hsts_preload']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
'value' => '1',
|
||||
'checked' => false
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
return array(
|
||||
'domain_edit' => array(
|
||||
'title' => $lng['domains']['subdomain_edit'],
|
||||
'image' => 'icons/domain_edit.png',
|
||||
'image' => 'fa-solid fa-pen',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['domains']['subdomain_edit'],
|
||||
@@ -44,7 +44,7 @@ return array(
|
||||
'desc' => (\Froxlor\Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescriptionSubdomain'] : null) . (isset($pathSelect['note']) ? '<br />' . $pathSelect['value'] : ''),
|
||||
'type' => $pathSelect['type'],
|
||||
'select_var' => $pathSelect['value'],
|
||||
'value' => $pathSelect['value']
|
||||
'selected' => $pathSelect['value']
|
||||
),
|
||||
'url' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('panel.pathedit') == 'Dropdown' ? true : false),
|
||||
@@ -70,15 +70,8 @@ return array(
|
||||
'visible' => ((($result['subcanemaildomain'] == '1' || $result['subcanemaildomain'] == '2') && $result['parentdomainid'] != '0') ? true : false),
|
||||
'label' => 'Emaildomain',
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['isemaildomain']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['isemaildomain']
|
||||
),
|
||||
'openbasedir_path' => array(
|
||||
'visible' => ($result['openbasedir'] == '1') ? true : false,
|
||||
@@ -102,95 +95,53 @@ return array(
|
||||
'sslenabled' => array(
|
||||
'label' => $lng['admin']['domain_sslenabled'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['ssl_enabled']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['ssl_enabled']
|
||||
),
|
||||
'ssl_redirect' => array(
|
||||
'label' => $lng['domains']['ssl_redirect']['title'],
|
||||
'desc' => $lng['domains']['ssl_redirect']['description'] . ($result['temporary_ssl_redirect'] > 1 ? $lng['domains']['ssl_redirect_temporarilydisabled'] : ''),
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['ssl_redirect']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['ssl_redirect']
|
||||
),
|
||||
'letsencrypt' => array(
|
||||
'visible' => \Froxlor\Settings::Get('system.leenabled') == '1' ? true : false,
|
||||
'label' => $lng['customer']['letsencrypt']['title'],
|
||||
'desc' => $lng['customer']['letsencrypt']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['letsencrypt']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['letsencrypt']
|
||||
),
|
||||
'http2' => array(
|
||||
'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.http2_support') == '1',
|
||||
'label' => $lng['admin']['domain_http2']['title'],
|
||||
'desc' => $lng['admin']['domain_http2']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['http2']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['http2']
|
||||
),
|
||||
'hsts_maxage' => array(
|
||||
'label' => $lng['admin']['domain_hsts_maxage']['title'],
|
||||
'desc' => $lng['admin']['domain_hsts_maxage']['description'],
|
||||
'type' => 'int',
|
||||
'int_min' => 0,
|
||||
'int_max' => 94608000, // 3-years
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 94608000, // 3-years
|
||||
'value' => $result['hsts']
|
||||
),
|
||||
'hsts_sub' => array(
|
||||
'label' => $lng['admin']['domain_hsts_incsub']['title'],
|
||||
'desc' => $lng['admin']['domain_hsts_incsub']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['hsts_sub']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['hsts_sub']
|
||||
),
|
||||
'hsts_preload' => array(
|
||||
'label' => $lng['admin']['domain_hsts_preload']['title'],
|
||||
'desc' => $lng['admin']['domain_hsts_preload']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['hsts_preload']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['hsts_preload']
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
return array(
|
||||
'emails_add' => array(
|
||||
'title' => $lng['emails']['emails_add'],
|
||||
'image' => 'icons/email_add.png',
|
||||
'image' => 'fa-solid fa-plus',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['emails']['emails_add'],
|
||||
@@ -25,26 +25,20 @@ return array(
|
||||
'fields' => array(
|
||||
'email_part' => array(
|
||||
'label' => $lng['emails']['emailaddress'],
|
||||
'type' => 'textul',
|
||||
'ul_field' => '',
|
||||
'has_nextto' => true
|
||||
),
|
||||
'domain' => array(
|
||||
'next_to' => 'email_part',
|
||||
'next_to_prefix' => ' @ ',
|
||||
'type' => 'select',
|
||||
'select_var' => $domains
|
||||
'type' => 'text',
|
||||
'next_to' => [
|
||||
'domain' => [
|
||||
'next_to_prefix' => ' @ ',
|
||||
'type' => 'select',
|
||||
'select_var' => $domains
|
||||
]
|
||||
]
|
||||
),
|
||||
'iscatchall' => array(
|
||||
'label' => $lng['emails']['iscatchall'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
'value' => '1',
|
||||
'checked' => false
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
return array(
|
||||
'emails_edit' => array(
|
||||
'title' => $lng['emails']['emails_edit'],
|
||||
'image' => 'icons/email_edit.png',
|
||||
'image' => 'fa-solid fa-pen',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['emails']['emails_edit'],
|
||||
@@ -33,29 +33,69 @@ return array(
|
||||
'visible' => ($result['popaccountid'] != 0 ? true : false),
|
||||
'label' => $lng['emails']['account'],
|
||||
'type' => 'label',
|
||||
'value' => $lng['panel']['yes'] . ' [<a href="' . $filename . '?page=accounts&action=changepw&id=' . $result['id'] . '&s=' . $s . '">' . $lng['menue']['main']['changepassword'] . '</a>] [<a href="' . $filename . '?page=accounts&action=delete&id=' . $result['id'] . '&s=' . $s . '">' . $lng['emails']['account_delete'] . '</a>]'
|
||||
'value' => $lng['panel']['yes'],
|
||||
'next_to' => [
|
||||
'del_link' => [
|
||||
'type' => 'link',
|
||||
'href' => $filename . '?page=accounts&action=changepw&id=' . $result['id'] . '&s=' . $s,
|
||||
'label' => $lng['emails']['account_delete'],
|
||||
'classes' => 'btn btn-sm btn-danger'
|
||||
]
|
||||
]
|
||||
),
|
||||
'account_no' => array(
|
||||
'visible' => ($result['popaccountid'] == 0 ? true : false),
|
||||
'label' => $lng['emails']['account'],
|
||||
'type' => 'label',
|
||||
'value' => $lng['panel']['no'] . ' [<a href="' . $filename . '?page=accounts&action=add&id=' . $result['id'] . '&s=' . $s . '">' . $lng['emails']['account_add'] . '</a>]'
|
||||
'value' => $lng['panel']['no'],
|
||||
'next_to' => [
|
||||
'add_link' => [
|
||||
'type' => 'link',
|
||||
'href' => $filename . '?page=accounts&action=add&id=' . $result['id'] . '&s=' . $s,
|
||||
'label' => $lng['emails']['account_add'],
|
||||
'classes' => 'btn btn-sm btn-primary'
|
||||
]
|
||||
]
|
||||
),
|
||||
'mail_quota' => array(
|
||||
'visible' => ($result['popaccountid'] != 0 && \Froxlor\Settings::Get('system.mail_quota_enabled')),
|
||||
'label' => $lng['customer']['email_quota'],
|
||||
'type' => 'label',
|
||||
'value' => $result['quota'] . ' MiB [<a href="' . $filename . '?page=accounts&action=changequota&id=' . $result['id'] . '&s=' . $s . '">' . $lng['emails']['quota_edit'] . '</a>]'
|
||||
'value' => $result['quota'] . ' MiB',
|
||||
'next_to' => [
|
||||
'add_link' => [
|
||||
'type' => 'link',
|
||||
'href' => $filename . '?page=accounts&action=changequota&id=' . $result['id'] . '&s=' . $s,
|
||||
'label' => $lng['emails']['quota_edit'],
|
||||
'classes' => 'btn btn-sm btn-secondary'
|
||||
]
|
||||
]
|
||||
),
|
||||
'mail_catchall' => array(
|
||||
'label' => $lng['emails']['catchall'],
|
||||
'type' => 'label',
|
||||
'value' => ($result['iscatchall'] == 0 ? $lng['panel']['no'] : $lng['panel']['yes']) . ' [<a href="' . $filename . '?page=' . $page . '&action=togglecatchall&id=' . $result['id'] . '&s=' . $s . '">' . $lng['panel']['toggle'] . '</a>]'
|
||||
'value' => ($result['iscatchall'] == 0 ? $lng['panel']['no'] : $lng['panel']['yes']),
|
||||
'next_to' => [
|
||||
'add_link' => [
|
||||
'type' => 'link',
|
||||
'href' => $filename . '?page=' . $page . '&action=togglecatchall&id=' . $result['id'] . '&s=' . $s,
|
||||
'label' => $lng['panel']['toggle'],
|
||||
'classes' => 'btn btn-sm btn-secondary'
|
||||
]
|
||||
]
|
||||
),
|
||||
'mail_fwds' => array(
|
||||
'label' => $lng['emails']['forwarders'] . ' (' . $forwarders_count . ')',
|
||||
'type' => 'label',
|
||||
'value' => $forwarders . ' <a href="' . $filename . '?page=forwarders&action=add&id=' . $result['id'] . '&s=' . $s . '">' . $lng['emails']['forwarder_add'] . '</a>'
|
||||
'value' => $forwarders,
|
||||
'next_to' => [
|
||||
'add_link' => [
|
||||
'type' => 'link',
|
||||
'href' => $filename . '?page=forwarders&action=add&id=' . $result['id'] . '&s=' . $s,
|
||||
'label' => $lng['emails']['forwarder_add'],
|
||||
'classes' => 'btn btn-sm btn-primary'
|
||||
]
|
||||
]
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user