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:
Michael Kaufmann
2022-02-20 12:50:29 +01:00
parent 23ecc40b1a
commit e6d12be7b3
25 changed files with 473 additions and 830 deletions

View File

@@ -24,6 +24,7 @@ use Froxlor\Settings;
use Froxlor\Api\Commands\Emails as Emails; use Froxlor\Api\Commands\Emails as Emails;
use Froxlor\Api\Commands\EmailAccounts as EmailAccounts; use Froxlor\Api\Commands\EmailAccounts as EmailAccounts;
use Froxlor\Api\Commands\EmailForwarders as EmailForwarders; use Froxlor\Api\Commands\EmailForwarders as EmailForwarders;
use Froxlor\UI\Panel\UI;
// redirect if this customer page is hidden via settings // redirect if this customer page is hidden via settings
if (Settings::IsInList('panel.customer_hide_options', 'email')) { if (Settings::IsInList('panel.customer_hide_options', 'email')) {
@@ -261,12 +262,10 @@ if ($page == 'overview') {
unset($email_edit_data['emails_edit']['sections']['section_a']['fields']['mail_catchall']); unset($email_edit_data['emails_edit']['sections']['section_a']['fields']['mail_catchall']);
} }
$email_edit_form = \Froxlor\UI\HtmlForm::genHTMLForm($email_edit_data); UI::TwigBuffer('user/form.html.twig', [
'formdata' => $email_edit_data['emails_edit']
$title = $email_edit_data['emails_edit']['title']; ]);
$image = $email_edit_data['emails_edit']['image']; UI::TwigOutputBuffer();
eval("echo \"" . \Froxlor\UI\Template::getTemplate("email/emails_edit") . "\";");
} }
} elseif ($action == 'togglecatchall' && $id != 0) { } elseif ($action == 'togglecatchall' && $id != 0) {
try { try {

View File

@@ -32,13 +32,16 @@ return array(
'label' => $lng['login']['password'], 'label' => $lng['login']['password'],
'type' => 'password', 'type' => 'password',
'mandatory' => true, 'mandatory' => true,
'autocomplete' => 'off' 'autocomplete' => 'off',
), 'next_to' => [
'admin_password_suggestion' => array( 'admin_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'], 'next_to_prefix' => $lng['customer']['generated_pwd'].':',
'type' => 'text', 'type' => 'text',
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''), 'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System\Crypt::generatePassword() 'value' => \Froxlor\System\Crypt::generatePassword(),
'readonly' => true
)
]
), ),
'def_language' => array( 'def_language' => array(
'label' => $lng['login']['language'], 'label' => $lng['login']['language'],

View File

@@ -39,13 +39,16 @@ return array(
'label' => $lng['login']['password'] . '&nbsp;(' . $lng['panel']['emptyfornochanges'] . ')', 'label' => $lng['login']['password'] . '&nbsp;(' . $lng['panel']['emptyfornochanges'] . ')',
'type' => 'password', 'type' => 'password',
'autocomplete' => 'off', 'autocomplete' => 'off',
'visible' => ($result['adminid'] == $userinfo['userid'] ? false : true) 'visible' => ($result['adminid'] == $userinfo['userid'] ? false : true),
), 'next_to' => [
'admin_password_suggestion' => array( 'admin_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'], 'next_to_prefix' => $lng['customer']['generated_pwd'].':',
'type' => 'text', 'type' => 'text',
'value' => \Froxlor\System\Crypt::generatePassword(), 'visible' => (\Froxlor\Settings::Get('panel.password_regex') == '' && ($result['adminid'] == $userinfo['userid'] ? false : true)),
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == '' && ($result['adminid'] == $userinfo['userid'] ? false : true)) 'value' => \Froxlor\System\Crypt::generatePassword(),
'readonly' => true
)
]
), ),
'def_language' => array( 'def_language' => array(
'label' => $lng['login']['language'], 'label' => $lng['login']['language'],

View File

@@ -43,14 +43,16 @@ return array(
'new_customer_password' => array( 'new_customer_password' => array(
'label' => $lng['login']['password'], 'label' => $lng['login']['password'],
'type' => 'password', 'type' => 'password',
'autocomplete' => 'off' 'autocomplete' => 'off',
), 'next_to' => [
'new_customer_password_suggestion' => array( 'new_customer_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'], 'next_to_prefix' => $lng['customer']['generated_pwd'].':',
'type' => 'text', 'type' => 'text',
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''), 'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System\Crypt::generatePassword(), 'value' => \Froxlor\System\Crypt::generatePassword(),
'readonly' => true 'readonly' => true
)
]
), ),
'sendpassword' => array( 'sendpassword' => array(
'label' => $lng['admin']['sendpassword'], 'label' => $lng['admin']['sendpassword'],
@@ -107,12 +109,14 @@ return array(
'type' => 'text' 'type' => 'text'
), ),
'zipcode' => array( 'zipcode' => array(
'label' => $lng['customer']['zipcode'], 'label' => $lng['customer']['zipcode'] . ' / ' . $lng['customer']['city'],
'type' => 'text' 'type' => 'text',
), 'next_to' => [
'city' => array( 'city' => array(
'label' => $lng['customer']['city'], 'next_to_prefix' => ' / ',
'type' => 'text' 'type' => 'text'
)
]
), ),
'phone' => array( 'phone' => array(
'label' => $lng['customer']['phone'], 'label' => $lng['customer']['phone'],
@@ -147,7 +151,7 @@ return array(
) )
), ),
'section_cpre' => array( 'section_cpre' => array(
'visible' => ! empty($hosting_plans), 'visible' => !empty($hosting_plans),
'title' => $lng['admin']['plans']['use_plan'], 'title' => $lng['admin']['plans']['use_plan'],
'image' => 'icons/user_add.png', 'image' => 'icons/user_add.png',
'fields' => array( 'fields' => array(
@@ -205,7 +209,7 @@ return array(
'mandatory' => true 'mandatory' => true
), ),
'email_quota' => array( 'email_quota' => array(
'label' => $lng['customer']['email_quota']. ' (' . $lng['customer']['mib'] . ')', 'label' => $lng['customer']['email_quota'] . ' (' . $lng['customer']['mib'] . ')',
'type' => 'textul', 'type' => 'textul',
'value' => 0, 'value' => 0,
'maxlength' => 9, 'maxlength' => 9,
@@ -252,9 +256,9 @@ return array(
'values' => $phpconfigs, 'values' => $phpconfigs,
'value' => ((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 ? 'value' => ((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 ?
[\Froxlor\Settings::Get('system.mod_fcgid_defaultini')] [\Froxlor\Settings::Get('system.mod_fcgid_defaultini')]
: ((int) \Froxlor\Settings::Get('phpfpm.enabled') == 1 ? : ((int) \Froxlor\Settings::Get('phpfpm.enabled') == 1 ?
[\Froxlor\Settings::Get('phpfpm.defaultini')] [\Froxlor\Settings::Get('phpfpm.defaultini')]
: null)), : null)),
'is_array' => 1 'is_array' => 1
), ),
'perlenabled' => array( 'perlenabled' => array(

View File

@@ -48,13 +48,16 @@ return array(
'new_customer_password' => array( 'new_customer_password' => array(
'label' => $lng['login']['password'] . '&nbsp;(' . $lng['panel']['emptyfornochanges'] . ')', 'label' => $lng['login']['password'] . '&nbsp;(' . $lng['panel']['emptyfornochanges'] . ')',
'type' => 'password', 'type' => 'password',
'autocomplete' => 'off' 'autocomplete' => 'off',
), 'next_to' => [
'new_customer_password_suggestion' => array( 'new_customer_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'], 'next_to_prefix' => $lng['customer']['generated_pwd'] . ':',
'type' => 'text', 'type' => 'text',
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''), 'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System\Crypt::generatePassword() 'value' => \Froxlor\System\Crypt::generatePassword(),
'readonly' => true
)
]
), ),
'def_language' => array( 'def_language' => array(
'label' => $lng['login']['language'], 'label' => $lng['login']['language'],
@@ -110,14 +113,16 @@ return array(
'value' => $result['street'] 'value' => $result['street']
), ),
'zipcode' => array( 'zipcode' => array(
'label' => $lng['customer']['zipcode'], 'label' => $lng['customer']['zipcode'] . ' / ' . $lng['customer']['city'],
'type' => 'text', 'type' => 'text',
'value' => $result['zipcode'] 'value' => $result['zipcode'],
), 'next_to' => [
'city' => array( 'city' => array(
'label' => $lng['customer']['city'], 'next_to_prefix' => ' / ',
'type' => 'text', 'type' => 'text',
'value' => $result['city'] 'value' => $result['city']
)
]
), ),
'phone' => array( 'phone' => array(
'label' => $lng['customer']['phone'], 'label' => $lng['customer']['phone'],
@@ -158,7 +163,7 @@ return array(
) )
), ),
'section_cpre' => array( 'section_cpre' => array(
'visible' => ! empty($hosting_plans), 'visible' => !empty($hosting_plans),
'title' => $lng['admin']['plans']['use_plan'], 'title' => $lng['admin']['plans']['use_plan'],
'image' => 'icons/user_add.png', 'image' => 'icons/user_add.png',
'fields' => array( 'fields' => array(
@@ -261,7 +266,7 @@ return array(
'label' => $lng['admin']['phpsettings']['title'], 'label' => $lng['admin']['phpsettings']['title'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => $phpconfigs, 'values' => $phpconfigs,
'value' => isset($result['allowed_phpconfigs']) && ! empty($result['allowed_phpconfigs']) ? json_decode($result['allowed_phpconfigs'], JSON_OBJECT_AS_ARRAY) : array(), 'value' => isset($result['allowed_phpconfigs']) && !empty($result['allowed_phpconfigs']) ? json_decode($result['allowed_phpconfigs'], JSON_OBJECT_AS_ARRAY) : array(),
'is_array' => 1 'is_array' => 1
), ),
'perlenabled' => array( 'perlenabled' => array(

View File

@@ -17,7 +17,7 @@
return array( return array(
'domain_add' => array( 'domain_add' => array(
'title' => $lng['admin']['domain_add'], 'title' => $lng['admin']['domain_add'],
'image' => 'icons/domain_add.png', 'image' => 'fa-solid fa-globe',
'sections' => array( 'sections' => array(
'section_a' => array( 'section_a' => array(
'title' => $lng['domains']['domainsettings'], 'title' => $lng['domains']['domainsettings'],
@@ -56,15 +56,8 @@ return array(
'label' => $lng['admin']['domain_editable']['title'], 'label' => $lng['admin']['domain_editable']['title'],
'desc' => $lng['admin']['domain_editable']['desc'], 'desc' => $lng['admin']['domain_editable']['desc'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => true
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
'1'
)
), ),
'add_date' => array( 'add_date' => array(
'label' => $lng['domains']['add_date'], 'label' => $lng['domains']['add_date'],
@@ -115,17 +108,11 @@ return array(
'label' => $lng['admin']['speciallogfile']['title'], 'label' => $lng['admin']['speciallogfile']['title'],
'desc' => $lng['admin']['speciallogfile']['description'], 'desc' => $lng['admin']['speciallogfile']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => false
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array()
), ),
'specialsettings' => array( 'specialsettings' => array(
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false), 'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
'style' => 'align-top',
'label' => $lng['admin']['ownvhostsettings'], 'label' => $lng['admin']['ownvhostsettings'],
'desc' => $lng['serversettings']['default_vhostconf']['description'], 'desc' => $lng['serversettings']['default_vhostconf']['description'],
'type' => 'textarea', 'type' => 'textarea',
@@ -137,41 +124,22 @@ return array(
'label' => $lng['admin']['notryfiles']['title'], 'label' => $lng['admin']['notryfiles']['title'],
'desc' => $lng['admin']['notryfiles']['description'], 'desc' => $lng['admin']['notryfiles']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => false
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array()
), ),
'writeaccesslog' => array( 'writeaccesslog' => array(
'label' => $lng['admin']['writeaccesslog']['title'], 'label' => $lng['admin']['writeaccesslog']['title'],
'desc' => $lng['admin']['writeaccesslog']['description'], 'desc' => $lng['admin']['writeaccesslog']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => true
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
'1'
)
), ),
'writeerrorlog' => array( 'writeerrorlog' => array(
'label' => $lng['admin']['writeerrorlog']['title'], 'label' => $lng['admin']['writeerrorlog']['title'],
'desc' => $lng['admin']['writeerrorlog']['description'], 'desc' => $lng['admin']['writeerrorlog']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => true
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
'1'
)
) )
) )
), ),
@@ -184,15 +152,8 @@ return array(
'visible' => ($ssl_ipsandports != '' ? true : false), 'visible' => ($ssl_ipsandports != '' ? true : false),
'label' => $lng['admin']['domain_sslenabled'], 'label' => $lng['admin']['domain_sslenabled'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => true
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
'1'
)
), ),
'no_ssl_available_info' => array( 'no_ssl_available_info' => array(
'visible' => ($ssl_ipsandports == '' ? true : false), 'visible' => ($ssl_ipsandports == '' ? true : false),
@@ -213,51 +174,31 @@ return array(
'label' => $lng['domains']['ssl_redirect']['title'], 'label' => $lng['domains']['ssl_redirect']['title'],
'desc' => $lng['domains']['ssl_redirect']['description'], 'desc' => $lng['domains']['ssl_redirect']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => false
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array()
), ),
'letsencrypt' => array( 'letsencrypt' => array(
'visible' => (\Froxlor\Settings::Get('system.leenabled') == '1' ? ($ssl_ipsandports != '' ? true : false) : false), 'visible' => (\Froxlor\Settings::Get('system.leenabled') == '1' ? ($ssl_ipsandports != '' ? true : false) : false),
'label' => $lng['admin']['letsencrypt']['title'], 'label' => $lng['admin']['letsencrypt']['title'],
'desc' => $lng['admin']['letsencrypt']['description'], 'desc' => $lng['admin']['letsencrypt']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => false
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array()
), ),
'http2' => array( 'http2' => array(
'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.http2_support') == '1', 'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.http2_support') == '1',
'label' => $lng['admin']['domain_http2']['title'], 'label' => $lng['admin']['domain_http2']['title'],
'desc' => $lng['admin']['domain_http2']['description'], 'desc' => $lng['admin']['domain_http2']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => false
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array()
), ),
'override_tls' => array( 'override_tls' => array(
'visible' => (($ssl_ipsandports != '' ? true : false) && $userinfo['change_serversettings'] == '1' ? true : false), 'visible' => (($ssl_ipsandports != '' ? true : false) && $userinfo['change_serversettings'] == '1' ? true : false),
'label' => $lng['admin']['domain_override_tls'], 'label' => $lng['admin']['domain_override_tls'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => false
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array()
), ),
'ssl_protocols' => array( 'ssl_protocols' => array(
'visible' => (($ssl_ipsandports != '' ? true : false) && $userinfo['change_serversettings'] == '1' && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' ? true : false), 'visible' => (($ssl_ipsandports != '' ? true : false) && $userinfo['change_serversettings'] == '1' && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' ? true : false),
@@ -270,19 +211,19 @@ return array(
'values' => array( 'values' => array(
array( array(
'value' => 'TLSv1', 'value' => 'TLSv1',
'label' => 'TLSv1<br />' 'label' => 'TLSv1'
), ),
array( array(
'value' => 'TLSv1.1', 'value' => 'TLSv1.1',
'label' => 'TLSv1.1<br />' 'label' => 'TLSv1.1'
), ),
array( array(
'value' => 'TLSv1.2', 'value' => 'TLSv1.2',
'label' => 'TLSv1.2<br />' 'label' => 'TLSv1.2'
), ),
array( array(
'value' => 'TLSv1.3', 'value' => 'TLSv1.3',
'label' => 'TLSv1.3<br />' 'label' => 'TLSv1.3<'
) )
), ),
'is_array' => 1 'is_array' => 1
@@ -303,7 +244,6 @@ return array(
), ),
'ssl_specialsettings' => array( 'ssl_specialsettings' => array(
'visible' => (($ssl_ipsandports != '' ? true : false) && $userinfo['change_serversettings'] == '1' ? true : false), 'visible' => (($ssl_ipsandports != '' ? true : false) && $userinfo['change_serversettings'] == '1' ? true : false),
'style' => 'align-top',
'label' => $lng['admin']['ownsslvhostsettings'], 'label' => $lng['admin']['ownsslvhostsettings'],
'desc' => $lng['serversettings']['default_vhostconf']['description'], 'desc' => $lng['serversettings']['default_vhostconf']['description'],
'type' => 'textarea', 'type' => 'textarea',
@@ -314,21 +254,16 @@ return array(
'visible' => (($ssl_ipsandports != '' ? true : false) && $userinfo['change_serversettings'] == '1' ? true : false), 'visible' => (($ssl_ipsandports != '' ? true : false) && $userinfo['change_serversettings'] == '1' ? true : false),
'label' => $lng['admin']['include_ownvhostsettings'], 'label' => $lng['admin']['include_ownvhostsettings'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => false
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array()
), ),
'hsts_maxage' => array( 'hsts_maxage' => array(
'visible' => ($ssl_ipsandports != '' ? true : false), 'visible' => ($ssl_ipsandports != '' ? true : false),
'label' => $lng['admin']['domain_hsts_maxage']['title'], 'label' => $lng['admin']['domain_hsts_maxage']['title'],
'desc' => $lng['admin']['domain_hsts_maxage']['description'], 'desc' => $lng['admin']['domain_hsts_maxage']['description'],
'type' => 'int', 'type' => 'number',
'int_min' => 0, 'min' => 0,
'int_max' => 94608000, // 3-years 'max' => 94608000, // 3-years
'value' => 0 'value' => 0
), ),
'hsts_sub' => array( 'hsts_sub' => array(
@@ -336,65 +271,38 @@ return array(
'label' => $lng['admin']['domain_hsts_incsub']['title'], 'label' => $lng['admin']['domain_hsts_incsub']['title'],
'desc' => $lng['admin']['domain_hsts_incsub']['description'], 'desc' => $lng['admin']['domain_hsts_incsub']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => false
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array()
), ),
'hsts_preload' => array( 'hsts_preload' => array(
'visible' => ($ssl_ipsandports != '' ? true : false), 'visible' => ($ssl_ipsandports != '' ? true : false),
'label' => $lng['admin']['domain_hsts_preload']['title'], 'label' => $lng['admin']['domain_hsts_preload']['title'],
'desc' => $lng['admin']['domain_hsts_preload']['description'], 'desc' => $lng['admin']['domain_hsts_preload']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => false
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array()
), ),
'ocsp_stapling' => array( 'ocsp_stapling' => array(
'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd', 'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd',
'label' => $lng['admin']['domain_ocsp_stapling']['title'], 'label' => $lng['admin']['domain_ocsp_stapling']['title'],
'desc' => $lng['admin']['domain_ocsp_stapling']['description'] . (\Froxlor\Settings::Get('system.webserver') == 'nginx' ? $lng['admin']['domain_ocsp_stapling']['nginx_version_warning'] : ""), 'desc' => $lng['admin']['domain_ocsp_stapling']['description'] . (\Froxlor\Settings::Get('system.webserver') == 'nginx' ? $lng['admin']['domain_ocsp_stapling']['nginx_version_warning'] : ""),
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => false
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array()
), ),
'honorcipherorder' => array( 'honorcipherorder' => array(
'visible' => ($ssl_ipsandports != '' ? true : false), 'visible' => ($ssl_ipsandports != '' ? true : false),
'label' => $lng['admin']['domain_honorcipherorder'], 'label' => $lng['admin']['domain_honorcipherorder'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => false
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array()
), ),
'sessiontickets' => array( 'sessiontickets' => array(
'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.sessionticketsenabled' != '1'), 'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.sessionticketsenabled' != '1'),
'label' => $lng['admin']['domain_sessiontickets'], 'label' => $lng['admin']['domain_sessiontickets'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => true
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
'1'
)
) )
) )
), ),
@@ -406,44 +314,31 @@ return array(
'openbasedir' => array( 'openbasedir' => array(
'label' => 'OpenBasedir', 'label' => 'OpenBasedir',
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => true
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
'1'
)
), ),
'phpenabled' => array( 'phpenabled' => array(
'label' => $lng['admin']['phpenabled'], 'label' => $lng['admin']['phpenabled'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => true
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
'1'
)
), ),
'phpsettingid' => array( 'phpsettingid' => array(
'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1) ? true : false), 'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1) ? true : false),
'label' => $lng['admin']['phpsettings']['title'], 'label' => $lng['admin']['phpsettings']['title'],
'type' => 'select', 'type' => 'select',
'select_var' => $phpconfigs 'select_var' => $phpconfigs,
'selected' => '@TODO'
), ),
'mod_fcgid_starter' => array( 'mod_fcgid_starter' => array(
'visible' => ((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false), 'visible' => ((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'label' => $lng['admin']['mod_fcgid_starter']['title'], 'label' => $lng['admin']['mod_fcgid_starter']['title'],
'type' => 'text' 'type' => 'number'
), ),
'mod_fcgid_maxrequests' => array( 'mod_fcgid_maxrequests' => array(
'visible' => ((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false), 'visible' => ((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'label' => $lng['admin']['mod_fcgid_maxrequests']['title'], 'label' => $lng['admin']['mod_fcgid_maxrequests']['title'],
'type' => 'text' 'type' => 'number'
) )
) )
), ),
@@ -455,15 +350,8 @@ return array(
'isbinddomain' => array( 'isbinddomain' => array(
'label' => 'Nameserver', 'label' => 'Nameserver',
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => true
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
'1'
)
), ),
'zonefile' => array( 'zonefile' => array(
'label' => 'Zonefile', 'label' => 'Zonefile',
@@ -479,45 +367,27 @@ return array(
'isemaildomain' => array( 'isemaildomain' => array(
'label' => $lng['admin']['emaildomain'], 'label' => $lng['admin']['emaildomain'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => true
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
'1'
)
), ),
'email_only' => array( 'email_only' => array(
'label' => $lng['admin']['email_only'], 'label' => $lng['admin']['email_only'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => false
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array()
), ),
'subcanemaildomain' => array( 'subcanemaildomain' => array(
'label' => $lng['admin']['subdomainforemail'], 'label' => $lng['admin']['subdomainforemail'],
'type' => 'select', 'type' => 'select',
'select_var' => $subcanemaildomain 'select_var' => $subcanemaildomain,
'selected' => '@TODO'
), ),
'dkim' => array( 'dkim' => array(
'visible' => (\Froxlor\Settings::Get('dkim.use_dkim') == '1' ? true : false), 'visible' => (\Froxlor\Settings::Get('dkim.use_dkim') == '1' ? true : false),
'label' => 'DomainKeys', 'label' => 'DomainKeys',
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => true
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
'1'
)
) )
) )
) )

View File

@@ -17,7 +17,7 @@
return array( return array(
'domain_edit' => array( 'domain_edit' => array(
'title' => $lng['admin']['domain_edit'], 'title' => $lng['admin']['domain_edit'],
'image' => 'icons/domain_edit.png', 'image' => 'fa-solid fa-globe',
'sections' => array( 'sections' => array(
'section_a' => array( 'section_a' => array(
'title' => $lng['domains']['domainsettings'], 'title' => $lng['domains']['domainsettings'],
@@ -33,7 +33,7 @@ return array(
'label' => $lng['admin']['customer'], 'label' => $lng['admin']['customer'],
'type' => (\Froxlor\Settings::Get('panel.allow_domain_change_customer') == '1' ? 'select' : 'label'), 'type' => (\Froxlor\Settings::Get('panel.allow_domain_change_customer') == '1' ? 'select' : 'label'),
'select_var' => (isset($customers) ? $customers : null), 'select_var' => (isset($customers) ? $customers : null),
'value' => (isset($result['customername']) ? $result['customername'] : null), 'selected' => (isset($result['customername']) ? $result['customername'] : null),
'mandatory' => true 'mandatory' => true
), ),
'adminid' => array( 'adminid' => array(
@@ -41,20 +41,22 @@ return array(
'label' => $lng['admin']['admin'], 'label' => $lng['admin']['admin'],
'type' => (\Froxlor\Settings::Get('panel.allow_domain_change_admin') == '1' ? 'select' : 'label'), 'type' => (\Froxlor\Settings::Get('panel.allow_domain_change_admin') == '1' ? 'select' : 'label'),
'select_var' => (isset($admins) ? $admins : null), 'select_var' => (isset($admins) ? $admins : null),
'value' => (isset($result['adminname']) ? $result['adminname'] : null), 'selected' => (isset($result['adminname']) ? $result['adminname'] : null),
'mandatory' => true 'mandatory' => true
), ),
'alias' => array( 'alias' => array(
'visible' => ($alias_check == '0' ? true : false), 'visible' => ($alias_check == '0' ? true : false),
'label' => $lng['domains']['aliasdomain'], 'label' => $lng['domains']['aliasdomain'],
'type' => 'select', 'type' => 'select',
'select_var' => $domains 'select_var' => $domains,
'selected' => '@TODO'
), ),
'issubof' => array( 'issubof' => array(
'label' => $lng['domains']['issubof'], 'label' => $lng['domains']['issubof'],
'desc' => $lng['domains']['issubofinfo'], 'desc' => $lng['domains']['issubofinfo'],
'type' => 'select', 'type' => 'select',
'select_var' => $subtodomains 'select_var' => $subtodomains,
'selected' => '@TODO'
), ),
'associated_info' => array( 'associated_info' => array(
'label' => $lng['domains']['associated_with_domain'], 'label' => $lng['domains']['associated_with_domain'],
@@ -65,15 +67,8 @@ return array(
'label' => $lng['admin']['domain_editable']['title'], 'label' => $lng['admin']['domain_editable']['title'],
'desc' => $lng['admin']['domain_editable']['desc'], 'desc' => $lng['admin']['domain_editable']['desc'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['caneditdomain']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['caneditdomain']
)
), ),
'add_date' => array( 'add_date' => array(
'label' => $lng['domains']['add_date'], 'label' => $lng['domains']['add_date'],
@@ -121,25 +116,18 @@ return array(
'label' => $lng['admin']['selectserveralias'], 'label' => $lng['admin']['selectserveralias'],
'desc' => $lng['admin']['selectserveralias_desc'], 'desc' => $lng['admin']['selectserveralias_desc'],
'type' => 'select', 'type' => 'select',
'select_var' => $serveraliasoptions 'select_var' => $serveraliasoptions,
'selected' => '@TODO'
), ),
'speciallogfile' => array( 'speciallogfile' => array(
'label' => $lng['admin']['speciallogfile']['title'], 'label' => $lng['admin']['speciallogfile']['title'],
'desc' => $lng['admin']['speciallogfile']['description'], 'desc' => $lng['admin']['speciallogfile']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['speciallogfile']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['speciallogfile']
)
), ),
'specialsettings' => array( 'specialsettings' => array(
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false), 'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
'style' => 'align-top',
'label' => $lng['admin']['ownvhostsettings'], 'label' => $lng['admin']['ownvhostsettings'],
'desc' => $lng['serversettings']['default_vhostconf']['description'], 'desc' => $lng['serversettings']['default_vhostconf']['description'],
'type' => 'textarea', 'type' => 'textarea',
@@ -152,58 +140,30 @@ return array(
'label' => $lng['admin']['specialsettingsforsubdomains'], 'label' => $lng['admin']['specialsettingsforsubdomains'],
'desc' => $lng['serversettings']['specialsettingsforsubdomains']['description'], 'desc' => $lng['serversettings']['specialsettingsforsubdomains']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => \Froxlor\Settings::Get('system.apply_specialsettings_default') == 1 ? '1' : '0'
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
\Froxlor\Settings::Get('system.apply_specialsettings_default') == 1 ? '1' : ''
)
), ),
'notryfiles' => array( 'notryfiles' => array(
'visible' => (\Froxlor\Settings::Get('system.webserver') == 'nginx' && $userinfo['change_serversettings'] == '1'), 'visible' => (\Froxlor\Settings::Get('system.webserver') == 'nginx' && $userinfo['change_serversettings'] == '1'),
'label' => $lng['admin']['notryfiles']['title'], 'label' => $lng['admin']['notryfiles']['title'],
'desc' => $lng['admin']['notryfiles']['description'], 'desc' => $lng['admin']['notryfiles']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['notryfiles']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['notryfiles']
)
), ),
'writeaccesslog' => array( 'writeaccesslog' => array(
'label' => $lng['admin']['writeaccesslog']['title'], 'label' => $lng['admin']['writeaccesslog']['title'],
'desc' => $lng['admin']['writeaccesslog']['description'], 'desc' => $lng['admin']['writeaccesslog']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['writeaccesslog']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['writeaccesslog']
)
), ),
'writeerrorlog' => array( 'writeerrorlog' => array(
'label' => $lng['admin']['writeerrorlog']['title'], 'label' => $lng['admin']['writeerrorlog']['title'],
'desc' => $lng['admin']['writeerrorlog']['description'], 'desc' => $lng['admin']['writeerrorlog']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['writeerrorlog']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['writeerrorlog']
)
) )
) )
), ),
@@ -216,15 +176,8 @@ return array(
'visible' => ($ssl_ipsandports != '' ? true : false), 'visible' => ($ssl_ipsandports != '' ? true : false),
'label' => $lng['admin']['domain_sslenabled'], 'label' => $lng['admin']['domain_sslenabled'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['ssl_enabled']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['ssl_enabled']
)
), ),
'no_ssl_available_info' => array( 'no_ssl_available_info' => array(
'visible' => ($ssl_ipsandports == '' ? true : false), 'visible' => ($ssl_ipsandports == '' ? true : false),
@@ -245,59 +198,31 @@ return array(
'label' => $lng['domains']['ssl_redirect']['title'], 'label' => $lng['domains']['ssl_redirect']['title'],
'desc' => $lng['domains']['ssl_redirect']['description'] . ($result['temporary_ssl_redirect'] > 1 ? $lng['domains']['ssl_redirect_temporarilydisabled'] : ''), 'desc' => $lng['domains']['ssl_redirect']['description'] . ($result['temporary_ssl_redirect'] > 1 ? $lng['domains']['ssl_redirect_temporarilydisabled'] : ''),
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['ssl_redirect']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['ssl_redirect']
)
), ),
'letsencrypt' => array( 'letsencrypt' => array(
'visible' => (\Froxlor\Settings::Get('system.leenabled') == '1' ? ($ssl_ipsandports != '' ? true : false) : false), 'visible' => (\Froxlor\Settings::Get('system.leenabled') == '1' ? ($ssl_ipsandports != '' ? true : false) : false),
'label' => $lng['admin']['letsencrypt']['title'], 'label' => $lng['admin']['letsencrypt']['title'],
'desc' => $lng['admin']['letsencrypt']['description'], 'desc' => $lng['admin']['letsencrypt']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['letsencrypt']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['letsencrypt']
)
), ),
'http2' => array( 'http2' => array(
'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.http2_support') == '1', 'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.http2_support') == '1',
'label' => $lng['admin']['domain_http2']['title'], 'label' => $lng['admin']['domain_http2']['title'],
'desc' => $lng['admin']['domain_http2']['description'], 'desc' => $lng['admin']['domain_http2']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['http2']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['http2']
)
), ),
'override_tls' => array( 'override_tls' => array(
'visible' => (($ssl_ipsandports != '' ? true : false) && $userinfo['change_serversettings'] == '1' ? true : false), 'visible' => (($ssl_ipsandports != '' ? true : false) && $userinfo['change_serversettings'] == '1' ? true : false),
'label' => $lng['admin']['domain_override_tls'], 'label' => $lng['admin']['domain_override_tls'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['override_tls']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['override_tls']
)
), ),
'ssl_protocols' => array( 'ssl_protocols' => array(
'visible' => (($ssl_ipsandports != '' ? true : false) && $userinfo['change_serversettings'] == '1' && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' ? true : false), 'visible' => (($ssl_ipsandports != '' ? true : false) && $userinfo['change_serversettings'] == '1' && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' ? true : false),
@@ -308,19 +233,19 @@ return array(
'values' => array( 'values' => array(
array( array(
'value' => 'TLSv1', 'value' => 'TLSv1',
'label' => 'TLSv1<br />' 'label' => 'TLSv1'
), ),
array( array(
'value' => 'TLSv1.1', 'value' => 'TLSv1.1',
'label' => 'TLSv1.1<br />' 'label' => 'TLSv1.1'
), ),
array( array(
'value' => 'TLSv1.2', 'value' => 'TLSv1.2',
'label' => 'TLSv1.2<br />' 'label' => 'TLSv1.2'
), ),
array( array(
'value' => 'TLSv1.3', 'value' => 'TLSv1.3',
'label' => 'TLSv1.3<br />' 'label' => 'TLSv1.3'
) )
), ),
'is_array' => 1 'is_array' => 1
@@ -341,7 +266,6 @@ return array(
), ),
'ssl_specialsettings' => array( 'ssl_specialsettings' => array(
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false), 'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
'style' => 'align-top',
'label' => $lng['admin']['ownsslvhostsettings'], 'label' => $lng['admin']['ownsslvhostsettings'],
'desc' => $lng['serversettings']['default_vhostconf']['description'], 'desc' => $lng['serversettings']['default_vhostconf']['description'],
'type' => 'textarea', 'type' => 'textarea',
@@ -352,23 +276,16 @@ return array(
'include_specialsettings' => array( 'include_specialsettings' => array(
'label' => $lng['admin']['include_ownvhostsettings'], 'label' => $lng['admin']['include_ownvhostsettings'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['include_specialsettings']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['include_specialsettings']
)
), ),
'hsts_maxage' => array( 'hsts_maxage' => array(
'visible' => ($ssl_ipsandports != '' ? true : false), 'visible' => ($ssl_ipsandports != '' ? true : false),
'label' => $lng['admin']['domain_hsts_maxage']['title'], 'label' => $lng['admin']['domain_hsts_maxage']['title'],
'desc' => $lng['admin']['domain_hsts_maxage']['description'], 'desc' => $lng['admin']['domain_hsts_maxage']['description'],
'type' => 'int', 'type' => 'number',
'int_min' => 0, 'min' => 0,
'int_max' => 94608000, // 3-years 'max' => 94608000, // 3-years
'value' => $result['hsts'] 'value' => $result['hsts']
), ),
'hsts_sub' => array( 'hsts_sub' => array(
@@ -376,73 +293,38 @@ return array(
'label' => $lng['admin']['domain_hsts_incsub']['title'], 'label' => $lng['admin']['domain_hsts_incsub']['title'],
'desc' => $lng['admin']['domain_hsts_incsub']['description'], 'desc' => $lng['admin']['domain_hsts_incsub']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['hsts_sub']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['hsts_sub']
)
), ),
'hsts_preload' => array( 'hsts_preload' => array(
'visible' => ($ssl_ipsandports != '' ? true : false), 'visible' => ($ssl_ipsandports != '' ? true : false),
'label' => $lng['admin']['domain_hsts_preload']['title'], 'label' => $lng['admin']['domain_hsts_preload']['title'],
'desc' => $lng['admin']['domain_hsts_preload']['description'], 'desc' => $lng['admin']['domain_hsts_preload']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['hsts_preload']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['hsts_preload']
)
), ),
'ocsp_stapling' => array( 'ocsp_stapling' => array(
'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd', 'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd',
'label' => $lng['admin']['domain_ocsp_stapling']['title'], 'label' => $lng['admin']['domain_ocsp_stapling']['title'],
'desc' => $lng['admin']['domain_ocsp_stapling']['description'] . (\Froxlor\Settings::Get('system.webserver') == 'nginx' ? $lng['admin']['domain_ocsp_stapling']['nginx_version_warning'] : ""), 'desc' => $lng['admin']['domain_ocsp_stapling']['description'] . (\Froxlor\Settings::Get('system.webserver') == 'nginx' ? $lng['admin']['domain_ocsp_stapling']['nginx_version_warning'] : ""),
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['ocsp_stapling']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['ocsp_stapling']
)
), ),
'honorcipherorder' => array( 'honorcipherorder' => array(
'visible' => ($ssl_ipsandports != '' ? true : false), 'visible' => ($ssl_ipsandports != '' ? true : false),
'label' => $lng['admin']['domain_honorcipherorder'], 'label' => $lng['admin']['domain_honorcipherorder'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['ssl_honorcipherorder']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['ssl_honorcipherorder']
)
), ),
'sessiontickets' => array( 'sessiontickets' => array(
'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.sessionticketsenabled' != '1'), 'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.sessionticketsenabled' != '1'),
'label' => $lng['admin']['domain_sessiontickets'], 'label' => $lng['admin']['domain_sessiontickets'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['ssl_sessiontickets']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['ssl_sessiontickets']
)
) )
) )
), ),
@@ -454,60 +336,40 @@ return array(
'openbasedir' => array( 'openbasedir' => array(
'label' => 'OpenBasedir', 'label' => 'OpenBasedir',
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['openbasedir']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['openbasedir']
)
), ),
'phpenabled' => array( 'phpenabled' => array(
'label' => $lng['admin']['phpenabled'], 'label' => $lng['admin']['phpenabled'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['phpenabled']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['phpenabled']
)
), ),
'phpsettingid' => array( 'phpsettingid' => array(
'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1) ? true : false), 'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1) ? true : false),
'label' => $lng['admin']['phpsettings']['title'], 'label' => $lng['admin']['phpsettings']['title'],
'type' => 'select', 'type' => 'select',
'select_var' => $phpconfigs 'select_var' => $phpconfigs,
'selected' => '@TODO'
), ),
'phpsettingsforsubdomains' => array( 'phpsettingsforsubdomains' => array(
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false), 'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
'label' => $lng['admin']['phpsettingsforsubdomains'], 'label' => $lng['admin']['phpsettingsforsubdomains'],
'desc' => $lng['serversettings']['phpsettingsforsubdomains']['description'], 'desc' => $lng['serversettings']['phpsettingsforsubdomains']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => \Froxlor\Settings::Get('system.apply_phpconfigs_default') == 1 ? '1' : '0'
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
\Froxlor\Settings::Get('system.apply_phpconfigs_default') == 1 ? '1' : ''
)
), ),
'mod_fcgid_starter' => array( 'mod_fcgid_starter' => array(
'visible' => ((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false), 'visible' => ((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'label' => $lng['admin']['mod_fcgid_starter']['title'], 'label' => $lng['admin']['mod_fcgid_starter']['title'],
'type' => 'text', 'type' => 'number',
'value' => ((int) $result['mod_fcgid_starter'] != - 1 ? $result['mod_fcgid_starter'] : '') 'value' => ((int) $result['mod_fcgid_starter'] != - 1 ? $result['mod_fcgid_starter'] : '')
), ),
'mod_fcgid_maxrequests' => array( 'mod_fcgid_maxrequests' => array(
'visible' => ((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false), 'visible' => ((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'label' => $lng['admin']['mod_fcgid_maxrequests']['title'], 'label' => $lng['admin']['mod_fcgid_maxrequests']['title'],
'type' => 'text', 'type' => 'number',
'value' => ((int) $result['mod_fcgid_maxrequests'] != - 1 ? $result['mod_fcgid_maxrequests'] : '') 'value' => ((int) $result['mod_fcgid_maxrequests'] != - 1 ? $result['mod_fcgid_maxrequests'] : '')
) )
) )
@@ -520,15 +382,8 @@ return array(
'isbinddomain' => array( 'isbinddomain' => array(
'label' => 'Nameserver', 'label' => 'Nameserver',
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['isbinddomain']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['isbinddomain']
)
), ),
'zonefile' => array( 'zonefile' => array(
'label' => 'Zonefile', 'label' => 'Zonefile',
@@ -545,47 +400,27 @@ return array(
'isemaildomain' => array( 'isemaildomain' => array(
'label' => $lng['admin']['emaildomain'], 'label' => $lng['admin']['emaildomain'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['isemaildomain']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['isemaildomain']
)
), ),
'email_only' => array( 'email_only' => array(
'label' => $lng['admin']['email_only'], 'label' => $lng['admin']['email_only'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['email_only']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['email_only']
)
), ),
'subcanemaildomain' => array( 'subcanemaildomain' => array(
'label' => $lng['admin']['subdomainforemail'], 'label' => $lng['admin']['subdomainforemail'],
'type' => 'select', 'type' => 'select',
'select_var' => $subcanemaildomain 'select_var' => $subcanemaildomain,
'selected' => '@TODO'
), ),
'dkim' => array( 'dkim' => array(
'visible' => (\Froxlor\Settings::Get('dkim.use_dkim') == '1' ? true : false), 'visible' => (\Froxlor\Settings::Get('dkim.use_dkim') == '1' ? true : false),
'label' => 'DomainKeys', 'label' => 'DomainKeys',
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['dkim']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['dkim']
)
) )
) )
) )

View File

@@ -17,7 +17,7 @@
return array( return array(
'domain_import' => array( 'domain_import' => array(
'title' => $lng['domains']['domain_import'], 'title' => $lng['domains']['domain_import'],
'image' => 'icons/domain_add.png', 'image' => 'fa-solid fa-file-import',
'sections' => array( 'sections' => array(
'section_a' => array( 'section_a' => array(
'title' => $lng['domains']['domain_import'], 'title' => $lng['domains']['domain_import'],

View File

@@ -17,7 +17,7 @@
return array( return array(
'fpmconfig_add' => array( 'fpmconfig_add' => array(
'title' => $lng['admin']['phpsettings']['addsettings'], 'title' => $lng['admin']['phpsettings']['addsettings'],
'image' => 'icons/phpsettings_add.png', 'image' => 'fa-solid fa-plus',
'sections' => array( 'sections' => array(
'section_a' => array( 'section_a' => array(
'title' => $lng['admin']['phpsettings']['addsettings'], 'title' => $lng['admin']['phpsettings']['addsettings'],
@@ -32,53 +32,56 @@ return array(
'label' => $lng['serversettings']['phpfpm_settings']['reload'], 'label' => $lng['serversettings']['phpfpm_settings']['reload'],
'type' => 'text', 'type' => 'text',
'maxlength' => 255, 'maxlength' => 255,
'value' => 'service php7.3-fpm restart' 'value' => 'service php7.4-fpm restart'
), ),
'config_dir' => array( 'config_dir' => array(
'label' => $lng['serversettings']['phpfpm_settings']['configdir'], 'label' => $lng['serversettings']['phpfpm_settings']['configdir'],
'type' => 'text', 'type' => 'text',
'maxlength' => 255, 'maxlength' => 255,
'value' => '/etc/php/7.3/fpm/pool.d/' 'value' => '/etc/php/7.4/fpm/pool.d/'
), ),
'pm' => array( 'pm' => array(
'label' => $lng['serversettings']['phpfpm_settings']['pm'], 'label' => $lng['serversettings']['phpfpm_settings']['pm'],
'type' => 'select', 'type' => 'select',
'select_var' => $pm_select 'select_var' => $pm_select,
'selected' => '@TODO'
), ),
'max_children' => array( 'max_children' => array(
'label' => $lng['serversettings']['phpfpm_settings']['max_children']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['max_children']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_children']['description'], 'desc' => $lng['serversettings']['phpfpm_settings']['max_children']['description'],
'type' => 'int', 'type' => 'number',
'value' => 5 'value' => 5,
'min' => 1
), ),
'start_servers' => array( 'start_servers' => array(
'label' => $lng['serversettings']['phpfpm_settings']['start_servers']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['start_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['start_servers']['description'], 'desc' => $lng['serversettings']['phpfpm_settings']['start_servers']['description'],
'type' => 'int', 'type' => 'number',
'value' => 2 'value' => 2,
'min' => 1
), ),
'min_spare_servers' => array( 'min_spare_servers' => array(
'label' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['description'], 'desc' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['description'],
'type' => 'int', 'type' => 'number',
'value' => 1 'value' => 1
), ),
'max_spare_servers' => array( 'max_spare_servers' => array(
'label' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['description'], 'desc' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['description'],
'type' => 'int', 'type' => 'number',
'value' => 3 'value' => 3
), ),
'max_requests' => array( 'max_requests' => array(
'label' => $lng['serversettings']['phpfpm_settings']['max_requests']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['max_requests']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_requests']['description'], 'desc' => $lng['serversettings']['phpfpm_settings']['max_requests']['description'],
'type' => 'int', 'type' => 'number',
'value' => 0 'value' => 0
), ),
'idle_timeout' => array( 'idle_timeout' => array(
'label' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['description'], 'desc' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['description'],
'type' => 'int', 'type' => 'number',
'value' => 10 'value' => 10
), ),
'limit_extensions' => array( 'limit_extensions' => array(

View File

@@ -17,7 +17,7 @@
return array( return array(
'fpmconfig_edit' => array( 'fpmconfig_edit' => array(
'title' => $lng['admin']['phpsettings']['editsettings'], 'title' => $lng['admin']['phpsettings']['editsettings'],
'image' => 'icons/phpsettings_edit.png', 'image' => 'fa-solid fa-pen',
'sections' => array( 'sections' => array(
'section_a' => array( 'section_a' => array(
'title' => $lng['admin']['phpsettings']['editsettings'], 'title' => $lng['admin']['phpsettings']['editsettings'],
@@ -44,42 +44,45 @@ return array(
'pm' => array( 'pm' => array(
'label' => $lng['serversettings']['phpfpm_settings']['pm'], 'label' => $lng['serversettings']['phpfpm_settings']['pm'],
'type' => 'select', 'type' => 'select',
'select_var' => $pm_select 'select_var' => $pm_select,
'selected' => '@TODO'
), ),
'max_children' => array( 'max_children' => array(
'label' => $lng['serversettings']['phpfpm_settings']['max_children']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['max_children']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_children']['description'], 'desc' => $lng['serversettings']['phpfpm_settings']['max_children']['description'],
'type' => 'int', 'type' => 'number',
'value' => $result['max_children'] 'value' => $result['max_children'],
'min' => 1
), ),
'start_servers' => array( 'start_servers' => array(
'label' => $lng['serversettings']['phpfpm_settings']['start_servers']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['start_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['start_servers']['description'], 'desc' => $lng['serversettings']['phpfpm_settings']['start_servers']['description'],
'type' => 'int', 'type' => 'number',
'value' => $result['start_servers'] 'value' => $result['start_servers'],
'min' => 1
), ),
'min_spare_servers' => array( 'min_spare_servers' => array(
'label' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['description'], 'desc' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['description'],
'type' => 'int', 'type' => 'number',
'value' => $result['min_spare_servers'] 'value' => $result['min_spare_servers']
), ),
'max_spare_servers' => array( 'max_spare_servers' => array(
'label' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['description'], 'desc' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['description'],
'type' => 'int', 'type' => 'number',
'value' => $result['max_spare_servers'] 'value' => $result['max_spare_servers']
), ),
'max_requests' => array( 'max_requests' => array(
'label' => $lng['serversettings']['phpfpm_settings']['max_requests']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['max_requests']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_requests']['description'], 'desc' => $lng['serversettings']['phpfpm_settings']['max_requests']['description'],
'type' => 'int', 'type' => 'number',
'value' => $result['max_requests'] 'value' => $result['max_requests']
), ),
'idle_timeout' => array( 'idle_timeout' => array(
'label' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['description'], 'desc' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['description'],
'type' => 'int', 'type' => 'number',
'value' => $result['idle_timeout'] 'value' => $result['idle_timeout']
), ),
'limit_extensions' => array( 'limit_extensions' => array(

View File

@@ -17,7 +17,7 @@
return array( return array(
'phpconfig_add' => array( 'phpconfig_add' => array(
'title' => $lng['admin']['phpsettings']['addsettings'], 'title' => $lng['admin']['phpsettings']['addsettings'],
'image' => 'icons/phpsettings_add.png', 'image' => 'fa-solid fa-plus',
'sections' => array( 'sections' => array(
'section_a' => array( 'section_a' => array(
'title' => $lng['admin']['phpsettings']['addsettings'], 'title' => $lng['admin']['phpsettings']['addsettings'],
@@ -39,7 +39,8 @@ return array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['admin']['phpsettings']['fpmdesc'], 'label' => $lng['admin']['phpsettings']['fpmdesc'],
'type' => 'select', 'type' => 'select',
'select_var' => $fpmconfigs 'select_var' => $fpmconfigs,
'selected' => '@TODO'
), ),
'file_extensions' => array( 'file_extensions' => array(
'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
@@ -52,12 +53,12 @@ return array(
'mod_fcgid_starter' => array( 'mod_fcgid_starter' => array(
'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'label' => $lng['admin']['mod_fcgid_starter']['title'], 'label' => $lng['admin']['mod_fcgid_starter']['title'],
'type' => 'text' 'type' => 'number'
), ),
'mod_fcgid_maxrequests' => array( 'mod_fcgid_maxrequests' => array(
'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'label' => $lng['admin']['mod_fcgid_maxrequests']['title'], 'label' => $lng['admin']['mod_fcgid_maxrequests']['title'],
'type' => 'text' 'type' => 'number'
), ),
'mod_fcgid_umask' => array( 'mod_fcgid_umask' => array(
'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
@@ -70,13 +71,8 @@ return array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['admin']['phpsettings']['enable_slowlog'], 'label' => $lng['admin']['phpsettings']['enable_slowlog'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => false
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array()
), ),
'phpfpm_reqtermtimeout' => array( 'phpfpm_reqtermtimeout' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
@@ -96,73 +92,64 @@ return array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['admin']['phpsettings']['pass_authorizationheader'], 'label' => $lng['admin']['phpsettings']['pass_authorizationheader'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => false
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array()
), ),
'override_fpmconfig' => array( 'override_fpmconfig' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig'], 'label' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => false
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array()
), ),
'pm' => array( 'pm' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['pm'], 'label' => $lng['serversettings']['phpfpm_settings']['pm'],
'desc' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'], 'desc' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'select', 'type' => 'select',
'select_var' => $pm_select 'select_var' => $pm_select,
'selected' => '@TODO'
), ),
'max_children' => array( 'max_children' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['max_children']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['max_children']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_children']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'], 'desc' => $lng['serversettings']['phpfpm_settings']['max_children']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int', 'type' => 'number',
'value' => 1 'value' => 1
), ),
'start_servers' => array( 'start_servers' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['start_servers']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['start_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['start_servers']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'], 'desc' => $lng['serversettings']['phpfpm_settings']['start_servers']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int', 'type' => 'number',
'value' => 20 'value' => 20
), ),
'min_spare_servers' => array( 'min_spare_servers' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'], 'desc' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int', 'type' => 'number',
'value' => 5 'value' => 5
), ),
'max_spare_servers' => array( 'max_spare_servers' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'], 'desc' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int', 'type' => 'number',
'value' => 35 'value' => 35
), ),
'max_requests' => array( 'max_requests' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['max_requests']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['max_requests']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_requests']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'], 'desc' => $lng['serversettings']['phpfpm_settings']['max_requests']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int', 'type' => 'number',
'value' => 0 'value' => 0
), ),
'idle_timeout' => array( 'idle_timeout' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'], 'desc' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int', 'type' => 'number',
'value' => 10 'value' => 10
), ),
'limit_extensions' => array( 'limit_extensions' => array(
@@ -173,7 +160,6 @@ return array(
'value' => '.php' 'value' => '.php'
), ),
'phpsettings' => array( 'phpsettings' => array(
'style' => 'align-top',
'label' => $lng['admin']['phpsettings']['phpinisettings'], 'label' => $lng['admin']['phpsettings']['phpinisettings'],
'type' => 'textarea', 'type' => 'textarea',
'cols' => 80, 'cols' => 80,
@@ -184,13 +170,8 @@ return array(
'label' => $lng['serversettings']['phpfpm_settings']['allow_all_customers']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['allow_all_customers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['allow_all_customers']['description'], 'desc' => $lng['serversettings']['phpfpm_settings']['allow_all_customers']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => false
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array()
) )
) )
) )

View File

@@ -17,7 +17,7 @@
return array( return array(
'phpconfig_edit' => array( 'phpconfig_edit' => array(
'title' => $lng['admin']['phpsettings']['editsettings'], 'title' => $lng['admin']['phpsettings']['editsettings'],
'image' => 'icons/phpsettings_edit.png', 'image' => 'fa-solid fa-pen',
'sections' => array( 'sections' => array(
'section_a' => array( 'section_a' => array(
'title' => $lng['admin']['phpsettings']['editsettings'], 'title' => $lng['admin']['phpsettings']['editsettings'],
@@ -40,7 +40,8 @@ return array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['admin']['phpsettings']['fpmdesc'], 'label' => $lng['admin']['phpsettings']['fpmdesc'],
'type' => 'select', 'type' => 'select',
'select_var' => $fpmconfigs 'select_var' => $fpmconfigs,
'selected' => '@TODO'
), ),
'file_extensions' => array( 'file_extensions' => array(
'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
@@ -53,13 +54,13 @@ return array(
'mod_fcgid_starter' => array( 'mod_fcgid_starter' => array(
'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'label' => $lng['admin']['mod_fcgid_starter']['title'], 'label' => $lng['admin']['mod_fcgid_starter']['title'],
'type' => 'text', 'type' => 'number',
'value' => ((int) $result['mod_fcgid_starter'] != - 1 ? $result['mod_fcgid_starter'] : '') 'value' => ((int) $result['mod_fcgid_starter'] != - 1 ? $result['mod_fcgid_starter'] : '')
), ),
'mod_fcgid_maxrequests' => array( 'mod_fcgid_maxrequests' => array(
'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'label' => $lng['admin']['mod_fcgid_maxrequests']['title'], 'label' => $lng['admin']['mod_fcgid_maxrequests']['title'],
'type' => 'text', 'type' => 'number',
'value' => ((int) $result['mod_fcgid_maxrequests'] != - 1 ? $result['mod_fcgid_maxrequests'] : '') 'value' => ((int) $result['mod_fcgid_maxrequests'] != - 1 ? $result['mod_fcgid_maxrequests'] : '')
), ),
'mod_fcgid_umask' => array( 'mod_fcgid_umask' => array(
@@ -73,15 +74,8 @@ return array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['admin']['phpsettings']['enable_slowlog'], 'label' => $lng['admin']['phpsettings']['enable_slowlog'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['fpm_slowlog']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['fpm_slowlog']
)
), ),
'phpfpm_reqtermtimeout' => array( 'phpfpm_reqtermtimeout' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
@@ -101,76 +95,63 @@ return array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['admin']['phpsettings']['pass_authorizationheader'], 'label' => $lng['admin']['phpsettings']['pass_authorizationheader'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['pass_authorizationheader']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['pass_authorizationheader']
)
), ),
'override_fpmconfig' => array( 'override_fpmconfig' => array(
'label' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig'], 'label' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['override_fpmconfig']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['override_fpmconfig']
)
), ),
'pm' => array( 'pm' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['pm'], 'label' => $lng['serversettings']['phpfpm_settings']['pm'],
'desc' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'], 'desc' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'select', 'type' => 'select',
'select_var' => $pm_select 'select_var' => $pm_select,
'selected' => '@TODO'
), ),
'max_children' => array( 'max_children' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['max_children']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['max_children']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_children']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'], 'desc' => $lng['serversettings']['phpfpm_settings']['max_children']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int', 'type' => 'number',
'value' => $result['max_children'] 'value' => $result['max_children']
), ),
'start_servers' => array( 'start_servers' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['start_servers']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['start_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['start_servers']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'], 'desc' => $lng['serversettings']['phpfpm_settings']['start_servers']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int', 'type' => 'number',
'value' => $result['start_servers'] 'value' => $result['start_servers']
), ),
'min_spare_servers' => array( 'min_spare_servers' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'], 'desc' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int', 'type' => 'number',
'value' => $result['min_spare_servers'] 'value' => $result['min_spare_servers']
), ),
'max_spare_servers' => array( 'max_spare_servers' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'], 'desc' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int', 'type' => 'number',
'value' => $result['max_spare_servers'] 'value' => $result['max_spare_servers']
), ),
'max_requests' => array( 'max_requests' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['max_requests']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['max_requests']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_requests']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'], 'desc' => $lng['serversettings']['phpfpm_settings']['max_requests']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int', 'type' => 'number',
'value' => $result['max_requests'] 'value' => $result['max_requests']
), ),
'idle_timeout' => array( 'idle_timeout' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'], 'desc' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int', 'type' => 'number',
'value' => $result['idle_timeout'] 'value' => $result['idle_timeout']
), ),
'limit_extensions' => array( 'limit_extensions' => array(
@@ -181,7 +162,6 @@ return array(
'value' => $result['limit_extensions'] 'value' => $result['limit_extensions']
), ),
'phpsettings' => array( 'phpsettings' => array(
'style' => 'align-top',
'label' => $lng['admin']['phpsettings']['phpinisettings'], 'label' => $lng['admin']['phpsettings']['phpinisettings'],
'type' => 'textarea', 'type' => 'textarea',
'cols' => 80, 'cols' => 80,
@@ -192,13 +172,8 @@ return array(
'label' => $lng['serversettings']['phpfpm_settings']['allow_all_customers']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['allow_all_customers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['allow_all_customers']['description'], 'desc' => $lng['serversettings']['phpfpm_settings']['allow_all_customers']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => false
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array()
) )
) )
) )

View File

@@ -17,7 +17,7 @@
return array( return array(
'plans_add' => array( 'plans_add' => array(
'title' => $lng['admin']['plans']['add'], 'title' => $lng['admin']['plans']['add'],
'image' => 'icons/templates_add_big.png', 'image' => 'fa-solid fa-plus',
'sections' => array( 'sections' => array(
'section_a' => array( 'section_a' => array(
'title' => $lng['admin']['plans']['plan_details'], 'title' => $lng['admin']['plans']['plan_details'],

View File

@@ -17,7 +17,7 @@
return array( return array(
'plans_edit' => array( 'plans_edit' => array(
'title' => $lng['admin']['plans']['edit'], 'title' => $lng['admin']['plans']['edit'],
'image' => 'icons/templates_edit_big.png', 'image' => 'fa-solid fa-pen',
'sections' => array( 'sections' => array(
'section_a' => array( 'section_a' => array(
'title' => $lng['admin']['plans']['plan_details'], 'title' => $lng['admin']['plans']['plan_details'],

View File

@@ -17,7 +17,7 @@
return array( return array(
'filetemplate_add' => array( 'filetemplate_add' => array(
'title' => $lng['admin']['templates']['template_add'], 'title' => $lng['admin']['templates']['template_add'],
'image' => 'icons/templates_add.png', 'image' => 'fa-solid fa-plus',
'sections' => array( 'sections' => array(
'section_a' => array( 'section_a' => array(
'title' => $lng['admin']['templates']['template_add'], 'title' => $lng['admin']['templates']['template_add'],
@@ -26,7 +26,8 @@ return array(
'template' => array( 'template' => array(
'label' => $lng['admin']['templates']['action'], 'label' => $lng['admin']['templates']['action'],
'type' => 'select', 'type' => 'select',
'select_var' => $free_templates 'select_var' => $free_templates,
'selected' => '@TODO'
), ),
'filecontent' => array( 'filecontent' => array(
'label' => $lng['admin']['templates']['filecontent'], 'label' => $lng['admin']['templates']['filecontent'],

View File

@@ -17,7 +17,7 @@
return array( return array(
'filetemplate_edit' => array( 'filetemplate_edit' => array(
'title' => $lng['admin']['templates']['template_edit'], 'title' => $lng['admin']['templates']['template_edit'],
'image' => 'icons/templates_edit.png', 'image' => 'fa-solid fa-pen',
'sections' => array( 'sections' => array(
'section_a' => array( 'section_a' => array(
'title' => $lng['admin']['templates']['template_edit'], 'title' => $lng['admin']['templates']['template_edit'],

View File

@@ -17,7 +17,7 @@
return array( return array(
'template_add' => array( 'template_add' => array(
'title' => $lng['admin']['templates']['template_add'], 'title' => $lng['admin']['templates']['template_add'],
'image' => 'icons/templates_add.png', 'image' => 'fa-solid fa-plus',
'sections' => array( 'sections' => array(
'section_a' => array( 'section_a' => array(
'title' => $lng['admin']['templates']['template_add'], 'title' => $lng['admin']['templates']['template_add'],

View File

@@ -17,7 +17,7 @@
return array( return array(
'template_edit' => array( 'template_edit' => array(
'title' => $lng['admin']['templates']['template_edit'], 'title' => $lng['admin']['templates']['template_edit'],
'image' => 'icons/templates_edit.png', 'image' => 'fa-solid fa-pen',
'sections' => array( 'sections' => array(
'section_a' => array( 'section_a' => array(
'title' => $lng['admin']['templates']['template_edit'], 'title' => $lng['admin']['templates']['template_edit'],

View File

@@ -17,7 +17,7 @@
return array( return array(
'domain_ssleditor' => array( 'domain_ssleditor' => array(
'title' => $lng['panel']['ssleditor'], 'title' => $lng['panel']['ssleditor'],
'image' => 'icons/ssl.png', 'image' => 'fa-solid fa-lock',
'sections' => array( 'sections' => array(
'section_a' => array( 'section_a' => array(
'title' => 'SSL certificates', 'title' => 'SSL certificates',
@@ -30,7 +30,6 @@ return array(
'display' => $result_domain['domain'] 'display' => $result_domain['domain']
), ),
'ssl_cert_file' => array( 'ssl_cert_file' => array(
'style' => 'align-top',
'label' => $lng['admin']['ipsandports']['ssl_cert_file_content'], 'label' => $lng['admin']['ipsandports']['ssl_cert_file_content'],
'desc' => $lng['admin']['ipsandports']['ssl_paste_description'], 'desc' => $lng['admin']['ipsandports']['ssl_paste_description'],
'type' => 'textarea', 'type' => 'textarea',
@@ -39,7 +38,6 @@ return array(
'value' => $result['ssl_cert_file'] 'value' => $result['ssl_cert_file']
), ),
'ssl_key_file' => array( 'ssl_key_file' => array(
'style' => 'align-top',
'label' => $lng['admin']['ipsandports']['ssl_key_file_content'], 'label' => $lng['admin']['ipsandports']['ssl_key_file_content'],
'desc' => $lng['admin']['ipsandports']['ssl_paste_description'], 'desc' => $lng['admin']['ipsandports']['ssl_paste_description'],
'type' => 'textarea', 'type' => 'textarea',
@@ -48,7 +46,6 @@ return array(
'value' => $result['ssl_key_file'] 'value' => $result['ssl_key_file']
), ),
'ssl_cert_chainfile' => array( 'ssl_cert_chainfile' => array(
'style' => 'align-top',
'label' => $lng['admin']['ipsandports']['ssl_cert_chainfile_content'], 'label' => $lng['admin']['ipsandports']['ssl_cert_chainfile_content'],
'desc' => $lng['admin']['ipsandports']['ssl_paste_description'] . $lng['admin']['ipsandports']['ssl_cert_chainfile_content_desc'], 'desc' => $lng['admin']['ipsandports']['ssl_paste_description'] . $lng['admin']['ipsandports']['ssl_cert_chainfile_content_desc'],
'type' => 'textarea', 'type' => 'textarea',
@@ -57,7 +54,6 @@ return array(
'value' => $result['ssl_cert_chainfile'] 'value' => $result['ssl_cert_chainfile']
), ),
'ssl_ca_file' => array( 'ssl_ca_file' => array(
'style' => 'align-top',
'label' => $lng['admin']['ipsandports']['ssl_ca_file_content'], 'label' => $lng['admin']['ipsandports']['ssl_ca_file_content'],
'desc' => $lng['admin']['ipsandports']['ssl_paste_description'] . $lng['admin']['ipsandports']['ssl_ca_file_content_desc'], 'desc' => $lng['admin']['ipsandports']['ssl_paste_description'] . $lng['admin']['ipsandports']['ssl_ca_file_content_desc'],
'type' => 'textarea', 'type' => 'textarea',

View File

@@ -17,7 +17,7 @@
return array( return array(
'domain_add' => array( 'domain_add' => array(
'title' => $lng['domains']['subdomain_add'], 'title' => $lng['domains']['subdomain_add'],
'image' => 'icons/domain_add.png', 'image' => 'fa-solid fa-plus',
'sections' => array( 'sections' => array(
'section_a' => array( 'section_a' => array(
'title' => $lng['domains']['subdomain_add'], 'title' => $lng['domains']['subdomain_add'],
@@ -25,15 +25,14 @@ return array(
'fields' => array( 'fields' => array(
'subdomain' => array( 'subdomain' => array(
'label' => $lng['domains']['domainname'], 'label' => $lng['domains']['domainname'],
'type' => 'textul', 'type' => 'text',
'ul_field' => '', 'next_to' => [
'has_nextto' => true 'domain' => [
), 'next_to_prefix' => '&nbsp;.&nbsp;',
'domain' => array( 'type' => 'select',
'next_to' => 'subdomain', 'select_var' => $domains
'next_to_prefix' => '&nbsp;.&nbsp;', ]
'type' => 'select', ]
'select_var' => $domains
), ),
'alias' => array( 'alias' => array(
'label' => $lng['domains']['aliasdomain'], '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'] : ''), 'desc' => (\Froxlor\Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescriptionSubdomain'] : null) . (isset($pathSelect['note']) ? $pathSelect['note'] . '<br />' . $pathSelect['value'] : ''),
'type' => $pathSelect['type'], 'type' => $pathSelect['type'],
'select_var' => $pathSelect['value'], 'select_var' => $pathSelect['value'],
'value' => $pathSelect['value'] 'selected' => $pathSelect['value']
), ),
'url' => array( 'url' => array(
'visible' => (\Froxlor\Settings::Get('panel.pathedit') == 'Dropdown' ? true : false), 'visible' => (\Froxlor\Settings::Get('panel.pathedit') == 'Dropdown' ? true : false),
@@ -86,85 +85,53 @@ return array(
'sslenabled' => array( 'sslenabled' => array(
'label' => $lng['admin']['domain_sslenabled'], 'label' => $lng['admin']['domain_sslenabled'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => true
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
'1'
)
), ),
'ssl_redirect' => array( 'ssl_redirect' => array(
'label' => $lng['domains']['ssl_redirect']['title'], 'label' => $lng['domains']['ssl_redirect']['title'],
'desc' => $lng['domains']['ssl_redirect']['description'], 'desc' => $lng['domains']['ssl_redirect']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => false
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array()
), ),
'letsencrypt' => array( 'letsencrypt' => array(
'visible' => (\Froxlor\Settings::Get('system.leenabled') == '1' ? true : false), 'visible' => (\Froxlor\Settings::Get('system.leenabled') == '1' ? true : false),
'label' => $lng['customer']['letsencrypt']['title'], 'label' => $lng['customer']['letsencrypt']['title'],
'desc' => $lng['customer']['letsencrypt']['description'], 'desc' => $lng['customer']['letsencrypt']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => false
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array()
), ),
'http2' => array( 'http2' => array(
'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.http2_support') == '1', 'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.http2_support') == '1',
'label' => $lng['admin']['domain_http2']['title'], 'label' => $lng['admin']['domain_http2']['title'],
'desc' => $lng['admin']['domain_http2']['description'], 'desc' => $lng['admin']['domain_http2']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => false
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array()
), ),
'hsts_maxage' => array( 'hsts_maxage' => array(
'label' => $lng['admin']['domain_hsts_maxage']['title'], 'label' => $lng['admin']['domain_hsts_maxage']['title'],
'desc' => $lng['admin']['domain_hsts_maxage']['description'], 'desc' => $lng['admin']['domain_hsts_maxage']['description'],
'type' => 'int', 'type' => 'number',
'int_min' => 0, 'min' => 0,
'int_max' => 94608000, // 3-years 'max' => 94608000, // 3-years
'value' => 0 'value' => 0
), ),
'hsts_sub' => array( 'hsts_sub' => array(
'label' => $lng['admin']['domain_hsts_incsub']['title'], 'label' => $lng['admin']['domain_hsts_incsub']['title'],
'desc' => $lng['admin']['domain_hsts_incsub']['description'], 'desc' => $lng['admin']['domain_hsts_incsub']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => false
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array()
), ),
'hsts_preload' => array( 'hsts_preload' => array(
'label' => $lng['admin']['domain_hsts_preload']['title'], 'label' => $lng['admin']['domain_hsts_preload']['title'],
'desc' => $lng['admin']['domain_hsts_preload']['description'], 'desc' => $lng['admin']['domain_hsts_preload']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => false
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array()
) )
) )
) )

View File

@@ -17,7 +17,7 @@
return array( return array(
'domain_edit' => array( 'domain_edit' => array(
'title' => $lng['domains']['subdomain_edit'], 'title' => $lng['domains']['subdomain_edit'],
'image' => 'icons/domain_edit.png', 'image' => 'fa-solid fa-pen',
'sections' => array( 'sections' => array(
'section_a' => array( 'section_a' => array(
'title' => $lng['domains']['subdomain_edit'], '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'] : ''), 'desc' => (\Froxlor\Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescriptionSubdomain'] : null) . (isset($pathSelect['note']) ? '<br />' . $pathSelect['value'] : ''),
'type' => $pathSelect['type'], 'type' => $pathSelect['type'],
'select_var' => $pathSelect['value'], 'select_var' => $pathSelect['value'],
'value' => $pathSelect['value'] 'selected' => $pathSelect['value']
), ),
'url' => array( 'url' => array(
'visible' => (\Froxlor\Settings::Get('panel.pathedit') == 'Dropdown' ? true : false), '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), 'visible' => ((($result['subcanemaildomain'] == '1' || $result['subcanemaildomain'] == '2') && $result['parentdomainid'] != '0') ? true : false),
'label' => 'Emaildomain', 'label' => 'Emaildomain',
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['isemaildomain']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['isemaildomain']
)
), ),
'openbasedir_path' => array( 'openbasedir_path' => array(
'visible' => ($result['openbasedir'] == '1') ? true : false, 'visible' => ($result['openbasedir'] == '1') ? true : false,
@@ -102,95 +95,53 @@ return array(
'sslenabled' => array( 'sslenabled' => array(
'label' => $lng['admin']['domain_sslenabled'], 'label' => $lng['admin']['domain_sslenabled'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['ssl_enabled']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['ssl_enabled']
)
), ),
'ssl_redirect' => array( 'ssl_redirect' => array(
'label' => $lng['domains']['ssl_redirect']['title'], 'label' => $lng['domains']['ssl_redirect']['title'],
'desc' => $lng['domains']['ssl_redirect']['description'] . ($result['temporary_ssl_redirect'] > 1 ? $lng['domains']['ssl_redirect_temporarilydisabled'] : ''), 'desc' => $lng['domains']['ssl_redirect']['description'] . ($result['temporary_ssl_redirect'] > 1 ? $lng['domains']['ssl_redirect_temporarilydisabled'] : ''),
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['ssl_redirect']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['ssl_redirect']
)
), ),
'letsencrypt' => array( 'letsencrypt' => array(
'visible' => \Froxlor\Settings::Get('system.leenabled') == '1' ? true : false, 'visible' => \Froxlor\Settings::Get('system.leenabled') == '1' ? true : false,
'label' => $lng['customer']['letsencrypt']['title'], 'label' => $lng['customer']['letsencrypt']['title'],
'desc' => $lng['customer']['letsencrypt']['description'], 'desc' => $lng['customer']['letsencrypt']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['letsencrypt']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['letsencrypt']
)
), ),
'http2' => array( 'http2' => array(
'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.http2_support') == '1', 'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.http2_support') == '1',
'label' => $lng['admin']['domain_http2']['title'], 'label' => $lng['admin']['domain_http2']['title'],
'desc' => $lng['admin']['domain_http2']['description'], 'desc' => $lng['admin']['domain_http2']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['http2']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['http2']
)
), ),
'hsts_maxage' => array( 'hsts_maxage' => array(
'label' => $lng['admin']['domain_hsts_maxage']['title'], 'label' => $lng['admin']['domain_hsts_maxage']['title'],
'desc' => $lng['admin']['domain_hsts_maxage']['description'], 'desc' => $lng['admin']['domain_hsts_maxage']['description'],
'type' => 'int', 'type' => 'number',
'int_min' => 0, 'min' => 0,
'int_max' => 94608000, // 3-years 'max' => 94608000, // 3-years
'value' => $result['hsts'] 'value' => $result['hsts']
), ),
'hsts_sub' => array( 'hsts_sub' => array(
'label' => $lng['admin']['domain_hsts_incsub']['title'], 'label' => $lng['admin']['domain_hsts_incsub']['title'],
'desc' => $lng['admin']['domain_hsts_incsub']['description'], 'desc' => $lng['admin']['domain_hsts_incsub']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['hsts_sub']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['hsts_sub']
)
), ),
'hsts_preload' => array( 'hsts_preload' => array(
'label' => $lng['admin']['domain_hsts_preload']['title'], 'label' => $lng['admin']['domain_hsts_preload']['title'],
'desc' => $lng['admin']['domain_hsts_preload']['description'], 'desc' => $lng['admin']['domain_hsts_preload']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => $result['hsts_preload']
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['hsts_preload']
)
) )
) )
) )

View File

@@ -17,7 +17,7 @@
return array( return array(
'emails_add' => array( 'emails_add' => array(
'title' => $lng['emails']['emails_add'], 'title' => $lng['emails']['emails_add'],
'image' => 'icons/email_add.png', 'image' => 'fa-solid fa-plus',
'sections' => array( 'sections' => array(
'section_a' => array( 'section_a' => array(
'title' => $lng['emails']['emails_add'], 'title' => $lng['emails']['emails_add'],
@@ -25,26 +25,20 @@ return array(
'fields' => array( 'fields' => array(
'email_part' => array( 'email_part' => array(
'label' => $lng['emails']['emailaddress'], 'label' => $lng['emails']['emailaddress'],
'type' => 'textul', 'type' => 'text',
'ul_field' => '', 'next_to' => [
'has_nextto' => true 'domain' => [
), 'next_to_prefix' => '&nbsp;@&nbsp;',
'domain' => array( 'type' => 'select',
'next_to' => 'email_part', 'select_var' => $domains
'next_to_prefix' => '&nbsp;@&nbsp;', ]
'type' => 'select', ]
'select_var' => $domains
), ),
'iscatchall' => array( 'iscatchall' => array(
'label' => $lng['emails']['iscatchall'], 'label' => $lng['emails']['iscatchall'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'value' => '1',
array( 'checked' => false
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array()
) )
) )
) )

View File

@@ -17,7 +17,7 @@
return array( return array(
'emails_edit' => array( 'emails_edit' => array(
'title' => $lng['emails']['emails_edit'], 'title' => $lng['emails']['emails_edit'],
'image' => 'icons/email_edit.png', 'image' => 'fa-solid fa-pen',
'sections' => array( 'sections' => array(
'section_a' => array( 'section_a' => array(
'title' => $lng['emails']['emails_edit'], 'title' => $lng['emails']['emails_edit'],
@@ -33,29 +33,69 @@ return array(
'visible' => ($result['popaccountid'] != 0 ? true : false), 'visible' => ($result['popaccountid'] != 0 ? true : false),
'label' => $lng['emails']['account'], 'label' => $lng['emails']['account'],
'type' => 'label', 'type' => 'label',
'value' => $lng['panel']['yes'] . '&nbsp;[<a href="' . $filename . '?page=accounts&amp;action=changepw&amp;id=' . $result['id'] . '&amp;s=' . $s . '">' . $lng['menue']['main']['changepassword'] . '</a>] [<a href="' . $filename . '?page=accounts&amp;action=delete&amp;id=' . $result['id'] . '&amp;s=' . $s . '">' . $lng['emails']['account_delete'] . '</a>]' 'value' => $lng['panel']['yes'],
'next_to' => [
'del_link' => [
'type' => 'link',
'href' => $filename . '?page=accounts&amp;action=changepw&amp;id=' . $result['id'] . '&amp;s=' . $s,
'label' => $lng['emails']['account_delete'],
'classes' => 'btn btn-sm btn-danger'
]
]
), ),
'account_no' => array( 'account_no' => array(
'visible' => ($result['popaccountid'] == 0 ? true : false), 'visible' => ($result['popaccountid'] == 0 ? true : false),
'label' => $lng['emails']['account'], 'label' => $lng['emails']['account'],
'type' => 'label', 'type' => 'label',
'value' => $lng['panel']['no'] . '&nbsp;[<a href="' . $filename . '?page=accounts&amp;action=add&amp;id=' . $result['id'] . '&amp;s=' . $s . '">' . $lng['emails']['account_add'] . '</a>]' 'value' => $lng['panel']['no'],
'next_to' => [
'add_link' => [
'type' => 'link',
'href' => $filename . '?page=accounts&amp;action=add&amp;id=' . $result['id'] . '&amp;s=' . $s,
'label' => $lng['emails']['account_add'],
'classes' => 'btn btn-sm btn-primary'
]
]
), ),
'mail_quota' => array( 'mail_quota' => array(
'visible' => ($result['popaccountid'] != 0 && \Froxlor\Settings::Get('system.mail_quota_enabled')), 'visible' => ($result['popaccountid'] != 0 && \Froxlor\Settings::Get('system.mail_quota_enabled')),
'label' => $lng['customer']['email_quota'], 'label' => $lng['customer']['email_quota'],
'type' => 'label', 'type' => 'label',
'value' => $result['quota'] . ' MiB [<a href="' . $filename . '?page=accounts&amp;action=changequota&amp;id=' . $result['id'] . '&amp;s=' . $s . '">' . $lng['emails']['quota_edit'] . '</a>]' 'value' => $result['quota'] . ' MiB',
'next_to' => [
'add_link' => [
'type' => 'link',
'href' => $filename . '?page=accounts&amp;action=changequota&amp;id=' . $result['id'] . '&amp;s=' . $s,
'label' => $lng['emails']['quota_edit'],
'classes' => 'btn btn-sm btn-secondary'
]
]
), ),
'mail_catchall' => array( 'mail_catchall' => array(
'label' => $lng['emails']['catchall'], 'label' => $lng['emails']['catchall'],
'type' => 'label', 'type' => 'label',
'value' => ($result['iscatchall'] == 0 ? $lng['panel']['no'] : $lng['panel']['yes']) . ' [<a href="' . $filename . '?page=' . $page . '&amp;action=togglecatchall&amp;id=' . $result['id'] . '&amp;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 . '&amp;action=togglecatchall&amp;id=' . $result['id'] . '&amp;s=' . $s,
'label' => $lng['panel']['toggle'],
'classes' => 'btn btn-sm btn-secondary'
]
]
), ),
'mail_fwds' => array( 'mail_fwds' => array(
'label' => $lng['emails']['forwarders'] . ' (' . $forwarders_count . ')', 'label' => $lng['emails']['forwarders'] . ' (' . $forwarders_count . ')',
'type' => 'label', 'type' => 'label',
'value' => $forwarders . ' <a href="' . $filename . '?page=forwarders&amp;action=add&amp;id=' . $result['id'] . '&amp;s=' . $s . '">' . $lng['emails']['forwarder_add'] . '</a>' 'value' => $forwarders,
'next_to' => [
'add_link' => [
'type' => 'link',
'href' => $filename . '?page=forwarders&amp;action=add&amp;id=' . $result['id'] . '&amp;s=' . $s,
'label' => $lng['emails']['forwarder_add'],
'classes' => 'btn btn-sm btn-primary'
]
]
) )
) )
) )

View File

@@ -24,19 +24,7 @@
{% endif %} {% endif %}
<div class="card-body"> <div class="card-body">
{% for id,field in section.fields %} {% for id,field in section.fields %}
{% if field.type == 'text' or field.type == 'password' or field.type == 'number' %} {{ formfields.fieldrow(id, field) }}
{{ formfields.input(id, field) }}
{% elseif field.type == 'textul' %}
{{ formfields.input_ul(id, field) }}
{% elseif field.type == 'checkbox' %}
{{ formfields.bool(id, field) }}
{% elseif field.type == 'select' %}
{{ formfields.select(id, field) }}
{% elseif field.type == 'textarea' %}
{{ formfields.textarea(id, field) }}
{% elseif field.type == 'label' %}
{{ formfields.plain(id, field) }}
{% endif %}
{% endfor %} {% endfor %}
</div> </div>
</div> </div>

View File

@@ -1,50 +1,83 @@
{% macro bool(id, field) %} {% macro fieldrow(id, field, norow = false) %}
<div class="row mb-3"> {% if norow == false %}
<label for="{{ id }}" class="col-sm-4 col-form-label">{{ field.label|raw }} <div class="row mb-3">
{% if field.desc is defined and field.desc is not empty %}<br><small>{{ field.desc|raw }}</small> <label for="{{ id }}" class="col-sm-4 col-form-label">{{ field.label|raw }}
{% if field.desc is defined and field.desc is not empty %}<br><small>{{ field.desc|raw }}</small>
{% endif %}
</label>
<div class="col-sm-8">
{% endif %} {% endif %}
</label> {% if field.type == 'text' or field.type == 'password' or field.type == 'number' or field.type == 'file' %}
<div class="col-sm-8"> {{ _self.input(id, field) }}
{% if field.is_array is defined and field.is_array == 1 and field.values is not empty %} {% elseif field.type == 'textul' %}
{% for subfield in field.values %} {{ _self.input_ul(id, field) }}
<div class="form-check form-switch"> {% elseif field.type == 'checkbox' %}
<input type="checkbox" value="{{ subfield.value }}" name="{{ id }}[]" class="form-check-input" {% if field.value is defined and subfield.value in field.value %} checked="checked" {% endif %} {% if field.visible is defined and field.visible == false %} disabled {% endif %}> {{ _self.bool(id, field) }}
<label class="form-check-label"> {% elseif field.type == 'select' %}
{{ subfield.label|raw }} {{ _self.select(id, field) }}
</label> {% elseif field.type == 'textarea' %}
</div> {{ _self.textarea(id, field) }}
{% endfor %} {% elseif field.type == 'label' %}
{% else %} {{ _self.plain(id, field) }}
<div class="form-check form-switch"> {% elseif field.type == 'link' %}
<input type="checkbox" value="{{ field.value }}" id="{{ id }}" name="{{ id }}" class="form-check-input {% if field.valid is defined and field.valid == false %}is-invalid{% endif %}" {% if field.checked is defined and field.checked == 1 %} checked="checked" {% endif %} {% if field.visible is defined and field.visible == false %} disabled {% endif %}> {{ _self.link(id, field) }}
</div>
{% endif %} {% endif %}
{% if norow == false %}
</div>
</div> </div>
</div> {% endif %}
{% endmacro %}
{% macro bool(id, field) %}
{% if field.is_array is defined and field.is_array == 1 and field.values is not empty %}
{% for subfield in field.values %}
<div class="form-check form-switch">
<input type="checkbox" value="{{ subfield.value }}" name="{{ id }}[]" class="form-check-input" {% if field.value is defined and subfield.value in field.value %} checked="checked" {% endif %} {% if field.visible is defined and field.visible == false %} disabled {% endif %}>
<label class="form-check-label">
{{ subfield.label|raw }}
</label>
</div>
{% endfor %}
{% else %}
<div class="form-check form-switch">
<input type="checkbox" value="{{ field.value }}" id="{{ id }}" name="{{ id }}" class="form-check-input {% if field.valid is defined and field.valid == false %}is-invalid{% endif %}" {% if field.checked is defined and field.checked == 1 %} checked="checked" {% endif %} {% if field.visible is defined and field.visible == false %} disabled {% endif %}>
</div>
{% endif %}
{% endmacro %} {% endmacro %}
{% macro plain(id, field) %} {% macro plain(id, field) %}
<div class="row mb-3"> {% if field.next_to is defined %}
<label for="{{ id }}" class="col-sm-4 col-form-label">{{ field.label|raw }} <div class="input-group">
{% if field.desc is defined and field.desc is not empty %}<br><small>{{ field.desc|raw }}</small> {% endif %}
{% endif %} <input type="text" readonly class="form-control-plaintext" id="{{ id }}" value="{{ field.value }}">
</label> {% if field.next_to is defined %}
<div class="col-sm-8"> {% for nid, nfield in field.next_to %}
<input type="text" readonly class="form-control-plaintext" id="{{ id }}" value="{{ field.value }}"> {% if nfield.next_to_prefix is defined %}
<span class="input-group-text">{{ nfield.next_to_prefix }}</span>
{% endif %}
{{ _self.fieldrow(nid, nfield, true) }}
{% endfor %}
</div> </div>
</div> {% endif %}
{% endmacro %} {% endmacro %}
{% macro input(id, field) %} {% macro input(id, field) %}
<div class="row mb-3"> {% if field.next_to is defined %}
<label for="{{ id }}" class="col-sm-4 col-form-label">{{ field.label|raw }} <div class="input-group">
{% if field.desc is defined and field.desc is not empty %}<br><small>{{ field.desc|raw }}</small> {% endif %}
{% endif %} <input type="{{ field.type }}" {% if field.type == 'number' and field.min is defined %} min="{{ field.min }}" {% endif %} {% if field.type == 'number' and field.max is defined %} max="{{ field.max }}" {% endif %} {% if field.type != 'number' and field.maxlength is defined %} maxlength="{{ field.maxlength }}" {% endif %} id="{{ id }}" name="{{ id }}" value="{{ field.value }}" class="form-control {% if field.valid is defined and field.valid == false %}is-invalid{% endif %}" {% if field.mandatory is defined and field.mandatory %} required {% endif %} {% if field.visible is defined and field.visible == false %} disabled {% endif %} {% if field.readonly is defined and field.readonly %} readonly {% endif %} {% if field.autocomplete is defined %} autocomplete="{{ field.autocomplete }}" {% endif %} {% if field.placeholder is defined %} placeholder="{{ field.placeholder }}" {% endif %}/>
</label> {% if field.type == 'hidden' and field.display is defined %}
<div class="col-sm-8"> <input type="text" readonly class="form-control-plaintext" value="{{ field.display }}">
<input type="{{ field.type }}" {% if field.type == 'number' and field.min is defined %}min="{{ field.min }}"{% endif %} {% if field.type == 'number' and field.max is defined %}max="{{ field.max }}"{% endif %} id="{{ id }}" name="{{ id }}" value="{{ field.value }}" class="form-control {% if field.valid is defined and field.valid == false %}is-invalid{% endif %}" {% if field.mandatory is defined and field.mandatory %} required {% endif %} {% if field.visible is defined and field.visible == false %} disabled {% endif %} {% if field.readonly is defined and field.readonly %} readonly {% endif %} {% if field.autocomplete is defined %} autocomplete="{{ field.autocomplete }}" {% endif %} {% if field.placeholder is defined %} placeholder="{{ field.placeholder }}" {% endif %}/> {% endif %}
{% if field.next_to is defined %}
{% for nid, nfield in field.next_to %}
{% if nfield.next_to_prefix is defined %}
<span class="input-group-text">{{ nfield.next_to_prefix }}</span>
{% endif %}
{{ _self.fieldrow(nid, nfield, true) }}
{% endfor %}
</div> </div>
</div> {% endif %}
{% endmacro %} {% endmacro %}
{% macro input_ul(id, field) %} {% macro input_ul(id, field) %}
@@ -54,47 +87,39 @@
{% set max = max ~ "9" %} {% set max = max ~ "9" %}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
<div class="row mb-3"> <div class="input-group">
<label for="{{ id }}" class="col-sm-4 col-form-label">{{ field.label|raw }} <input type="number" min="0" {% if max is not empty %} max="{{ max }}" {% endif %} id="{{ id }}" name="{{ id }}" value="{% if field.value >= 0 %}{{ field.value }}{% endif %}" class="form-control {% if field.valid is defined and field.valid == false %}is-invalid{% endif %}" {% if field.mandatory is defined and field.mandatory %} required {% endif %} {% if field.visible is defined and field.visible == false %} disabled {% endif %} {% if field.readonly is defined and field.readonly %} readonly {% endif %} {% if field.autocomplete is defined %} autocomplete="{{ field.autocomplete }}" {% endif %} {% if field.placeholder is defined %} placeholder="{{ field.placeholder }}" {% endif %}/>
{% if field.desc is defined and field.desc is not empty %}<br><small>{{ field.desc|raw }}</small> <div class="input-group-text">
{% endif %} <input class="form-check-input mt-0" type="checkbox" name="{{ id }}_ul" value="1" {% if field.value == -1 %} checked="checked" {% endif %}>
</label>
<div class="col-sm-8">
<div class="input-group">
<input type="number" min="0" {% if max is not empty %} max="{{ max }}" {% endif %} id="{{ id }}" name="{{ id }}" value="{% if field.value >= 0 %}{{ field.value }}{% endif %}" class="form-control {% if field.valid is defined and field.valid == false %}is-invalid{% endif %}" {% if field.mandatory is defined and field.mandatory %} required {% endif %} {% if field.visible is defined and field.visible == false %} disabled {% endif %} {% if field.readonly is defined and field.readonly %} readonly {% endif %} {% if field.autocomplete is defined %} autocomplete="{{ field.autocomplete }}" {% endif %} {% if field.placeholder is defined %} placeholder="{{ field.placeholder }}" {% endif %}/>
<div class="input-group-text">
<input class="form-check-input mt-0" type="checkbox" name="{{ id }}_ul" value="1" {% if field.value == -1 %} checked="checked" {% endif %}>
</div>
</div>
</div> </div>
</div> </div>
{% endmacro %} {% endmacro %}
{% macro select(id, field) %} {% macro select(id, field) %}
<div class="row mb-3"> {% if field.next_to is defined %}
<label for="{{ id }}" class="col-sm-4 col-form-label">{{ field.label|raw }} <div class="input-group">
{% if field.desc is defined and field.desc is not empty %}<br><small>{{ field.desc|raw }}</small> {% endif %}
{% endif %} <select class="form-select {% if field.valid is defined and field.valid == false %}is-invalid{% endif %}" name="{{ id }}" id="{{ id }}" {% if field.mandatory is defined and field.mandatory %} required {% endif %} {% if field.visible is defined and field.visible == false %} disabled {% endif %}>
</label> {% for val,txt in field.select_var %}
<div class="col-sm-8"> <option value="{{ val }}" {% if field.selected is defined and field.selected == val %} selected="selected" {% endif %}>{{ txt|raw }}</option>
<select class="form-select {% if field.valid is defined and field.valid == false %}is-invalid{% endif %}" name="{{ id }}" id="{{ id }}" {% if field.mandatory is defined and field.mandatory %} required {% endif %} {% if field.visible is defined and field.visible == false %} disabled {% endif %}> {% endfor %}
{% for val,txt in field.select_var %} </select>
<option value="{{ val }}" {% if field.selected is defined and field.selected == val %} selected="selected" {% endif %}>{{ txt|raw }}</option> {% if field.next_to is defined %}
{% endfor %} {% for nid, nfield in field.next_to %}
</select> {% if nfield.next_to_prefix is defined %}
<span class="input-group-text">{{ nfield.next_to_prefix }}</span>
{% endif %}
{{ _self.fieldrow(nid, nfield, true) }}
{% endfor %}
</div> </div>
</div> {% endif %}
{% endmacro %} {% endmacro %}
{% macro textarea(id, field) %} {% macro textarea(id, field) %}
<div class="row mb-3"> <textarea {% if field.rows is defined %} rows="{{ field.rows }}" {% endif %} {% if field.cols is defined %} cols="{{ field.cols }}" {% endif %} id="{{ id }}" name="{{ id }}" class="form-control {% if field.valid is defined and field.valid == false %}is-invalid{% endif %}" {% if field.mandatory is defined and field.mandatory %} required {% endif %} {% if field.visible is defined and field.visible == false %} disabled {% endif %} {% if field.readonly is defined and field.readonly %} readonly {% endif %} {% if field.placeholder is defined %} placeholder="{{ field.placeholder }}" {% endif %}>{{ field.value }}</textarea>
<label for="{{ id }}" class="col-sm-4 col-form-label">{{ field.label|raw }} {% endmacro %}
{% if field.desc is defined and field.desc is not empty %}<br><small>{{ field.desc|raw }}</small>
{% endif %} {% macro link(id, field) %}
</label> <a href="{{ field.href|raw }}" class="{{ field.classes }}">{{ field.label|raw }}</a>
<div class="col-sm-8">
<textarea {% if field.rows is defined %} rows="{{ field.rows }}" {% endif %} {% if field.cols is defined %} cols="{{ field.cols }}" {% endif %} id="{{ id }}" name="{{ id }}" class="form-control {% if field.valid is defined and field.valid == false %}is-invalid{% endif %}" {% if field.mandatory is defined and field.mandatory %} required {% endif %} {% if field.visible is defined and field.visible == false %} disabled {% endif %} {% if field.readonly is defined and field.readonly %} readonly {% endif %} {% if field.placeholder is defined %} placeholder="{{ field.placeholder }}" {% endif %}>{{ field.value }}</textarea>
</div>
</div>
{% endmacro %} {% endmacro %}