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:
@@ -24,6 +24,7 @@ use Froxlor\Settings;
|
||||
use Froxlor\Api\Commands\Emails as Emails;
|
||||
use Froxlor\Api\Commands\EmailAccounts as EmailAccounts;
|
||||
use Froxlor\Api\Commands\EmailForwarders as EmailForwarders;
|
||||
use Froxlor\UI\Panel\UI;
|
||||
|
||||
// redirect if this customer page is hidden via settings
|
||||
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']);
|
||||
}
|
||||
|
||||
$email_edit_form = \Froxlor\UI\HtmlForm::genHTMLForm($email_edit_data);
|
||||
|
||||
$title = $email_edit_data['emails_edit']['title'];
|
||||
$image = $email_edit_data['emails_edit']['image'];
|
||||
|
||||
eval("echo \"" . \Froxlor\UI\Template::getTemplate("email/emails_edit") . "\";");
|
||||
UI::TwigBuffer('user/form.html.twig', [
|
||||
'formdata' => $email_edit_data['emails_edit']
|
||||
]);
|
||||
UI::TwigOutputBuffer();
|
||||
}
|
||||
} elseif ($action == 'togglecatchall' && $id != 0) {
|
||||
try {
|
||||
|
||||
@@ -32,13 +32,16 @@ return array(
|
||||
'label' => $lng['login']['password'],
|
||||
'type' => 'password',
|
||||
'mandatory' => true,
|
||||
'autocomplete' => 'off'
|
||||
),
|
||||
'autocomplete' => 'off',
|
||||
'next_to' => [
|
||||
'admin_password_suggestion' => array(
|
||||
'label' => $lng['customer']['generated_pwd'],
|
||||
'next_to_prefix' => $lng['customer']['generated_pwd'].':',
|
||||
'type' => 'text',
|
||||
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
|
||||
'value' => \Froxlor\System\Crypt::generatePassword()
|
||||
'value' => \Froxlor\System\Crypt::generatePassword(),
|
||||
'readonly' => true
|
||||
)
|
||||
]
|
||||
),
|
||||
'def_language' => array(
|
||||
'label' => $lng['login']['language'],
|
||||
|
||||
@@ -39,13 +39,16 @@ return array(
|
||||
'label' => $lng['login']['password'] . ' (' . $lng['panel']['emptyfornochanges'] . ')',
|
||||
'type' => 'password',
|
||||
'autocomplete' => 'off',
|
||||
'visible' => ($result['adminid'] == $userinfo['userid'] ? false : true)
|
||||
),
|
||||
'visible' => ($result['adminid'] == $userinfo['userid'] ? false : true),
|
||||
'next_to' => [
|
||||
'admin_password_suggestion' => array(
|
||||
'label' => $lng['customer']['generated_pwd'],
|
||||
'next_to_prefix' => $lng['customer']['generated_pwd'].':',
|
||||
'type' => 'text',
|
||||
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == '' && ($result['adminid'] == $userinfo['userid'] ? false : true)),
|
||||
'value' => \Froxlor\System\Crypt::generatePassword(),
|
||||
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == '' && ($result['adminid'] == $userinfo['userid'] ? false : true))
|
||||
'readonly' => true
|
||||
)
|
||||
]
|
||||
),
|
||||
'def_language' => array(
|
||||
'label' => $lng['login']['language'],
|
||||
|
||||
@@ -43,14 +43,16 @@ return array(
|
||||
'new_customer_password' => array(
|
||||
'label' => $lng['login']['password'],
|
||||
'type' => 'password',
|
||||
'autocomplete' => 'off'
|
||||
),
|
||||
'autocomplete' => 'off',
|
||||
'next_to' => [
|
||||
'new_customer_password_suggestion' => array(
|
||||
'label' => $lng['customer']['generated_pwd'],
|
||||
'next_to_prefix' => $lng['customer']['generated_pwd'].':',
|
||||
'type' => 'text',
|
||||
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
|
||||
'value' => \Froxlor\System\Crypt::generatePassword(),
|
||||
'readonly' => true
|
||||
)
|
||||
]
|
||||
),
|
||||
'sendpassword' => array(
|
||||
'label' => $lng['admin']['sendpassword'],
|
||||
@@ -107,12 +109,14 @@ return array(
|
||||
'type' => 'text'
|
||||
),
|
||||
'zipcode' => array(
|
||||
'label' => $lng['customer']['zipcode'],
|
||||
'type' => 'text'
|
||||
),
|
||||
'label' => $lng['customer']['zipcode'] . ' / ' . $lng['customer']['city'],
|
||||
'type' => 'text',
|
||||
'next_to' => [
|
||||
'city' => array(
|
||||
'label' => $lng['customer']['city'],
|
||||
'next_to_prefix' => ' / ',
|
||||
'type' => 'text'
|
||||
)
|
||||
]
|
||||
),
|
||||
'phone' => array(
|
||||
'label' => $lng['customer']['phone'],
|
||||
@@ -147,7 +151,7 @@ return array(
|
||||
)
|
||||
),
|
||||
'section_cpre' => array(
|
||||
'visible' => ! empty($hosting_plans),
|
||||
'visible' => !empty($hosting_plans),
|
||||
'title' => $lng['admin']['plans']['use_plan'],
|
||||
'image' => 'icons/user_add.png',
|
||||
'fields' => array(
|
||||
@@ -205,7 +209,7 @@ return array(
|
||||
'mandatory' => true
|
||||
),
|
||||
'email_quota' => array(
|
||||
'label' => $lng['customer']['email_quota']. ' (' . $lng['customer']['mib'] . ')',
|
||||
'label' => $lng['customer']['email_quota'] . ' (' . $lng['customer']['mib'] . ')',
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'maxlength' => 9,
|
||||
|
||||
@@ -48,13 +48,16 @@ return array(
|
||||
'new_customer_password' => array(
|
||||
'label' => $lng['login']['password'] . ' (' . $lng['panel']['emptyfornochanges'] . ')',
|
||||
'type' => 'password',
|
||||
'autocomplete' => 'off'
|
||||
),
|
||||
'autocomplete' => 'off',
|
||||
'next_to' => [
|
||||
'new_customer_password_suggestion' => array(
|
||||
'label' => $lng['customer']['generated_pwd'],
|
||||
'next_to_prefix' => $lng['customer']['generated_pwd'] . ':',
|
||||
'type' => 'text',
|
||||
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
|
||||
'value' => \Froxlor\System\Crypt::generatePassword()
|
||||
'value' => \Froxlor\System\Crypt::generatePassword(),
|
||||
'readonly' => true
|
||||
)
|
||||
]
|
||||
),
|
||||
'def_language' => array(
|
||||
'label' => $lng['login']['language'],
|
||||
@@ -110,14 +113,16 @@ return array(
|
||||
'value' => $result['street']
|
||||
),
|
||||
'zipcode' => array(
|
||||
'label' => $lng['customer']['zipcode'],
|
||||
'label' => $lng['customer']['zipcode'] . ' / ' . $lng['customer']['city'],
|
||||
'type' => 'text',
|
||||
'value' => $result['zipcode']
|
||||
),
|
||||
'value' => $result['zipcode'],
|
||||
'next_to' => [
|
||||
'city' => array(
|
||||
'label' => $lng['customer']['city'],
|
||||
'next_to_prefix' => ' / ',
|
||||
'type' => 'text',
|
||||
'value' => $result['city']
|
||||
)
|
||||
]
|
||||
),
|
||||
'phone' => array(
|
||||
'label' => $lng['customer']['phone'],
|
||||
@@ -158,7 +163,7 @@ return array(
|
||||
)
|
||||
),
|
||||
'section_cpre' => array(
|
||||
'visible' => ! empty($hosting_plans),
|
||||
'visible' => !empty($hosting_plans),
|
||||
'title' => $lng['admin']['plans']['use_plan'],
|
||||
'image' => 'icons/user_add.png',
|
||||
'fields' => array(
|
||||
@@ -261,7 +266,7 @@ return array(
|
||||
'label' => $lng['admin']['phpsettings']['title'],
|
||||
'type' => 'checkbox',
|
||||
'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
|
||||
),
|
||||
'perlenabled' => array(
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
return array(
|
||||
'domain_add' => array(
|
||||
'title' => $lng['admin']['domain_add'],
|
||||
'image' => 'icons/domain_add.png',
|
||||
'image' => 'fa-solid fa-globe',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['domains']['domainsettings'],
|
||||
@@ -56,15 +56,8 @@ return array(
|
||||
'label' => $lng['admin']['domain_editable']['title'],
|
||||
'desc' => $lng['admin']['domain_editable']['desc'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
'1'
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => true
|
||||
),
|
||||
'add_date' => array(
|
||||
'label' => $lng['domains']['add_date'],
|
||||
@@ -115,17 +108,11 @@ return array(
|
||||
'label' => $lng['admin']['speciallogfile']['title'],
|
||||
'desc' => $lng['admin']['speciallogfile']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
'value' => '1',
|
||||
'checked' => false
|
||||
),
|
||||
'specialsettings' => array(
|
||||
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
|
||||
'style' => 'align-top',
|
||||
'label' => $lng['admin']['ownvhostsettings'],
|
||||
'desc' => $lng['serversettings']['default_vhostconf']['description'],
|
||||
'type' => 'textarea',
|
||||
@@ -137,41 +124,22 @@ return array(
|
||||
'label' => $lng['admin']['notryfiles']['title'],
|
||||
'desc' => $lng['admin']['notryfiles']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
'value' => '1',
|
||||
'checked' => false
|
||||
),
|
||||
'writeaccesslog' => array(
|
||||
'label' => $lng['admin']['writeaccesslog']['title'],
|
||||
'desc' => $lng['admin']['writeaccesslog']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
'1'
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => true
|
||||
),
|
||||
'writeerrorlog' => array(
|
||||
'label' => $lng['admin']['writeerrorlog']['title'],
|
||||
'desc' => $lng['admin']['writeerrorlog']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
'1'
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => true
|
||||
)
|
||||
)
|
||||
),
|
||||
@@ -184,15 +152,8 @@ return array(
|
||||
'visible' => ($ssl_ipsandports != '' ? true : false),
|
||||
'label' => $lng['admin']['domain_sslenabled'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
'1'
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => true
|
||||
),
|
||||
'no_ssl_available_info' => array(
|
||||
'visible' => ($ssl_ipsandports == '' ? true : false),
|
||||
@@ -213,51 +174,31 @@ return array(
|
||||
'label' => $lng['domains']['ssl_redirect']['title'],
|
||||
'desc' => $lng['domains']['ssl_redirect']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
'value' => '1',
|
||||
'checked' => false
|
||||
),
|
||||
'letsencrypt' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('system.leenabled') == '1' ? ($ssl_ipsandports != '' ? true : false) : false),
|
||||
'label' => $lng['admin']['letsencrypt']['title'],
|
||||
'desc' => $lng['admin']['letsencrypt']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
'value' => '1',
|
||||
'checked' => false
|
||||
),
|
||||
'http2' => array(
|
||||
'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.http2_support') == '1',
|
||||
'label' => $lng['admin']['domain_http2']['title'],
|
||||
'desc' => $lng['admin']['domain_http2']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
'value' => '1',
|
||||
'checked' => false
|
||||
),
|
||||
'override_tls' => array(
|
||||
'visible' => (($ssl_ipsandports != '' ? true : false) && $userinfo['change_serversettings'] == '1' ? true : false),
|
||||
'label' => $lng['admin']['domain_override_tls'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
'value' => '1',
|
||||
'checked' => false
|
||||
),
|
||||
'ssl_protocols' => array(
|
||||
'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(
|
||||
array(
|
||||
'value' => 'TLSv1',
|
||||
'label' => 'TLSv1<br />'
|
||||
'label' => 'TLSv1'
|
||||
),
|
||||
array(
|
||||
'value' => 'TLSv1.1',
|
||||
'label' => 'TLSv1.1<br />'
|
||||
'label' => 'TLSv1.1'
|
||||
),
|
||||
array(
|
||||
'value' => 'TLSv1.2',
|
||||
'label' => 'TLSv1.2<br />'
|
||||
'label' => 'TLSv1.2'
|
||||
),
|
||||
array(
|
||||
'value' => 'TLSv1.3',
|
||||
'label' => 'TLSv1.3<br />'
|
||||
'label' => 'TLSv1.3<'
|
||||
)
|
||||
),
|
||||
'is_array' => 1
|
||||
@@ -303,7 +244,6 @@ return array(
|
||||
),
|
||||
'ssl_specialsettings' => array(
|
||||
'visible' => (($ssl_ipsandports != '' ? true : false) && $userinfo['change_serversettings'] == '1' ? true : false),
|
||||
'style' => 'align-top',
|
||||
'label' => $lng['admin']['ownsslvhostsettings'],
|
||||
'desc' => $lng['serversettings']['default_vhostconf']['description'],
|
||||
'type' => 'textarea',
|
||||
@@ -314,21 +254,16 @@ return array(
|
||||
'visible' => (($ssl_ipsandports != '' ? true : false) && $userinfo['change_serversettings'] == '1' ? true : false),
|
||||
'label' => $lng['admin']['include_ownvhostsettings'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
'value' => '1',
|
||||
'checked' => false
|
||||
),
|
||||
'hsts_maxage' => array(
|
||||
'visible' => ($ssl_ipsandports != '' ? true : false),
|
||||
'label' => $lng['admin']['domain_hsts_maxage']['title'],
|
||||
'desc' => $lng['admin']['domain_hsts_maxage']['description'],
|
||||
'type' => 'int',
|
||||
'int_min' => 0,
|
||||
'int_max' => 94608000, // 3-years
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 94608000, // 3-years
|
||||
'value' => 0
|
||||
),
|
||||
'hsts_sub' => array(
|
||||
@@ -336,65 +271,38 @@ return array(
|
||||
'label' => $lng['admin']['domain_hsts_incsub']['title'],
|
||||
'desc' => $lng['admin']['domain_hsts_incsub']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
'value' => '1',
|
||||
'checked' => false
|
||||
),
|
||||
'hsts_preload' => array(
|
||||
'visible' => ($ssl_ipsandports != '' ? true : false),
|
||||
'label' => $lng['admin']['domain_hsts_preload']['title'],
|
||||
'desc' => $lng['admin']['domain_hsts_preload']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
'value' => '1',
|
||||
'checked' => false
|
||||
),
|
||||
'ocsp_stapling' => array(
|
||||
'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd',
|
||||
'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'] : ""),
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
'value' => '1',
|
||||
'checked' => false
|
||||
),
|
||||
'honorcipherorder' => array(
|
||||
'visible' => ($ssl_ipsandports != '' ? true : false),
|
||||
'label' => $lng['admin']['domain_honorcipherorder'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
'value' => '1',
|
||||
'checked' => false
|
||||
),
|
||||
'sessiontickets' => array(
|
||||
'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.sessionticketsenabled' != '1'),
|
||||
'label' => $lng['admin']['domain_sessiontickets'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
'1'
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => true
|
||||
)
|
||||
)
|
||||
),
|
||||
@@ -406,44 +314,31 @@ return array(
|
||||
'openbasedir' => array(
|
||||
'label' => 'OpenBasedir',
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
'1'
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => true
|
||||
),
|
||||
'phpenabled' => array(
|
||||
'label' => $lng['admin']['phpenabled'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
'1'
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => true
|
||||
),
|
||||
'phpsettingid' => array(
|
||||
'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1) ? true : false),
|
||||
'label' => $lng['admin']['phpsettings']['title'],
|
||||
'type' => 'select',
|
||||
'select_var' => $phpconfigs
|
||||
'select_var' => $phpconfigs,
|
||||
'selected' => '@TODO'
|
||||
),
|
||||
'mod_fcgid_starter' => array(
|
||||
'visible' => ((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||
'label' => $lng['admin']['mod_fcgid_starter']['title'],
|
||||
'type' => 'text'
|
||||
'type' => 'number'
|
||||
),
|
||||
'mod_fcgid_maxrequests' => array(
|
||||
'visible' => ((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||
'label' => $lng['admin']['mod_fcgid_maxrequests']['title'],
|
||||
'type' => 'text'
|
||||
'type' => 'number'
|
||||
)
|
||||
)
|
||||
),
|
||||
@@ -455,15 +350,8 @@ return array(
|
||||
'isbinddomain' => array(
|
||||
'label' => 'Nameserver',
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
'1'
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => true
|
||||
),
|
||||
'zonefile' => array(
|
||||
'label' => 'Zonefile',
|
||||
@@ -479,45 +367,27 @@ return array(
|
||||
'isemaildomain' => array(
|
||||
'label' => $lng['admin']['emaildomain'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
'1'
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => true
|
||||
),
|
||||
'email_only' => array(
|
||||
'label' => $lng['admin']['email_only'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
'value' => '1',
|
||||
'checked' => false
|
||||
),
|
||||
'subcanemaildomain' => array(
|
||||
'label' => $lng['admin']['subdomainforemail'],
|
||||
'type' => 'select',
|
||||
'select_var' => $subcanemaildomain
|
||||
'select_var' => $subcanemaildomain,
|
||||
'selected' => '@TODO'
|
||||
),
|
||||
'dkim' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('dkim.use_dkim') == '1' ? true : false),
|
||||
'label' => 'DomainKeys',
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
'1'
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => true
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
return array(
|
||||
'domain_edit' => array(
|
||||
'title' => $lng['admin']['domain_edit'],
|
||||
'image' => 'icons/domain_edit.png',
|
||||
'image' => 'fa-solid fa-globe',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['domains']['domainsettings'],
|
||||
@@ -33,7 +33,7 @@ return array(
|
||||
'label' => $lng['admin']['customer'],
|
||||
'type' => (\Froxlor\Settings::Get('panel.allow_domain_change_customer') == '1' ? 'select' : 'label'),
|
||||
'select_var' => (isset($customers) ? $customers : null),
|
||||
'value' => (isset($result['customername']) ? $result['customername'] : null),
|
||||
'selected' => (isset($result['customername']) ? $result['customername'] : null),
|
||||
'mandatory' => true
|
||||
),
|
||||
'adminid' => array(
|
||||
@@ -41,20 +41,22 @@ return array(
|
||||
'label' => $lng['admin']['admin'],
|
||||
'type' => (\Froxlor\Settings::Get('panel.allow_domain_change_admin') == '1' ? 'select' : 'label'),
|
||||
'select_var' => (isset($admins) ? $admins : null),
|
||||
'value' => (isset($result['adminname']) ? $result['adminname'] : null),
|
||||
'selected' => (isset($result['adminname']) ? $result['adminname'] : null),
|
||||
'mandatory' => true
|
||||
),
|
||||
'alias' => array(
|
||||
'visible' => ($alias_check == '0' ? true : false),
|
||||
'label' => $lng['domains']['aliasdomain'],
|
||||
'type' => 'select',
|
||||
'select_var' => $domains
|
||||
'select_var' => $domains,
|
||||
'selected' => '@TODO'
|
||||
),
|
||||
'issubof' => array(
|
||||
'label' => $lng['domains']['issubof'],
|
||||
'desc' => $lng['domains']['issubofinfo'],
|
||||
'type' => 'select',
|
||||
'select_var' => $subtodomains
|
||||
'select_var' => $subtodomains,
|
||||
'selected' => '@TODO'
|
||||
),
|
||||
'associated_info' => array(
|
||||
'label' => $lng['domains']['associated_with_domain'],
|
||||
@@ -65,15 +67,8 @@ return array(
|
||||
'label' => $lng['admin']['domain_editable']['title'],
|
||||
'desc' => $lng['admin']['domain_editable']['desc'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['caneditdomain']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['caneditdomain']
|
||||
),
|
||||
'add_date' => array(
|
||||
'label' => $lng['domains']['add_date'],
|
||||
@@ -121,25 +116,18 @@ return array(
|
||||
'label' => $lng['admin']['selectserveralias'],
|
||||
'desc' => $lng['admin']['selectserveralias_desc'],
|
||||
'type' => 'select',
|
||||
'select_var' => $serveraliasoptions
|
||||
'select_var' => $serveraliasoptions,
|
||||
'selected' => '@TODO'
|
||||
),
|
||||
'speciallogfile' => array(
|
||||
'label' => $lng['admin']['speciallogfile']['title'],
|
||||
'desc' => $lng['admin']['speciallogfile']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['speciallogfile']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['speciallogfile']
|
||||
),
|
||||
'specialsettings' => array(
|
||||
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
|
||||
'style' => 'align-top',
|
||||
'label' => $lng['admin']['ownvhostsettings'],
|
||||
'desc' => $lng['serversettings']['default_vhostconf']['description'],
|
||||
'type' => 'textarea',
|
||||
@@ -152,58 +140,30 @@ return array(
|
||||
'label' => $lng['admin']['specialsettingsforsubdomains'],
|
||||
'desc' => $lng['serversettings']['specialsettingsforsubdomains']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
\Froxlor\Settings::Get('system.apply_specialsettings_default') == 1 ? '1' : ''
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => \Froxlor\Settings::Get('system.apply_specialsettings_default') == 1 ? '1' : '0'
|
||||
),
|
||||
'notryfiles' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('system.webserver') == 'nginx' && $userinfo['change_serversettings'] == '1'),
|
||||
'label' => $lng['admin']['notryfiles']['title'],
|
||||
'desc' => $lng['admin']['notryfiles']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['notryfiles']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['notryfiles']
|
||||
),
|
||||
'writeaccesslog' => array(
|
||||
'label' => $lng['admin']['writeaccesslog']['title'],
|
||||
'desc' => $lng['admin']['writeaccesslog']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['writeaccesslog']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['writeaccesslog']
|
||||
),
|
||||
'writeerrorlog' => array(
|
||||
'label' => $lng['admin']['writeerrorlog']['title'],
|
||||
'desc' => $lng['admin']['writeerrorlog']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['writeerrorlog']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['writeerrorlog']
|
||||
)
|
||||
)
|
||||
),
|
||||
@@ -216,15 +176,8 @@ return array(
|
||||
'visible' => ($ssl_ipsandports != '' ? true : false),
|
||||
'label' => $lng['admin']['domain_sslenabled'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['ssl_enabled']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['ssl_enabled']
|
||||
),
|
||||
'no_ssl_available_info' => array(
|
||||
'visible' => ($ssl_ipsandports == '' ? true : false),
|
||||
@@ -245,59 +198,31 @@ return array(
|
||||
'label' => $lng['domains']['ssl_redirect']['title'],
|
||||
'desc' => $lng['domains']['ssl_redirect']['description'] . ($result['temporary_ssl_redirect'] > 1 ? $lng['domains']['ssl_redirect_temporarilydisabled'] : ''),
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['ssl_redirect']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['ssl_redirect']
|
||||
),
|
||||
'letsencrypt' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('system.leenabled') == '1' ? ($ssl_ipsandports != '' ? true : false) : false),
|
||||
'label' => $lng['admin']['letsencrypt']['title'],
|
||||
'desc' => $lng['admin']['letsencrypt']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['letsencrypt']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['letsencrypt']
|
||||
),
|
||||
'http2' => array(
|
||||
'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.http2_support') == '1',
|
||||
'label' => $lng['admin']['domain_http2']['title'],
|
||||
'desc' => $lng['admin']['domain_http2']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['http2']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['http2']
|
||||
),
|
||||
'override_tls' => array(
|
||||
'visible' => (($ssl_ipsandports != '' ? true : false) && $userinfo['change_serversettings'] == '1' ? true : false),
|
||||
'label' => $lng['admin']['domain_override_tls'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['override_tls']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['override_tls']
|
||||
),
|
||||
'ssl_protocols' => array(
|
||||
'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(
|
||||
array(
|
||||
'value' => 'TLSv1',
|
||||
'label' => 'TLSv1<br />'
|
||||
'label' => 'TLSv1'
|
||||
),
|
||||
array(
|
||||
'value' => 'TLSv1.1',
|
||||
'label' => 'TLSv1.1<br />'
|
||||
'label' => 'TLSv1.1'
|
||||
),
|
||||
array(
|
||||
'value' => 'TLSv1.2',
|
||||
'label' => 'TLSv1.2<br />'
|
||||
'label' => 'TLSv1.2'
|
||||
),
|
||||
array(
|
||||
'value' => 'TLSv1.3',
|
||||
'label' => 'TLSv1.3<br />'
|
||||
'label' => 'TLSv1.3'
|
||||
)
|
||||
),
|
||||
'is_array' => 1
|
||||
@@ -341,7 +266,6 @@ return array(
|
||||
),
|
||||
'ssl_specialsettings' => array(
|
||||
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
|
||||
'style' => 'align-top',
|
||||
'label' => $lng['admin']['ownsslvhostsettings'],
|
||||
'desc' => $lng['serversettings']['default_vhostconf']['description'],
|
||||
'type' => 'textarea',
|
||||
@@ -352,23 +276,16 @@ return array(
|
||||
'include_specialsettings' => array(
|
||||
'label' => $lng['admin']['include_ownvhostsettings'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['include_specialsettings']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['include_specialsettings']
|
||||
),
|
||||
'hsts_maxage' => array(
|
||||
'visible' => ($ssl_ipsandports != '' ? true : false),
|
||||
'label' => $lng['admin']['domain_hsts_maxage']['title'],
|
||||
'desc' => $lng['admin']['domain_hsts_maxage']['description'],
|
||||
'type' => 'int',
|
||||
'int_min' => 0,
|
||||
'int_max' => 94608000, // 3-years
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 94608000, // 3-years
|
||||
'value' => $result['hsts']
|
||||
),
|
||||
'hsts_sub' => array(
|
||||
@@ -376,73 +293,38 @@ return array(
|
||||
'label' => $lng['admin']['domain_hsts_incsub']['title'],
|
||||
'desc' => $lng['admin']['domain_hsts_incsub']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['hsts_sub']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['hsts_sub']
|
||||
),
|
||||
'hsts_preload' => array(
|
||||
'visible' => ($ssl_ipsandports != '' ? true : false),
|
||||
'label' => $lng['admin']['domain_hsts_preload']['title'],
|
||||
'desc' => $lng['admin']['domain_hsts_preload']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['hsts_preload']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['hsts_preload']
|
||||
),
|
||||
'ocsp_stapling' => array(
|
||||
'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd',
|
||||
'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'] : ""),
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['ocsp_stapling']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['ocsp_stapling']
|
||||
),
|
||||
'honorcipherorder' => array(
|
||||
'visible' => ($ssl_ipsandports != '' ? true : false),
|
||||
'label' => $lng['admin']['domain_honorcipherorder'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['ssl_honorcipherorder']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['ssl_honorcipherorder']
|
||||
),
|
||||
'sessiontickets' => array(
|
||||
'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.sessionticketsenabled' != '1'),
|
||||
'label' => $lng['admin']['domain_sessiontickets'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['ssl_sessiontickets']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['ssl_sessiontickets']
|
||||
)
|
||||
)
|
||||
),
|
||||
@@ -454,60 +336,40 @@ return array(
|
||||
'openbasedir' => array(
|
||||
'label' => 'OpenBasedir',
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['openbasedir']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['openbasedir']
|
||||
),
|
||||
'phpenabled' => array(
|
||||
'label' => $lng['admin']['phpenabled'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['phpenabled']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['phpenabled']
|
||||
),
|
||||
'phpsettingid' => array(
|
||||
'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1) ? true : false),
|
||||
'label' => $lng['admin']['phpsettings']['title'],
|
||||
'type' => 'select',
|
||||
'select_var' => $phpconfigs
|
||||
'select_var' => $phpconfigs,
|
||||
'selected' => '@TODO'
|
||||
),
|
||||
'phpsettingsforsubdomains' => array(
|
||||
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
|
||||
'label' => $lng['admin']['phpsettingsforsubdomains'],
|
||||
'desc' => $lng['serversettings']['phpsettingsforsubdomains']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
\Froxlor\Settings::Get('system.apply_phpconfigs_default') == 1 ? '1' : ''
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => \Froxlor\Settings::Get('system.apply_phpconfigs_default') == 1 ? '1' : '0'
|
||||
),
|
||||
'mod_fcgid_starter' => array(
|
||||
'visible' => ((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||
'label' => $lng['admin']['mod_fcgid_starter']['title'],
|
||||
'type' => 'text',
|
||||
'type' => 'number',
|
||||
'value' => ((int) $result['mod_fcgid_starter'] != - 1 ? $result['mod_fcgid_starter'] : '')
|
||||
),
|
||||
'mod_fcgid_maxrequests' => array(
|
||||
'visible' => ((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||
'label' => $lng['admin']['mod_fcgid_maxrequests']['title'],
|
||||
'type' => 'text',
|
||||
'type' => 'number',
|
||||
'value' => ((int) $result['mod_fcgid_maxrequests'] != - 1 ? $result['mod_fcgid_maxrequests'] : '')
|
||||
)
|
||||
)
|
||||
@@ -520,15 +382,8 @@ return array(
|
||||
'isbinddomain' => array(
|
||||
'label' => 'Nameserver',
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['isbinddomain']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['isbinddomain']
|
||||
),
|
||||
'zonefile' => array(
|
||||
'label' => 'Zonefile',
|
||||
@@ -545,47 +400,27 @@ return array(
|
||||
'isemaildomain' => array(
|
||||
'label' => $lng['admin']['emaildomain'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['isemaildomain']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['isemaildomain']
|
||||
),
|
||||
'email_only' => array(
|
||||
'label' => $lng['admin']['email_only'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['email_only']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['email_only']
|
||||
),
|
||||
'subcanemaildomain' => array(
|
||||
'label' => $lng['admin']['subdomainforemail'],
|
||||
'type' => 'select',
|
||||
'select_var' => $subcanemaildomain
|
||||
'select_var' => $subcanemaildomain,
|
||||
'selected' => '@TODO'
|
||||
),
|
||||
'dkim' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('dkim.use_dkim') == '1' ? true : false),
|
||||
'label' => 'DomainKeys',
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['dkim']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['dkim']
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
return array(
|
||||
'domain_import' => array(
|
||||
'title' => $lng['domains']['domain_import'],
|
||||
'image' => 'icons/domain_add.png',
|
||||
'image' => 'fa-solid fa-file-import',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['domains']['domain_import'],
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
return array(
|
||||
'fpmconfig_add' => array(
|
||||
'title' => $lng['admin']['phpsettings']['addsettings'],
|
||||
'image' => 'icons/phpsettings_add.png',
|
||||
'image' => 'fa-solid fa-plus',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['admin']['phpsettings']['addsettings'],
|
||||
@@ -32,53 +32,56 @@ return array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['reload'],
|
||||
'type' => 'text',
|
||||
'maxlength' => 255,
|
||||
'value' => 'service php7.3-fpm restart'
|
||||
'value' => 'service php7.4-fpm restart'
|
||||
),
|
||||
'config_dir' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['configdir'],
|
||||
'type' => 'text',
|
||||
'maxlength' => 255,
|
||||
'value' => '/etc/php/7.3/fpm/pool.d/'
|
||||
'value' => '/etc/php/7.4/fpm/pool.d/'
|
||||
),
|
||||
'pm' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['pm'],
|
||||
'type' => 'select',
|
||||
'select_var' => $pm_select
|
||||
'select_var' => $pm_select,
|
||||
'selected' => '@TODO'
|
||||
),
|
||||
'max_children' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['max_children']['title'],
|
||||
'desc' => $lng['serversettings']['phpfpm_settings']['max_children']['description'],
|
||||
'type' => 'int',
|
||||
'value' => 5
|
||||
'type' => 'number',
|
||||
'value' => 5,
|
||||
'min' => 1
|
||||
),
|
||||
'start_servers' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['start_servers']['title'],
|
||||
'desc' => $lng['serversettings']['phpfpm_settings']['start_servers']['description'],
|
||||
'type' => 'int',
|
||||
'value' => 2
|
||||
'type' => 'number',
|
||||
'value' => 2,
|
||||
'min' => 1
|
||||
),
|
||||
'min_spare_servers' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['title'],
|
||||
'desc' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['description'],
|
||||
'type' => 'int',
|
||||
'type' => 'number',
|
||||
'value' => 1
|
||||
),
|
||||
'max_spare_servers' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['title'],
|
||||
'desc' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['description'],
|
||||
'type' => 'int',
|
||||
'type' => 'number',
|
||||
'value' => 3
|
||||
),
|
||||
'max_requests' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['max_requests']['title'],
|
||||
'desc' => $lng['serversettings']['phpfpm_settings']['max_requests']['description'],
|
||||
'type' => 'int',
|
||||
'type' => 'number',
|
||||
'value' => 0
|
||||
),
|
||||
'idle_timeout' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['title'],
|
||||
'desc' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['description'],
|
||||
'type' => 'int',
|
||||
'type' => 'number',
|
||||
'value' => 10
|
||||
),
|
||||
'limit_extensions' => array(
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
return array(
|
||||
'fpmconfig_edit' => array(
|
||||
'title' => $lng['admin']['phpsettings']['editsettings'],
|
||||
'image' => 'icons/phpsettings_edit.png',
|
||||
'image' => 'fa-solid fa-pen',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['admin']['phpsettings']['editsettings'],
|
||||
@@ -44,42 +44,45 @@ return array(
|
||||
'pm' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['pm'],
|
||||
'type' => 'select',
|
||||
'select_var' => $pm_select
|
||||
'select_var' => $pm_select,
|
||||
'selected' => '@TODO'
|
||||
),
|
||||
'max_children' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['max_children']['title'],
|
||||
'desc' => $lng['serversettings']['phpfpm_settings']['max_children']['description'],
|
||||
'type' => 'int',
|
||||
'value' => $result['max_children']
|
||||
'type' => 'number',
|
||||
'value' => $result['max_children'],
|
||||
'min' => 1
|
||||
),
|
||||
'start_servers' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['start_servers']['title'],
|
||||
'desc' => $lng['serversettings']['phpfpm_settings']['start_servers']['description'],
|
||||
'type' => 'int',
|
||||
'value' => $result['start_servers']
|
||||
'type' => 'number',
|
||||
'value' => $result['start_servers'],
|
||||
'min' => 1
|
||||
),
|
||||
'min_spare_servers' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['title'],
|
||||
'desc' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['description'],
|
||||
'type' => 'int',
|
||||
'type' => 'number',
|
||||
'value' => $result['min_spare_servers']
|
||||
),
|
||||
'max_spare_servers' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['title'],
|
||||
'desc' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['description'],
|
||||
'type' => 'int',
|
||||
'type' => 'number',
|
||||
'value' => $result['max_spare_servers']
|
||||
),
|
||||
'max_requests' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['max_requests']['title'],
|
||||
'desc' => $lng['serversettings']['phpfpm_settings']['max_requests']['description'],
|
||||
'type' => 'int',
|
||||
'type' => 'number',
|
||||
'value' => $result['max_requests']
|
||||
),
|
||||
'idle_timeout' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['title'],
|
||||
'desc' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['description'],
|
||||
'type' => 'int',
|
||||
'type' => 'number',
|
||||
'value' => $result['idle_timeout']
|
||||
),
|
||||
'limit_extensions' => array(
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
return array(
|
||||
'phpconfig_add' => array(
|
||||
'title' => $lng['admin']['phpsettings']['addsettings'],
|
||||
'image' => 'icons/phpsettings_add.png',
|
||||
'image' => 'fa-solid fa-plus',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['admin']['phpsettings']['addsettings'],
|
||||
@@ -39,7 +39,8 @@ return array(
|
||||
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
'label' => $lng['admin']['phpsettings']['fpmdesc'],
|
||||
'type' => 'select',
|
||||
'select_var' => $fpmconfigs
|
||||
'select_var' => $fpmconfigs,
|
||||
'selected' => '@TODO'
|
||||
),
|
||||
'file_extensions' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||
@@ -52,12 +53,12 @@ return array(
|
||||
'mod_fcgid_starter' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||
'label' => $lng['admin']['mod_fcgid_starter']['title'],
|
||||
'type' => 'text'
|
||||
'type' => 'number'
|
||||
),
|
||||
'mod_fcgid_maxrequests' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||
'label' => $lng['admin']['mod_fcgid_maxrequests']['title'],
|
||||
'type' => 'text'
|
||||
'type' => 'number'
|
||||
),
|
||||
'mod_fcgid_umask' => array(
|
||||
'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),
|
||||
'label' => $lng['admin']['phpsettings']['enable_slowlog'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
'value' => '1',
|
||||
'checked' => false
|
||||
),
|
||||
'phpfpm_reqtermtimeout' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
@@ -96,73 +92,64 @@ return array(
|
||||
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
'label' => $lng['admin']['phpsettings']['pass_authorizationheader'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
'value' => '1',
|
||||
'checked' => false
|
||||
),
|
||||
'override_fpmconfig' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
'value' => '1',
|
||||
'checked' => false
|
||||
),
|
||||
'pm' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['pm'],
|
||||
'desc' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
|
||||
'type' => 'select',
|
||||
'select_var' => $pm_select
|
||||
'select_var' => $pm_select,
|
||||
'selected' => '@TODO'
|
||||
),
|
||||
'max_children' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['max_children']['title'],
|
||||
'desc' => $lng['serversettings']['phpfpm_settings']['max_children']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
|
||||
'type' => 'int',
|
||||
'type' => 'number',
|
||||
'value' => 1
|
||||
),
|
||||
'start_servers' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['start_servers']['title'],
|
||||
'desc' => $lng['serversettings']['phpfpm_settings']['start_servers']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
|
||||
'type' => 'int',
|
||||
'type' => 'number',
|
||||
'value' => 20
|
||||
),
|
||||
'min_spare_servers' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
'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'],
|
||||
'type' => 'int',
|
||||
'type' => 'number',
|
||||
'value' => 5
|
||||
),
|
||||
'max_spare_servers' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
'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'],
|
||||
'type' => 'int',
|
||||
'type' => 'number',
|
||||
'value' => 35
|
||||
),
|
||||
'max_requests' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['max_requests']['title'],
|
||||
'desc' => $lng['serversettings']['phpfpm_settings']['max_requests']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
|
||||
'type' => 'int',
|
||||
'type' => 'number',
|
||||
'value' => 0
|
||||
),
|
||||
'idle_timeout' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['title'],
|
||||
'desc' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
|
||||
'type' => 'int',
|
||||
'type' => 'number',
|
||||
'value' => 10
|
||||
),
|
||||
'limit_extensions' => array(
|
||||
@@ -173,7 +160,6 @@ return array(
|
||||
'value' => '.php'
|
||||
),
|
||||
'phpsettings' => array(
|
||||
'style' => 'align-top',
|
||||
'label' => $lng['admin']['phpsettings']['phpinisettings'],
|
||||
'type' => 'textarea',
|
||||
'cols' => 80,
|
||||
@@ -184,13 +170,8 @@ return array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['allow_all_customers']['title'],
|
||||
'desc' => $lng['serversettings']['phpfpm_settings']['allow_all_customers']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
'value' => '1',
|
||||
'checked' => false
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
return array(
|
||||
'phpconfig_edit' => array(
|
||||
'title' => $lng['admin']['phpsettings']['editsettings'],
|
||||
'image' => 'icons/phpsettings_edit.png',
|
||||
'image' => 'fa-solid fa-pen',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['admin']['phpsettings']['editsettings'],
|
||||
@@ -40,7 +40,8 @@ return array(
|
||||
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
'label' => $lng['admin']['phpsettings']['fpmdesc'],
|
||||
'type' => 'select',
|
||||
'select_var' => $fpmconfigs
|
||||
'select_var' => $fpmconfigs,
|
||||
'selected' => '@TODO'
|
||||
),
|
||||
'file_extensions' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||
@@ -53,13 +54,13 @@ return array(
|
||||
'mod_fcgid_starter' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||
'label' => $lng['admin']['mod_fcgid_starter']['title'],
|
||||
'type' => 'text',
|
||||
'type' => 'number',
|
||||
'value' => ((int) $result['mod_fcgid_starter'] != - 1 ? $result['mod_fcgid_starter'] : '')
|
||||
),
|
||||
'mod_fcgid_maxrequests' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||
'label' => $lng['admin']['mod_fcgid_maxrequests']['title'],
|
||||
'type' => 'text',
|
||||
'type' => 'number',
|
||||
'value' => ((int) $result['mod_fcgid_maxrequests'] != - 1 ? $result['mod_fcgid_maxrequests'] : '')
|
||||
),
|
||||
'mod_fcgid_umask' => array(
|
||||
@@ -73,15 +74,8 @@ return array(
|
||||
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
'label' => $lng['admin']['phpsettings']['enable_slowlog'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['fpm_slowlog']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['fpm_slowlog']
|
||||
),
|
||||
'phpfpm_reqtermtimeout' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
@@ -101,76 +95,63 @@ return array(
|
||||
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
'label' => $lng['admin']['phpsettings']['pass_authorizationheader'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['pass_authorizationheader']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['pass_authorizationheader']
|
||||
),
|
||||
'override_fpmconfig' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['override_fpmconfig']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['override_fpmconfig']
|
||||
),
|
||||
'pm' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['pm'],
|
||||
'desc' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
|
||||
'type' => 'select',
|
||||
'select_var' => $pm_select
|
||||
'select_var' => $pm_select,
|
||||
'selected' => '@TODO'
|
||||
),
|
||||
'max_children' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['max_children']['title'],
|
||||
'desc' => $lng['serversettings']['phpfpm_settings']['max_children']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
|
||||
'type' => 'int',
|
||||
'type' => 'number',
|
||||
'value' => $result['max_children']
|
||||
),
|
||||
'start_servers' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['start_servers']['title'],
|
||||
'desc' => $lng['serversettings']['phpfpm_settings']['start_servers']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
|
||||
'type' => 'int',
|
||||
'type' => 'number',
|
||||
'value' => $result['start_servers']
|
||||
),
|
||||
'min_spare_servers' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
'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'],
|
||||
'type' => 'int',
|
||||
'type' => 'number',
|
||||
'value' => $result['min_spare_servers']
|
||||
),
|
||||
'max_spare_servers' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
'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'],
|
||||
'type' => 'int',
|
||||
'type' => 'number',
|
||||
'value' => $result['max_spare_servers']
|
||||
),
|
||||
'max_requests' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['max_requests']['title'],
|
||||
'desc' => $lng['serversettings']['phpfpm_settings']['max_requests']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
|
||||
'type' => 'int',
|
||||
'type' => 'number',
|
||||
'value' => $result['max_requests']
|
||||
),
|
||||
'idle_timeout' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['title'],
|
||||
'desc' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
|
||||
'type' => 'int',
|
||||
'type' => 'number',
|
||||
'value' => $result['idle_timeout']
|
||||
),
|
||||
'limit_extensions' => array(
|
||||
@@ -181,7 +162,6 @@ return array(
|
||||
'value' => $result['limit_extensions']
|
||||
),
|
||||
'phpsettings' => array(
|
||||
'style' => 'align-top',
|
||||
'label' => $lng['admin']['phpsettings']['phpinisettings'],
|
||||
'type' => 'textarea',
|
||||
'cols' => 80,
|
||||
@@ -192,13 +172,8 @@ return array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['allow_all_customers']['title'],
|
||||
'desc' => $lng['serversettings']['phpfpm_settings']['allow_all_customers']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
'value' => '1',
|
||||
'checked' => false
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
return array(
|
||||
'plans_add' => array(
|
||||
'title' => $lng['admin']['plans']['add'],
|
||||
'image' => 'icons/templates_add_big.png',
|
||||
'image' => 'fa-solid fa-plus',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['admin']['plans']['plan_details'],
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
return array(
|
||||
'plans_edit' => array(
|
||||
'title' => $lng['admin']['plans']['edit'],
|
||||
'image' => 'icons/templates_edit_big.png',
|
||||
'image' => 'fa-solid fa-pen',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['admin']['plans']['plan_details'],
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
return array(
|
||||
'filetemplate_add' => array(
|
||||
'title' => $lng['admin']['templates']['template_add'],
|
||||
'image' => 'icons/templates_add.png',
|
||||
'image' => 'fa-solid fa-plus',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['admin']['templates']['template_add'],
|
||||
@@ -26,7 +26,8 @@ return array(
|
||||
'template' => array(
|
||||
'label' => $lng['admin']['templates']['action'],
|
||||
'type' => 'select',
|
||||
'select_var' => $free_templates
|
||||
'select_var' => $free_templates,
|
||||
'selected' => '@TODO'
|
||||
),
|
||||
'filecontent' => array(
|
||||
'label' => $lng['admin']['templates']['filecontent'],
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
return array(
|
||||
'filetemplate_edit' => array(
|
||||
'title' => $lng['admin']['templates']['template_edit'],
|
||||
'image' => 'icons/templates_edit.png',
|
||||
'image' => 'fa-solid fa-pen',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['admin']['templates']['template_edit'],
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
return array(
|
||||
'template_add' => array(
|
||||
'title' => $lng['admin']['templates']['template_add'],
|
||||
'image' => 'icons/templates_add.png',
|
||||
'image' => 'fa-solid fa-plus',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['admin']['templates']['template_add'],
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
return array(
|
||||
'template_edit' => array(
|
||||
'title' => $lng['admin']['templates']['template_edit'],
|
||||
'image' => 'icons/templates_edit.png',
|
||||
'image' => 'fa-solid fa-pen',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['admin']['templates']['template_edit'],
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
return array(
|
||||
'domain_ssleditor' => array(
|
||||
'title' => $lng['panel']['ssleditor'],
|
||||
'image' => 'icons/ssl.png',
|
||||
'image' => 'fa-solid fa-lock',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => 'SSL certificates',
|
||||
@@ -30,7 +30,6 @@ return array(
|
||||
'display' => $result_domain['domain']
|
||||
),
|
||||
'ssl_cert_file' => array(
|
||||
'style' => 'align-top',
|
||||
'label' => $lng['admin']['ipsandports']['ssl_cert_file_content'],
|
||||
'desc' => $lng['admin']['ipsandports']['ssl_paste_description'],
|
||||
'type' => 'textarea',
|
||||
@@ -39,7 +38,6 @@ return array(
|
||||
'value' => $result['ssl_cert_file']
|
||||
),
|
||||
'ssl_key_file' => array(
|
||||
'style' => 'align-top',
|
||||
'label' => $lng['admin']['ipsandports']['ssl_key_file_content'],
|
||||
'desc' => $lng['admin']['ipsandports']['ssl_paste_description'],
|
||||
'type' => 'textarea',
|
||||
@@ -48,7 +46,6 @@ return array(
|
||||
'value' => $result['ssl_key_file']
|
||||
),
|
||||
'ssl_cert_chainfile' => array(
|
||||
'style' => 'align-top',
|
||||
'label' => $lng['admin']['ipsandports']['ssl_cert_chainfile_content'],
|
||||
'desc' => $lng['admin']['ipsandports']['ssl_paste_description'] . $lng['admin']['ipsandports']['ssl_cert_chainfile_content_desc'],
|
||||
'type' => 'textarea',
|
||||
@@ -57,7 +54,6 @@ return array(
|
||||
'value' => $result['ssl_cert_chainfile']
|
||||
),
|
||||
'ssl_ca_file' => array(
|
||||
'style' => 'align-top',
|
||||
'label' => $lng['admin']['ipsandports']['ssl_ca_file_content'],
|
||||
'desc' => $lng['admin']['ipsandports']['ssl_paste_description'] . $lng['admin']['ipsandports']['ssl_ca_file_content_desc'],
|
||||
'type' => 'textarea',
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
return array(
|
||||
'domain_add' => array(
|
||||
'title' => $lng['domains']['subdomain_add'],
|
||||
'image' => 'icons/domain_add.png',
|
||||
'image' => 'fa-solid fa-plus',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['domains']['subdomain_add'],
|
||||
@@ -25,15 +25,14 @@ return array(
|
||||
'fields' => array(
|
||||
'subdomain' => array(
|
||||
'label' => $lng['domains']['domainname'],
|
||||
'type' => 'textul',
|
||||
'ul_field' => '',
|
||||
'has_nextto' => true
|
||||
),
|
||||
'domain' => array(
|
||||
'next_to' => 'subdomain',
|
||||
'type' => 'text',
|
||||
'next_to' => [
|
||||
'domain' => [
|
||||
'next_to_prefix' => ' . ',
|
||||
'type' => 'select',
|
||||
'select_var' => $domains
|
||||
]
|
||||
]
|
||||
),
|
||||
'alias' => array(
|
||||
'label' => $lng['domains']['aliasdomain'],
|
||||
@@ -45,7 +44,7 @@ return array(
|
||||
'desc' => (\Froxlor\Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescriptionSubdomain'] : null) . (isset($pathSelect['note']) ? $pathSelect['note'] . '<br />' . $pathSelect['value'] : ''),
|
||||
'type' => $pathSelect['type'],
|
||||
'select_var' => $pathSelect['value'],
|
||||
'value' => $pathSelect['value']
|
||||
'selected' => $pathSelect['value']
|
||||
),
|
||||
'url' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('panel.pathedit') == 'Dropdown' ? true : false),
|
||||
@@ -86,85 +85,53 @@ return array(
|
||||
'sslenabled' => array(
|
||||
'label' => $lng['admin']['domain_sslenabled'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
'1'
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => true
|
||||
),
|
||||
'ssl_redirect' => array(
|
||||
'label' => $lng['domains']['ssl_redirect']['title'],
|
||||
'desc' => $lng['domains']['ssl_redirect']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
'value' => '1',
|
||||
'checked' => false
|
||||
),
|
||||
'letsencrypt' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('system.leenabled') == '1' ? true : false),
|
||||
'label' => $lng['customer']['letsencrypt']['title'],
|
||||
'desc' => $lng['customer']['letsencrypt']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
'value' => '1',
|
||||
'checked' => false
|
||||
),
|
||||
'http2' => array(
|
||||
'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.http2_support') == '1',
|
||||
'label' => $lng['admin']['domain_http2']['title'],
|
||||
'desc' => $lng['admin']['domain_http2']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
'value' => '1',
|
||||
'checked' => false
|
||||
),
|
||||
'hsts_maxage' => array(
|
||||
'label' => $lng['admin']['domain_hsts_maxage']['title'],
|
||||
'desc' => $lng['admin']['domain_hsts_maxage']['description'],
|
||||
'type' => 'int',
|
||||
'int_min' => 0,
|
||||
'int_max' => 94608000, // 3-years
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 94608000, // 3-years
|
||||
'value' => 0
|
||||
),
|
||||
'hsts_sub' => array(
|
||||
'label' => $lng['admin']['domain_hsts_incsub']['title'],
|
||||
'desc' => $lng['admin']['domain_hsts_incsub']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
'value' => '1',
|
||||
'checked' => false
|
||||
),
|
||||
'hsts_preload' => array(
|
||||
'label' => $lng['admin']['domain_hsts_preload']['title'],
|
||||
'desc' => $lng['admin']['domain_hsts_preload']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
'value' => '1',
|
||||
'checked' => false
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
return array(
|
||||
'domain_edit' => array(
|
||||
'title' => $lng['domains']['subdomain_edit'],
|
||||
'image' => 'icons/domain_edit.png',
|
||||
'image' => 'fa-solid fa-pen',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['domains']['subdomain_edit'],
|
||||
@@ -44,7 +44,7 @@ return array(
|
||||
'desc' => (\Froxlor\Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescriptionSubdomain'] : null) . (isset($pathSelect['note']) ? '<br />' . $pathSelect['value'] : ''),
|
||||
'type' => $pathSelect['type'],
|
||||
'select_var' => $pathSelect['value'],
|
||||
'value' => $pathSelect['value']
|
||||
'selected' => $pathSelect['value']
|
||||
),
|
||||
'url' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('panel.pathedit') == 'Dropdown' ? true : false),
|
||||
@@ -70,15 +70,8 @@ return array(
|
||||
'visible' => ((($result['subcanemaildomain'] == '1' || $result['subcanemaildomain'] == '2') && $result['parentdomainid'] != '0') ? true : false),
|
||||
'label' => 'Emaildomain',
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['isemaildomain']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['isemaildomain']
|
||||
),
|
||||
'openbasedir_path' => array(
|
||||
'visible' => ($result['openbasedir'] == '1') ? true : false,
|
||||
@@ -102,95 +95,53 @@ return array(
|
||||
'sslenabled' => array(
|
||||
'label' => $lng['admin']['domain_sslenabled'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['ssl_enabled']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['ssl_enabled']
|
||||
),
|
||||
'ssl_redirect' => array(
|
||||
'label' => $lng['domains']['ssl_redirect']['title'],
|
||||
'desc' => $lng['domains']['ssl_redirect']['description'] . ($result['temporary_ssl_redirect'] > 1 ? $lng['domains']['ssl_redirect_temporarilydisabled'] : ''),
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['ssl_redirect']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['ssl_redirect']
|
||||
),
|
||||
'letsencrypt' => array(
|
||||
'visible' => \Froxlor\Settings::Get('system.leenabled') == '1' ? true : false,
|
||||
'label' => $lng['customer']['letsencrypt']['title'],
|
||||
'desc' => $lng['customer']['letsencrypt']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['letsencrypt']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['letsencrypt']
|
||||
),
|
||||
'http2' => array(
|
||||
'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.http2_support') == '1',
|
||||
'label' => $lng['admin']['domain_http2']['title'],
|
||||
'desc' => $lng['admin']['domain_http2']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['http2']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['http2']
|
||||
),
|
||||
'hsts_maxage' => array(
|
||||
'label' => $lng['admin']['domain_hsts_maxage']['title'],
|
||||
'desc' => $lng['admin']['domain_hsts_maxage']['description'],
|
||||
'type' => 'int',
|
||||
'int_min' => 0,
|
||||
'int_max' => 94608000, // 3-years
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 94608000, // 3-years
|
||||
'value' => $result['hsts']
|
||||
),
|
||||
'hsts_sub' => array(
|
||||
'label' => $lng['admin']['domain_hsts_incsub']['title'],
|
||||
'desc' => $lng['admin']['domain_hsts_incsub']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['hsts_sub']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['hsts_sub']
|
||||
),
|
||||
'hsts_preload' => array(
|
||||
'label' => $lng['admin']['domain_hsts_preload']['title'],
|
||||
'desc' => $lng['admin']['domain_hsts_preload']['description'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
$result['hsts_preload']
|
||||
)
|
||||
'value' => '1',
|
||||
'checked' => $result['hsts_preload']
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
return array(
|
||||
'emails_add' => array(
|
||||
'title' => $lng['emails']['emails_add'],
|
||||
'image' => 'icons/email_add.png',
|
||||
'image' => 'fa-solid fa-plus',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['emails']['emails_add'],
|
||||
@@ -25,26 +25,20 @@ return array(
|
||||
'fields' => array(
|
||||
'email_part' => array(
|
||||
'label' => $lng['emails']['emailaddress'],
|
||||
'type' => 'textul',
|
||||
'ul_field' => '',
|
||||
'has_nextto' => true
|
||||
),
|
||||
'domain' => array(
|
||||
'next_to' => 'email_part',
|
||||
'type' => 'text',
|
||||
'next_to' => [
|
||||
'domain' => [
|
||||
'next_to_prefix' => ' @ ',
|
||||
'type' => 'select',
|
||||
'select_var' => $domains
|
||||
]
|
||||
]
|
||||
),
|
||||
'iscatchall' => array(
|
||||
'label' => $lng['emails']['iscatchall'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
'value' => '1',
|
||||
'checked' => false
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
return array(
|
||||
'emails_edit' => array(
|
||||
'title' => $lng['emails']['emails_edit'],
|
||||
'image' => 'icons/email_edit.png',
|
||||
'image' => 'fa-solid fa-pen',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['emails']['emails_edit'],
|
||||
@@ -33,29 +33,69 @@ return array(
|
||||
'visible' => ($result['popaccountid'] != 0 ? true : false),
|
||||
'label' => $lng['emails']['account'],
|
||||
'type' => 'label',
|
||||
'value' => $lng['panel']['yes'] . ' [<a href="' . $filename . '?page=accounts&action=changepw&id=' . $result['id'] . '&s=' . $s . '">' . $lng['menue']['main']['changepassword'] . '</a>] [<a href="' . $filename . '?page=accounts&action=delete&id=' . $result['id'] . '&s=' . $s . '">' . $lng['emails']['account_delete'] . '</a>]'
|
||||
'value' => $lng['panel']['yes'],
|
||||
'next_to' => [
|
||||
'del_link' => [
|
||||
'type' => 'link',
|
||||
'href' => $filename . '?page=accounts&action=changepw&id=' . $result['id'] . '&s=' . $s,
|
||||
'label' => $lng['emails']['account_delete'],
|
||||
'classes' => 'btn btn-sm btn-danger'
|
||||
]
|
||||
]
|
||||
),
|
||||
'account_no' => array(
|
||||
'visible' => ($result['popaccountid'] == 0 ? true : false),
|
||||
'label' => $lng['emails']['account'],
|
||||
'type' => 'label',
|
||||
'value' => $lng['panel']['no'] . ' [<a href="' . $filename . '?page=accounts&action=add&id=' . $result['id'] . '&s=' . $s . '">' . $lng['emails']['account_add'] . '</a>]'
|
||||
'value' => $lng['panel']['no'],
|
||||
'next_to' => [
|
||||
'add_link' => [
|
||||
'type' => 'link',
|
||||
'href' => $filename . '?page=accounts&action=add&id=' . $result['id'] . '&s=' . $s,
|
||||
'label' => $lng['emails']['account_add'],
|
||||
'classes' => 'btn btn-sm btn-primary'
|
||||
]
|
||||
]
|
||||
),
|
||||
'mail_quota' => array(
|
||||
'visible' => ($result['popaccountid'] != 0 && \Froxlor\Settings::Get('system.mail_quota_enabled')),
|
||||
'label' => $lng['customer']['email_quota'],
|
||||
'type' => 'label',
|
||||
'value' => $result['quota'] . ' MiB [<a href="' . $filename . '?page=accounts&action=changequota&id=' . $result['id'] . '&s=' . $s . '">' . $lng['emails']['quota_edit'] . '</a>]'
|
||||
'value' => $result['quota'] . ' MiB',
|
||||
'next_to' => [
|
||||
'add_link' => [
|
||||
'type' => 'link',
|
||||
'href' => $filename . '?page=accounts&action=changequota&id=' . $result['id'] . '&s=' . $s,
|
||||
'label' => $lng['emails']['quota_edit'],
|
||||
'classes' => 'btn btn-sm btn-secondary'
|
||||
]
|
||||
]
|
||||
),
|
||||
'mail_catchall' => array(
|
||||
'label' => $lng['emails']['catchall'],
|
||||
'type' => 'label',
|
||||
'value' => ($result['iscatchall'] == 0 ? $lng['panel']['no'] : $lng['panel']['yes']) . ' [<a href="' . $filename . '?page=' . $page . '&action=togglecatchall&id=' . $result['id'] . '&s=' . $s . '">' . $lng['panel']['toggle'] . '</a>]'
|
||||
'value' => ($result['iscatchall'] == 0 ? $lng['panel']['no'] : $lng['panel']['yes']),
|
||||
'next_to' => [
|
||||
'add_link' => [
|
||||
'type' => 'link',
|
||||
'href' => $filename . '?page=' . $page . '&action=togglecatchall&id=' . $result['id'] . '&s=' . $s,
|
||||
'label' => $lng['panel']['toggle'],
|
||||
'classes' => 'btn btn-sm btn-secondary'
|
||||
]
|
||||
]
|
||||
),
|
||||
'mail_fwds' => array(
|
||||
'label' => $lng['emails']['forwarders'] . ' (' . $forwarders_count . ')',
|
||||
'type' => 'label',
|
||||
'value' => $forwarders . ' <a href="' . $filename . '?page=forwarders&action=add&id=' . $result['id'] . '&s=' . $s . '">' . $lng['emails']['forwarder_add'] . '</a>'
|
||||
'value' => $forwarders,
|
||||
'next_to' => [
|
||||
'add_link' => [
|
||||
'type' => 'link',
|
||||
'href' => $filename . '?page=forwarders&action=add&id=' . $result['id'] . '&s=' . $s,
|
||||
'label' => $lng['emails']['forwarder_add'],
|
||||
'classes' => 'btn btn-sm btn-primary'
|
||||
]
|
||||
]
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -24,19 +24,7 @@
|
||||
{% endif %}
|
||||
<div class="card-body">
|
||||
{% for id,field in section.fields %}
|
||||
{% if field.type == 'text' or field.type == 'password' or field.type == 'number' %}
|
||||
{{ 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 %}
|
||||
{{ formfields.fieldrow(id, field) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,34 @@
|
||||
{% macro bool(id, field) %}
|
||||
{% macro fieldrow(id, field, norow = false) %}
|
||||
{% if norow == false %}
|
||||
<div class="row mb-3">
|
||||
<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 %}
|
||||
{% if field.type == 'text' or field.type == 'password' or field.type == 'number' or field.type == 'file' %}
|
||||
{{ _self.input(id, field) }}
|
||||
{% elseif field.type == 'textul' %}
|
||||
{{ _self.input_ul(id, field) }}
|
||||
{% elseif field.type == 'checkbox' %}
|
||||
{{ _self.bool(id, field) }}
|
||||
{% elseif field.type == 'select' %}
|
||||
{{ _self.select(id, field) }}
|
||||
{% elseif field.type == 'textarea' %}
|
||||
{{ _self.textarea(id, field) }}
|
||||
{% elseif field.type == 'label' %}
|
||||
{{ _self.plain(id, field) }}
|
||||
{% elseif field.type == 'link' %}
|
||||
{{ _self.link(id, field) }}
|
||||
{% endif %}
|
||||
{% if norow == false %}
|
||||
</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">
|
||||
@@ -19,32 +43,41 @@
|
||||
<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 %}
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro plain(id, field) %}
|
||||
<div class="row mb-3">
|
||||
<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>
|
||||
{% if field.next_to is defined %}
|
||||
<div class="input-group">
|
||||
{% endif %}
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" readonly class="form-control-plaintext" id="{{ id }}" value="{{ field.value }}">
|
||||
{% 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>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro input(id, field) %}
|
||||
<div class="row mb-3">
|
||||
<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>
|
||||
{% if field.next_to is defined %}
|
||||
<div class="input-group">
|
||||
{% endif %}
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<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 %}/>
|
||||
</div>
|
||||
<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 %}/>
|
||||
{% if field.type == 'hidden' and field.display is defined %}
|
||||
<input type="text" readonly class="form-control-plaintext" value="{{ field.display }}">
|
||||
{% 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>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro input_ul(id, field) %}
|
||||
@@ -54,47 +87,39 @@
|
||||
{% set max = max ~ "9" %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<div class="row mb-3">
|
||||
<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">
|
||||
<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>
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
{% macro select(id, field) %}
|
||||
<div class="row mb-3">
|
||||
<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>
|
||||
{% if field.next_to is defined %}
|
||||
<div class="input-group">
|
||||
{% endif %}
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<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 %}>
|
||||
{% for val,txt in field.select_var %}
|
||||
<option value="{{ val }}" {% if field.selected is defined and field.selected == val %} selected="selected" {% endif %}>{{ txt|raw }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% 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>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro textarea(id, field) %}
|
||||
<div class="row mb-3">
|
||||
<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">
|
||||
<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 %}
|
||||
|
||||
{% macro link(id, field) %}
|
||||
<a href="{{ field.href|raw }}" class="{{ field.classes }}">{{ field.label|raw }}</a>
|
||||
{% endmacro %}
|
||||
|
||||
Reference in New Issue
Block a user