major refactoring of almost all files
This commit is contained in:
@@ -4,285 +4,297 @@
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Formfields
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, you can also view it online at
|
||||
* https://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright the authors
|
||||
* @author Froxlor team <team@froxlor.org>
|
||||
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
|
||||
*/
|
||||
return array(
|
||||
'customer_add' => array(
|
||||
'title' => $lng['admin']['customer_add'],
|
||||
|
||||
use Froxlor\Settings;
|
||||
use Froxlor\System\Crypt;
|
||||
|
||||
return [
|
||||
'customer_add' => [
|
||||
'title' => lng('admin.customer_add'),
|
||||
'image' => 'fa-solid fa-user-plus',
|
||||
'self_overview' => ['section' => 'customers', 'page' => 'customers'],
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['admin']['accountdata'],
|
||||
'sections' => [
|
||||
'section_a' => [
|
||||
'title' => lng('admin.accountdata'),
|
||||
'image' => 'icons/user_add.png',
|
||||
'fields' => array(
|
||||
'new_loginname' => array(
|
||||
'label' => $lng['login']['username'],
|
||||
'fields' => [
|
||||
'new_loginname' => [
|
||||
'label' => lng('login.username'),
|
||||
'type' => 'text',
|
||||
'placeholder' => 'Leave empty for autogenerated value'
|
||||
),
|
||||
'createstdsubdomain' => array(
|
||||
'label' => $lng['admin']['stdsubdomain_add'] . '?',
|
||||
],
|
||||
'createstdsubdomain' => [
|
||||
'label' => lng('admin.stdsubdomain_add') . '?',
|
||||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'checked' => \Froxlor\Settings::Get('system.createstdsubdom_default')
|
||||
),
|
||||
'store_defaultindex' => array(
|
||||
'label' => $lng['admin']['store_defaultindex'] . '?',
|
||||
'checked' => Settings::Get('system.createstdsubdom_default')
|
||||
],
|
||||
'store_defaultindex' => [
|
||||
'label' => lng('admin.store_defaultindex') . '?',
|
||||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'checked' => true
|
||||
),
|
||||
'new_customer_password' => array(
|
||||
'label' => $lng['login']['password'],
|
||||
],
|
||||
'new_customer_password' => [
|
||||
'label' => lng('login.password'),
|
||||
'type' => 'password',
|
||||
'autocomplete' => 'off',
|
||||
'next_to' => [
|
||||
'new_customer_password_suggestion' => array(
|
||||
'next_to_prefix' => $lng['customer']['generated_pwd'].':',
|
||||
'new_customer_password_suggestion' => [
|
||||
'next_to_prefix' => lng('customer.generated_pwd') . ':',
|
||||
'type' => 'text',
|
||||
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
|
||||
'value' => \Froxlor\System\Crypt::generatePassword(),
|
||||
'visible' => (Settings::Get('panel.password_regex') == ''),
|
||||
'value' => Crypt::generatePassword(),
|
||||
'readonly' => true
|
||||
)
|
||||
]
|
||||
]
|
||||
),
|
||||
'sendpassword' => array(
|
||||
'label' => $lng['admin']['sendpassword'],
|
||||
],
|
||||
'sendpassword' => [
|
||||
'label' => lng('admin.sendpassword'),
|
||||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'checked' => true
|
||||
),
|
||||
'def_language' => array(
|
||||
'label' => $lng['login']['language'],
|
||||
],
|
||||
'def_language' => [
|
||||
'label' => lng('login.language'),
|
||||
'type' => 'select',
|
||||
'select_var' => $languages,
|
||||
'selected' => \Froxlor\Settings::Get('panel.standardlanguage')
|
||||
),
|
||||
'api_allowed' => array(
|
||||
'label' => $lng['usersettings']['api_allowed']['title'],
|
||||
'desc' => $lng['usersettings']['api_allowed']['description'],
|
||||
'selected' => Settings::Get('panel.standardlanguage')
|
||||
],
|
||||
'api_allowed' => [
|
||||
'label' => lng('usersettings.api_allowed.title'),
|
||||
'desc' => lng('usersettings.api_allowed.description'),
|
||||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'checked' => \Froxlor\Settings::Get('api.enabled') == '1',
|
||||
'visible' => \Froxlor\Settings::Get('api.enabled') == '1'
|
||||
)
|
||||
)
|
||||
),
|
||||
'section_b' => array(
|
||||
'title' => $lng['admin']['contactdata'],
|
||||
'checked' => Settings::Get('api.enabled') == '1',
|
||||
'visible' => Settings::Get('api.enabled') == '1'
|
||||
]
|
||||
]
|
||||
],
|
||||
'section_b' => [
|
||||
'title' => lng('admin.contactdata'),
|
||||
'image' => 'icons/user_add.png',
|
||||
'fields' => array(
|
||||
'name' => array(
|
||||
'label' => $lng['customer']['name'],
|
||||
'fields' => [
|
||||
'name' => [
|
||||
'label' => lng('customer.name'),
|
||||
'type' => 'text',
|
||||
'mandatory_ex' => true
|
||||
),
|
||||
'firstname' => array(
|
||||
'label' => $lng['customer']['firstname'],
|
||||
],
|
||||
'firstname' => [
|
||||
'label' => lng('customer.firstname'),
|
||||
'type' => 'text',
|
||||
'mandatory_ex' => true
|
||||
),
|
||||
'gender' => array(
|
||||
'label' => $lng['gender']['title'],
|
||||
],
|
||||
'gender' => [
|
||||
'label' => lng('gender.title'),
|
||||
'type' => 'select',
|
||||
'select_var' => [
|
||||
0 => $lng['gender']['undef'],
|
||||
1 => $lng['gender']['male'],
|
||||
2 => $lng['gender']['female']
|
||||
0 => lng('gender.undef'),
|
||||
1 => lng('gender.male'),
|
||||
2 => lng('gender.female')
|
||||
]
|
||||
),
|
||||
'company' => array(
|
||||
'label' => $lng['customer']['company'],
|
||||
],
|
||||
'company' => [
|
||||
'label' => lng('customer.company'),
|
||||
'type' => 'text',
|
||||
'mandatory_ex' => true
|
||||
),
|
||||
'street' => array(
|
||||
'label' => $lng['customer']['street'],
|
||||
],
|
||||
'street' => [
|
||||
'label' => lng('customer.street'),
|
||||
'type' => 'text'
|
||||
),
|
||||
'zipcode' => array(
|
||||
'label' => $lng['customer']['zipcode'] . ' / ' . $lng['customer']['city'],
|
||||
],
|
||||
'zipcode' => [
|
||||
'label' => lng('customer.zipcode') . ' / ' . lng('customer.city'),
|
||||
'type' => 'text',
|
||||
'next_to' => [
|
||||
'city' => array(
|
||||
'city' => [
|
||||
'next_to_prefix' => ' / ',
|
||||
'type' => 'text'
|
||||
)
|
||||
]
|
||||
]
|
||||
),
|
||||
'phone' => array(
|
||||
'label' => $lng['customer']['phone'],
|
||||
],
|
||||
'phone' => [
|
||||
'label' => lng('customer.phone'),
|
||||
'type' => 'text'
|
||||
),
|
||||
'fax' => array(
|
||||
'label' => $lng['customer']['fax'],
|
||||
],
|
||||
'fax' => [
|
||||
'label' => lng('customer.fax'),
|
||||
'type' => 'text'
|
||||
),
|
||||
'email' => array(
|
||||
'label' => $lng['customer']['email'],
|
||||
],
|
||||
'email' => [
|
||||
'label' => lng('customer.email'),
|
||||
'type' => 'text',
|
||||
'mandatory' => true
|
||||
),
|
||||
'customernumber' => array(
|
||||
'label' => $lng['customer']['customernumber'],
|
||||
],
|
||||
'customernumber' => [
|
||||
'label' => lng('customer.customernumber'),
|
||||
'type' => 'text'
|
||||
),
|
||||
'custom_notes' => array(
|
||||
'label' => $lng['usersettings']['custom_notes']['title'],
|
||||
'desc' => $lng['usersettings']['custom_notes']['description'],
|
||||
],
|
||||
'custom_notes' => [
|
||||
'label' => lng('usersettings.custom_notes.title'),
|
||||
'desc' => lng('usersettings.custom_notes.description'),
|
||||
'type' => 'textarea',
|
||||
'cols' => 60,
|
||||
'rows' => 12
|
||||
),
|
||||
'custom_notes_show' => array(
|
||||
'label' => $lng['usersettings']['custom_notes']['show'],
|
||||
],
|
||||
'custom_notes_show' => [
|
||||
'label' => lng('usersettings.custom_notes.show'),
|
||||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'checked' => false
|
||||
)
|
||||
)
|
||||
),
|
||||
'section_cpre' => array(
|
||||
]
|
||||
]
|
||||
],
|
||||
'section_cpre' => [
|
||||
'visible' => !empty($hosting_plans),
|
||||
'title' => $lng['admin']['plans']['use_plan'],
|
||||
'title' => lng('admin.plans.use_plan'),
|
||||
'image' => 'icons/user_add.png',
|
||||
'fields' => array(
|
||||
'use_plan' => array(
|
||||
'label' => $lng['admin']['plans']['use_plan'],
|
||||
'fields' => [
|
||||
'use_plan' => [
|
||||
'label' => lng('admin.plans.use_plan'),
|
||||
'type' => 'select',
|
||||
'select_var' => $hosting_plans
|
||||
)
|
||||
)
|
||||
),
|
||||
'section_c' => array(
|
||||
'title' => $lng['admin']['servicedata'],
|
||||
]
|
||||
]
|
||||
],
|
||||
'section_c' => [
|
||||
'title' => lng('admin.servicedata'),
|
||||
'image' => 'icons/user_add.png',
|
||||
'fields' => array(
|
||||
'diskspace' => array(
|
||||
'label' => $lng['customer']['diskspace'] . ' (' . $lng['customer']['mib'] . ')',
|
||||
'fields' => [
|
||||
'diskspace' => [
|
||||
'label' => lng('customer.diskspace') . ' (' . lng('customer.mib') . ')',
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'maxlength' => 16,
|
||||
'mandatory' => true
|
||||
),
|
||||
'traffic' => array(
|
||||
'label' => $lng['customer']['traffic'] . ' (' . $lng['customer']['gib'] . ')',
|
||||
],
|
||||
'traffic' => [
|
||||
'label' => lng('customer.traffic') . ' (' . lng('customer.gib') . ')',
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'maxlength' => 14,
|
||||
'mandatory' => true
|
||||
),
|
||||
'subdomains' => array(
|
||||
'label' => $lng['customer']['subdomains'],
|
||||
],
|
||||
'subdomains' => [
|
||||
'label' => lng('customer.subdomains'),
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'maxlength' => 9,
|
||||
'mandatory' => true
|
||||
),
|
||||
'emails' => array(
|
||||
'label' => $lng['customer']['emails'],
|
||||
],
|
||||
'emails' => [
|
||||
'label' => lng('customer.emails'),
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'maxlength' => 9,
|
||||
'mandatory' => true
|
||||
),
|
||||
'email_accounts' => array(
|
||||
'label' => $lng['customer']['accounts'],
|
||||
],
|
||||
'email_accounts' => [
|
||||
'label' => lng('customer.accounts'),
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'maxlength' => 9,
|
||||
'mandatory' => true
|
||||
),
|
||||
'email_forwarders' => array(
|
||||
'label' => $lng['customer']['forwarders'],
|
||||
],
|
||||
'email_forwarders' => [
|
||||
'label' => lng('customer.forwarders'),
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'maxlength' => 9,
|
||||
'mandatory' => true
|
||||
),
|
||||
'email_quota' => array(
|
||||
'label' => $lng['customer']['email_quota'] . ' (' . $lng['customer']['mib'] . ')',
|
||||
],
|
||||
'email_quota' => [
|
||||
'label' => lng('customer.email_quota') . ' (' . lng('customer.mib') . ')',
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'maxlength' => 9,
|
||||
'visible' => \Froxlor\Settings::Get('system.mail_quota_enabled') == '1',
|
||||
'visible' => Settings::Get('system.mail_quota_enabled') == '1',
|
||||
'mandatory' => true
|
||||
),
|
||||
'email_imap' => array(
|
||||
'label' => $lng['customer']['email_imap'],
|
||||
],
|
||||
'email_imap' => [
|
||||
'label' => lng('customer.email_imap'),
|
||||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'checked' => true,
|
||||
'mandatory' => true
|
||||
),
|
||||
'email_pop3' => array(
|
||||
'label' => $lng['customer']['email_pop3'],
|
||||
],
|
||||
'email_pop3' => [
|
||||
'label' => lng('customer.email_pop3'),
|
||||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'checked' => true,
|
||||
'mandatory' => true
|
||||
),
|
||||
'ftps' => array(
|
||||
'label' => $lng['customer']['ftps'],
|
||||
],
|
||||
'ftps' => [
|
||||
'label' => lng('customer.ftps'),
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'maxlength' => 9
|
||||
),
|
||||
'mysqls' => array(
|
||||
'label' => $lng['customer']['mysqls'],
|
||||
],
|
||||
'mysqls' => [
|
||||
'label' => lng('customer.mysqls'),
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'maxlength' => 9,
|
||||
'mandatory' => true
|
||||
),
|
||||
'phpenabled' => array(
|
||||
'label' => $lng['admin']['phpenabled'] . '?',
|
||||
],
|
||||
'phpenabled' => [
|
||||
'label' => lng('admin.phpenabled') . '?',
|
||||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'checked' => true
|
||||
),
|
||||
'allowed_phpconfigs' => array(
|
||||
'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1)),
|
||||
'label' => $lng['admin']['phpsettings']['title'],
|
||||
],
|
||||
'allowed_phpconfigs' => [
|
||||
'visible' => (((int)Settings::Get('system.mod_fcgid') == 1 || (int)Settings::Get('phpfpm.enabled') == 1)),
|
||||
'label' => lng('admin.phpsettings.title'),
|
||||
'type' => 'checkbox',
|
||||
'values' => $phpconfigs,
|
||||
'value' => ((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 ?
|
||||
[\Froxlor\Settings::Get('system.mod_fcgid_defaultini')]
|
||||
: ((int) \Froxlor\Settings::Get('phpfpm.enabled') == 1 ?
|
||||
[\Froxlor\Settings::Get('phpfpm.defaultini')]
|
||||
'value' => ((int)Settings::Get('system.mod_fcgid') == 1 ?
|
||||
[Settings::Get('system.mod_fcgid_defaultini')]
|
||||
: ((int)Settings::Get('phpfpm.enabled') == 1 ?
|
||||
[Settings::Get('phpfpm.defaultini')]
|
||||
: null)),
|
||||
'is_array' => 1
|
||||
),
|
||||
'perlenabled' => array(
|
||||
'label' => $lng['admin']['perlenabled'] . '?',
|
||||
],
|
||||
'perlenabled' => [
|
||||
'label' => lng('admin.perlenabled') . '?',
|
||||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'checked' => false
|
||||
),
|
||||
'dnsenabled' => array(
|
||||
'label' => $lng['admin']['dnsenabled'] . '?',
|
||||
],
|
||||
'dnsenabled' => [
|
||||
'label' => lng('admin.dnsenabled') . '?',
|
||||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'checked' => \Froxlor\Settings::Get('system.dnsenabled') == '1',
|
||||
'visible' => \Froxlor\Settings::Get('system.dnsenabled') == '1'
|
||||
),
|
||||
'logviewenabled' => array(
|
||||
'label' => $lng['admin']['logviewenabled'] . '?',
|
||||
'checked' => Settings::Get('system.dnsenabled') == '1',
|
||||
'visible' => Settings::Get('system.dnsenabled') == '1'
|
||||
],
|
||||
'logviewenabled' => [
|
||||
'label' => lng('admin.logviewenabled') . '?',
|
||||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'checked' => true
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
];
|
||||
|
||||
@@ -4,305 +4,317 @@
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Formfields
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, you can also view it online at
|
||||
* https://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright the authors
|
||||
* @author Froxlor team <team@froxlor.org>
|
||||
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
|
||||
*/
|
||||
return array(
|
||||
'customer_edit' => array(
|
||||
'title' => $lng['admin']['customer_edit'],
|
||||
|
||||
use Froxlor\Settings;
|
||||
use Froxlor\System\Crypt;
|
||||
|
||||
return [
|
||||
'customer_edit' => [
|
||||
'title' => lng('admin.customer_edit'),
|
||||
'image' => 'fa-solid fa-user-pen',
|
||||
'self_overview' => ['section' => 'customers', 'page' => 'customers'],
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['admin']['accountdata'],
|
||||
'sections' => [
|
||||
'section_a' => [
|
||||
'title' => lng('admin.accountdata'),
|
||||
'image' => 'icons/user_edit.png',
|
||||
'fields' => array(
|
||||
'loginname' => array(
|
||||
'label' => $lng['login']['username'],
|
||||
'fields' => [
|
||||
'loginname' => [
|
||||
'label' => lng('login.username'),
|
||||
'type' => 'label',
|
||||
'value' => $result['loginname']
|
||||
),
|
||||
'documentroot' => array(
|
||||
'label' => $lng['customer']['documentroot'],
|
||||
],
|
||||
'documentroot' => [
|
||||
'label' => lng('customer.documentroot'),
|
||||
'type' => 'label',
|
||||
'value' => $result['documentroot']
|
||||
),
|
||||
'createstdsubdomain' => array(
|
||||
'label' => $lng['admin']['stdsubdomain_add'] . '?',
|
||||
],
|
||||
'createstdsubdomain' => [
|
||||
'label' => lng('admin.stdsubdomain_add') . '?',
|
||||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'checked' => ($result['standardsubdomain'] != '0') ? '1' : '0'
|
||||
),
|
||||
'deactivated' => array(
|
||||
'label' => $lng['admin']['deactivated_user'],
|
||||
],
|
||||
'deactivated' => [
|
||||
'label' => lng('admin.deactivated_user'),
|
||||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'checked' => $result['deactivated']
|
||||
),
|
||||
'new_customer_password' => array(
|
||||
'label' => $lng['login']['password'] . ' (' . $lng['panel']['emptyfornochanges'] . ')',
|
||||
],
|
||||
'new_customer_password' => [
|
||||
'label' => lng('login.password') . ' (' . lng('panel.emptyfornochanges') . ')',
|
||||
'type' => 'password',
|
||||
'autocomplete' => 'off',
|
||||
'next_to' => [
|
||||
'new_customer_password_suggestion' => array(
|
||||
'next_to_prefix' => $lng['customer']['generated_pwd'] . ':',
|
||||
'new_customer_password_suggestion' => [
|
||||
'next_to_prefix' => lng('customer.generated_pwd') . ':',
|
||||
'type' => 'text',
|
||||
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
|
||||
'value' => \Froxlor\System\Crypt::generatePassword(),
|
||||
'visible' => (Settings::Get('panel.password_regex') == ''),
|
||||
'value' => Crypt::generatePassword(),
|
||||
'readonly' => true
|
||||
)
|
||||
]
|
||||
]
|
||||
),
|
||||
'def_language' => array(
|
||||
'label' => $lng['login']['language'],
|
||||
],
|
||||
'def_language' => [
|
||||
'label' => lng('login.language'),
|
||||
'type' => 'select',
|
||||
'select_var' => $languages,
|
||||
'selected' => $result['def_language']
|
||||
),
|
||||
'api_allowed' => array(
|
||||
'label' => $lng['usersettings']['api_allowed']['title'],
|
||||
'desc' => $lng['usersettings']['api_allowed']['description'],
|
||||
],
|
||||
'api_allowed' => [
|
||||
'label' => lng('usersettings.api_allowed.title'),
|
||||
'desc' => lng('usersettings.api_allowed.description'),
|
||||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'checked' => $result['api_allowed'],
|
||||
'visible' => \Froxlor\Settings::Get('api.enabled') == '1'
|
||||
)
|
||||
)
|
||||
),
|
||||
'section_b' => array(
|
||||
'title' => $lng['admin']['contactdata'],
|
||||
'visible' => Settings::Get('api.enabled') == '1'
|
||||
]
|
||||
]
|
||||
],
|
||||
'section_b' => [
|
||||
'title' => lng('admin.contactdata'),
|
||||
'image' => 'icons/user_edit.png',
|
||||
'fields' => array(
|
||||
'name' => array(
|
||||
'label' => $lng['customer']['name'],
|
||||
'fields' => [
|
||||
'name' => [
|
||||
'label' => lng('customer.name'),
|
||||
'type' => 'text',
|
||||
'mandatory_ex' => true,
|
||||
'value' => $result['name']
|
||||
),
|
||||
'firstname' => array(
|
||||
'label' => $lng['customer']['firstname'],
|
||||
],
|
||||
'firstname' => [
|
||||
'label' => lng('customer.firstname'),
|
||||
'type' => 'text',
|
||||
'mandatory_ex' => true,
|
||||
'value' => $result['firstname']
|
||||
),
|
||||
'gender' => array(
|
||||
'label' => $lng['gender']['title'],
|
||||
],
|
||||
'gender' => [
|
||||
'label' => lng('gender.title'),
|
||||
'type' => 'select',
|
||||
'select_var' => [
|
||||
0 => $lng['gender']['undef'],
|
||||
1 => $lng['gender']['male'],
|
||||
2 => $lng['gender']['female']
|
||||
0 => lng('gender.undef'),
|
||||
1 => lng('gender.male'),
|
||||
2 => lng('gender.female')
|
||||
],
|
||||
'selected' => $result['gender']
|
||||
),
|
||||
'company' => array(
|
||||
'label' => $lng['customer']['company'],
|
||||
],
|
||||
'company' => [
|
||||
'label' => lng('customer.company'),
|
||||
'type' => 'text',
|
||||
'mandatory_ex' => true,
|
||||
'value' => $result['company']
|
||||
),
|
||||
'street' => array(
|
||||
'label' => $lng['customer']['street'],
|
||||
],
|
||||
'street' => [
|
||||
'label' => lng('customer.street'),
|
||||
'type' => 'text',
|
||||
'value' => $result['street']
|
||||
),
|
||||
'zipcode' => array(
|
||||
'label' => $lng['customer']['zipcode'] . ' / ' . $lng['customer']['city'],
|
||||
],
|
||||
'zipcode' => [
|
||||
'label' => lng('customer.zipcode') . ' / ' . lng('customer.city'),
|
||||
'type' => 'text',
|
||||
'value' => $result['zipcode'],
|
||||
'next_to' => [
|
||||
'city' => array(
|
||||
'city' => [
|
||||
'next_to_prefix' => ' / ',
|
||||
'type' => 'text',
|
||||
'value' => $result['city']
|
||||
)
|
||||
]
|
||||
]
|
||||
),
|
||||
'phone' => array(
|
||||
'label' => $lng['customer']['phone'],
|
||||
],
|
||||
'phone' => [
|
||||
'label' => lng('customer.phone'),
|
||||
'type' => 'text',
|
||||
'value' => $result['phone']
|
||||
),
|
||||
'fax' => array(
|
||||
'label' => $lng['customer']['fax'],
|
||||
],
|
||||
'fax' => [
|
||||
'label' => lng('customer.fax'),
|
||||
'type' => 'text',
|
||||
'value' => $result['fax']
|
||||
),
|
||||
'email' => array(
|
||||
'label' => $lng['customer']['email'],
|
||||
],
|
||||
'email' => [
|
||||
'label' => lng('customer.email'),
|
||||
'type' => 'text',
|
||||
'mandatory' => true,
|
||||
'value' => $result['email']
|
||||
),
|
||||
'customernumber' => array(
|
||||
'label' => $lng['customer']['customernumber'],
|
||||
],
|
||||
'customernumber' => [
|
||||
'label' => lng('customer.customernumber'),
|
||||
'type' => 'text',
|
||||
'value' => $result['customernumber']
|
||||
),
|
||||
'custom_notes' => array(
|
||||
],
|
||||
'custom_notes' => [
|
||||
'style' => 'align-top',
|
||||
'label' => $lng['usersettings']['custom_notes']['title'],
|
||||
'desc' => $lng['usersettings']['custom_notes']['description'],
|
||||
'label' => lng('usersettings.custom_notes.title'),
|
||||
'desc' => lng('usersettings.custom_notes.description'),
|
||||
'type' => 'textarea',
|
||||
'cols' => 60,
|
||||
'rows' => 12,
|
||||
'value' => $result['custom_notes']
|
||||
),
|
||||
'custom_notes_show' => array(
|
||||
'label' => $lng['usersettings']['custom_notes']['show'],
|
||||
],
|
||||
'custom_notes_show' => [
|
||||
'label' => lng('usersettings.custom_notes.show'),
|
||||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'checked' => $result['custom_notes_show']
|
||||
)
|
||||
)
|
||||
),
|
||||
'section_cpre' => array(
|
||||
]
|
||||
]
|
||||
],
|
||||
'section_cpre' => [
|
||||
'visible' => !empty($hosting_plans),
|
||||
'title' => $lng['admin']['plans']['use_plan'],
|
||||
'title' => lng('admin.plans.use_plan'),
|
||||
'image' => 'icons/user_add.png',
|
||||
'fields' => array(
|
||||
'use_plan' => array(
|
||||
'label' => $lng['admin']['plans']['use_plan'],
|
||||
'fields' => [
|
||||
'use_plan' => [
|
||||
'label' => lng('admin.plans.use_plan'),
|
||||
'type' => 'select',
|
||||
'select_var' => $hosting_plans
|
||||
)
|
||||
)
|
||||
),
|
||||
'section_c' => array(
|
||||
'title' => $lng['admin']['servicedata'],
|
||||
]
|
||||
]
|
||||
],
|
||||
'section_c' => [
|
||||
'title' => lng('admin.servicedata'),
|
||||
'image' => 'icons/user_edit.png',
|
||||
'fields' => array(
|
||||
'diskspace' => array(
|
||||
'label' => $lng['customer']['diskspace'] . ' (' . $lng['customer']['mib'] . ')',
|
||||
'fields' => [
|
||||
'diskspace' => [
|
||||
'label' => lng('customer.diskspace') . ' (' . lng('customer.mib') . ')',
|
||||
'type' => 'textul',
|
||||
'value' => $result['diskspace'],
|
||||
'maxlength' => 16,
|
||||
'mandatory' => true
|
||||
),
|
||||
'traffic' => array(
|
||||
'label' => $lng['customer']['traffic'] . ' (' . $lng['customer']['gib'] . ')',
|
||||
],
|
||||
'traffic' => [
|
||||
'label' => lng('customer.traffic') . ' (' . lng('customer.gib') . ')',
|
||||
'type' => 'textul',
|
||||
'value' => $result['traffic'],
|
||||
'maxlength' => 14,
|
||||
'mandatory' => true
|
||||
),
|
||||
'subdomains' => array(
|
||||
'label' => $lng['customer']['subdomains'],
|
||||
],
|
||||
'subdomains' => [
|
||||
'label' => lng('customer.subdomains'),
|
||||
'type' => 'textul',
|
||||
'value' => $result['subdomains'],
|
||||
'maxlength' => 9,
|
||||
'mandatory' => true
|
||||
),
|
||||
'emails' => array(
|
||||
'label' => $lng['customer']['emails'],
|
||||
],
|
||||
'emails' => [
|
||||
'label' => lng('customer.emails'),
|
||||
'type' => 'textul',
|
||||
'value' => $result['emails'],
|
||||
'maxlength' => 9,
|
||||
'mandatory' => true
|
||||
),
|
||||
'email_accounts' => array(
|
||||
'label' => $lng['customer']['accounts'],
|
||||
],
|
||||
'email_accounts' => [
|
||||
'label' => lng('customer.accounts'),
|
||||
'type' => 'textul',
|
||||
'value' => $result['email_accounts'],
|
||||
'maxlength' => 9,
|
||||
'mandatory' => true
|
||||
),
|
||||
'email_forwarders' => array(
|
||||
'label' => $lng['customer']['forwarders'],
|
||||
],
|
||||
'email_forwarders' => [
|
||||
'label' => lng('customer.forwarders'),
|
||||
'type' => 'textul',
|
||||
'value' => $result['email_forwarders'],
|
||||
'maxlength' => 9,
|
||||
'mandatory' => true
|
||||
),
|
||||
'email_quota' => array(
|
||||
'label' => $lng['customer']['email_quota'] . ' (' . $lng['customer']['mib'] . ')',
|
||||
],
|
||||
'email_quota' => [
|
||||
'label' => lng('customer.email_quota') . ' (' . lng('customer.mib') . ')',
|
||||
'type' => 'textul',
|
||||
'value' => $result['email_quota'],
|
||||
'maxlength' => 9,
|
||||
'visible' => \Froxlor\Settings::Get('system.mail_quota_enabled') == '1',
|
||||
'visible' => Settings::Get('system.mail_quota_enabled') == '1',
|
||||
'mandatory' => true
|
||||
),
|
||||
'email_imap' => array(
|
||||
'label' => $lng['customer']['email_imap'],
|
||||
],
|
||||
'email_imap' => [
|
||||
'label' => lng('customer.email_imap'),
|
||||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'checked' => $result['imap'],
|
||||
'mandatory' => true
|
||||
),
|
||||
'email_pop3' => array(
|
||||
'label' => $lng['customer']['email_pop3'],
|
||||
],
|
||||
'email_pop3' => [
|
||||
'label' => lng('customer.email_pop3'),
|
||||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'checked' => $result['pop3'],
|
||||
'mandatory' => true
|
||||
),
|
||||
'ftps' => array(
|
||||
'label' => $lng['customer']['ftps'],
|
||||
],
|
||||
'ftps' => [
|
||||
'label' => lng('customer.ftps'),
|
||||
'type' => 'textul',
|
||||
'value' => $result['ftps'],
|
||||
'maxlength' => 9
|
||||
),
|
||||
'mysqls' => array(
|
||||
'label' => $lng['customer']['mysqls'],
|
||||
],
|
||||
'mysqls' => [
|
||||
'label' => lng('customer.mysqls'),
|
||||
'type' => 'textul',
|
||||
'value' => $result['mysqls'],
|
||||
'maxlength' => 9,
|
||||
'mandatory' => true
|
||||
),
|
||||
'phpenabled' => array(
|
||||
'label' => $lng['admin']['phpenabled'] . '?',
|
||||
],
|
||||
'phpenabled' => [
|
||||
'label' => lng('admin.phpenabled') . '?',
|
||||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'checked' => $result['phpenabled']
|
||||
),
|
||||
'allowed_phpconfigs' => array(
|
||||
'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1)),
|
||||
'label' => $lng['admin']['phpsettings']['title'],
|
||||
],
|
||||
'allowed_phpconfigs' => [
|
||||
'visible' => (((int)Settings::Get('system.mod_fcgid') == 1 || (int)Settings::Get('phpfpm.enabled') == 1)),
|
||||
'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) : [],
|
||||
'is_array' => 1
|
||||
),
|
||||
'perlenabled' => array(
|
||||
'label' => $lng['admin']['perlenabled'] . '?',
|
||||
],
|
||||
'perlenabled' => [
|
||||
'label' => lng('admin.perlenabled') . '?',
|
||||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'checked' => $result['perlenabled']
|
||||
),
|
||||
'dnsenabled' => array(
|
||||
'label' => $lng['admin']['dnsenabled'] . '?',
|
||||
],
|
||||
'dnsenabled' => [
|
||||
'label' => lng('admin.dnsenabled') . '?',
|
||||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'checked' => $result['dnsenabled'],
|
||||
'visible' => \Froxlor\Settings::Get('system.dnsenabled') == '1'
|
||||
),
|
||||
'logviewenabled' => array(
|
||||
'label' => $lng['admin']['logviewenabled'] . '?',
|
||||
'visible' => Settings::Get('system.dnsenabled') == '1'
|
||||
],
|
||||
'logviewenabled' => [
|
||||
'label' => lng('admin.logviewenabled') . '?',
|
||||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'checked' => $result['logviewenabled']
|
||||
)
|
||||
)
|
||||
),
|
||||
'section_d' => array(
|
||||
'title' => $lng['admin']['movetoadmin'],
|
||||
]
|
||||
]
|
||||
],
|
||||
'section_d' => [
|
||||
'title' => lng('admin.movetoadmin'),
|
||||
'image' => 'icons/user_edit.png',
|
||||
'visible' => count($admin_select) > 0,
|
||||
'fields' => array(
|
||||
'move_to_admin' => array(
|
||||
'label' => $lng['admin']['movecustomertoadmin'],
|
||||
'fields' => [
|
||||
'move_to_admin' => [
|
||||
'label' => lng('admin.movecustomertoadmin'),
|
||||
'type' => 'select',
|
||||
'select_var' => $admin_select
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user