more work on settings

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-02-27 16:03:24 +01:00
parent a73f6ffef5
commit d9f909150d
14 changed files with 71 additions and 1410 deletions

View File

@@ -37,8 +37,7 @@ return array(
'plausibility_check_method' => array( 'plausibility_check_method' => array(
'\\Froxlor\\Validate\\Check', '\\Froxlor\\Validate\\Check',
'checkPhpInterfaceSetting' 'checkPhpInterfaceSetting'
), )
'overview_option' => true
), ),
'system_apache_24' => array( 'system_apache_24' => array(
'label' => $lng['serversettings']['apache_24'], 'label' => $lng['serversettings']['apache_24'],

View File

@@ -61,7 +61,7 @@ if ($page == 'overview' && $userinfo['change_serversettings'] == '1') {
\Froxlor\UI\Response::standard_error($lng['error']['session_timeout'], $lng['error']['session_timeout_desc']); \Froxlor\UI\Response::standard_error($lng['error']['session_timeout'], $lng['error']['session_timeout_desc']);
} }
if (\Froxlor\UI\Form::processFormEx($settings_data, $_POST, array( if (\Froxlor\UI\Form::processForm($settings_data, $_POST, array(
'filename' => $filename, 'filename' => $filename,
'action' => $action, 'action' => $action,
'page' => $page 'page' => $page

View File

@@ -5,6 +5,16 @@ namespace Froxlor\UI;
class Data class Data
{ {
public static function getFormFieldDataEmail($fieldname, $fielddata, $input)
{
return self::getFormFieldDataText($fieldname, $fielddata, $input);
}
public static function getFormFieldDataUrl($fieldname, $fielddata, $input)
{
return self::getFormFieldDataText($fieldname, $fielddata, $input);
}
public static function getFormFieldDataText($fieldname, $fielddata, $input) public static function getFormFieldDataText($fieldname, $fielddata, $input)
{ {
if (isset($input[$fieldname])) { if (isset($input[$fieldname])) {

View File

@@ -1,120 +0,0 @@
<?php
namespace Froxlor\UI;
class Fields
{
public static function getFormFieldOutputText($fieldname, $fielddata, $do_show = true)
{
$label = $fielddata['label'];
$value = htmlentities($fielddata['value']);
eval("\$returnvalue = \"" . \Froxlor\UI\Template::getTemplate("formfields/text", true) . "\";");
return $returnvalue;
}
public static function getFormFieldOutputString($fieldname, $fielddata, $do_show = true)
{
$label = $fielddata['label'];
$value = htmlentities($fielddata['value']);
eval("\$returnvalue = \"" . \Froxlor\UI\Template::getTemplate("formfields/string", true) . "\";");
return $returnvalue;
}
public static function getFormFieldOutputSelect($fieldname, $fielddata, $do_show = true)
{
$returnvalue = '';
if (isset($fielddata['select_var']) && is_array($fielddata['select_var']) && ! empty($fielddata['select_var'])) {
if (isset($fielddata['option_mode']) && $fielddata['option_mode'] == 'multiple') {
$multiple = true;
$fielddata['selected'] = explode(',', $fielddata['selected']);
} else {
$multiple = false;
}
$label = $fielddata['label'];
$options_array = $fielddata['option_options'];
$options = '';
foreach ($options_array as $value => $title) {
$options .= \Froxlor\UI\HTML::makeoption($title, $value, $fielddata['value']);
}
eval("\$returnvalue = \"" . \Froxlor\UI\Template::getTemplate("formfields/option", true) . "\";");
}
return $returnvalue;
}
/**
* fetch select-options via callback function
*/
public static function prefetchFormFieldDataSelect($fieldname, $fielddata)
{
$returnvalue = array();
if ((! isset($fielddata['select_var']) || ! is_array($fielddata['select_var']) || empty($fielddata['select_var'])) && (isset($fielddata['option_options_method']))) {
$returnvalue['select_var'] = call_user_func($fielddata['option_options_method']);
}
return $returnvalue;
}
public static function getFormFieldOutputInt($fieldname, $fielddata, $do_show = true)
{
return self::getFormFieldOutputString($fieldname, $fielddata, $do_show);
}
public static function getFormFieldOutputHiddenString($fieldname, $fielddata, $do_show = true)
{
$label = $fielddata['label'];
$value = htmlentities($fielddata['value']);
eval("\$returnvalue = \"" . \Froxlor\UI\Template::getTemplate("formfields/hiddenstring", true) . "\";");
return $returnvalue;
}
public static function getFormFieldOutputHidden($fieldname, $fielddata)
{
$returnvalue = '<input type="hidden" name="' . $fieldname . '" value="' . htmlentities($fielddata['value']) . '" />';
if (isset($fielddata['label']) && $fielddata['label'] != '') {
$label = $fielddata['label'];
$value = htmlentities($fielddata['value']);
eval("\$returnvalue .= \"" . \Froxlor\UI\Template::getTemplate("formfields/hidden", true) . "\";");
}
return $returnvalue;
}
public static function getFormFieldOutputFile($fieldname, $fielddata, $do_show = true)
{
$label = $fielddata['label'];
$value = htmlentities($fielddata['value']);
eval("\$returnvalue = \"" . \Froxlor\UI\Template::getTemplate("formfields/text", true) . "\";");
return $returnvalue;
}
public static function getFormFieldOutputImage($fieldname, $fielddata, $do_show = true)
{
global $lng;
$label = $fielddata['label'];
$value = htmlentities($fielddata['value']);
eval("\$returnvalue = \"" . \Froxlor\UI\Template::getTemplate("formfields/image", true) . "\";");
return $returnvalue;
}
public static function getFormFieldOutputDate($fieldname, $fielddata, $do_show = true)
{
if (isset($fielddata['date_timestamp']) && $fielddata['date_timestamp'] === true) {
$fielddata['value'] = date('Y-m-d', $fielddata['value']);
}
return self::getFormFieldOutputString($fieldname, $fielddata, $do_show);
}
public static function getFormFieldOutputBool($fieldname, $fielddata, $do_show = true)
{
$label = $fielddata['label'];
$boolswitch = \Froxlor\UI\HTML::makeyesno($fieldname, '1', '0', $fielddata['value']);
eval("\$returnvalue = \"" . \Froxlor\UI\Template::getTemplate("formfields/bool", true) . "\";");
return $returnvalue;
}
}

View File

@@ -59,102 +59,7 @@ class Form
return $fields; return $fields;
} }
public static function processForm(&$form, &$input, $url_params = array()) public static function processForm(&$form, &$input, $url_params = array(), $part = null, $settings_all = array(), $settings_part = null, $only_enabledisable = false)
{
if (\Froxlor\Validate\Form::validateFormDefinition($form)) {
$submitted_fields = array();
$changed_fields = array();
$saved_fields = array();
foreach ($form['groups'] as $groupname => $groupdetails) {
if (\Froxlor\Validate\Form::validateFieldDefinition($groupdetails)) {
// Prefetch form fields
foreach ($groupdetails['fields'] as $fieldname => $fielddetails) {
$groupdetails['fields'][$fieldname] = self::arrayMergePrefix($fielddetails, $fielddetails['type'], self::prefetchFormFieldData($fieldname, $fielddetails));
$form['groups'][$groupname]['fields'][$fieldname] = $groupdetails['fields'][$fieldname];
}
}
}
foreach ($form['groups'] as $groupname => $groupdetails) {
if (\Froxlor\Validate\Form::validateFieldDefinition($groupdetails)) {
// Validate fields
foreach ($groupdetails['fields'] as $fieldname => $fielddetails) {
$newfieldvalue = self::getFormFieldData($fieldname, $fielddetails, $input);
if ($newfieldvalue != $fielddetails['value']) {
if (($error = \Froxlor\Validate\Form::validateFormField($fieldname, $fielddetails, $newfieldvalue)) !== true) {
\Froxlor\UI\Response::standard_error($error, $fieldname);
} else {
$changed_fields[$fieldname] = $newfieldvalue;
}
}
$submitted_fields[$fieldname] = $newfieldvalue;
}
}
}
foreach ($form['groups'] as $groupname => $groupdetails) {
if (\Froxlor\Validate\Form::validateFieldDefinition($groupdetails)) {
// Check fields for plausibility
foreach ($groupdetails['fields'] as $fieldname => $fielddetails) {
if (($plausibility_check = self::checkPlausibilityFormField($fieldname, $fielddetails, $submitted_fields[$fieldname], $submitted_fields)) !== false) {
if (is_array($plausibility_check) && isset($plausibility_check[0])) {
if ($plausibility_check[0] == \Froxlor\Validate\Check::FORMFIELDS_PLAUSIBILITY_CHECK_OK) {
// Nothing to do here, everything's okay
} elseif ($plausibility_check[0] == \Froxlor\Validate\Check::FORMFIELDS_PLAUSIBILITY_CHECK_ERROR) {
unset($plausibility_check[0]);
$error = $plausibility_check[1];
unset($plausibility_check[1]);
$targetname = implode(' ', $plausibility_check);
\Froxlor\UI\Response::standard_error($error, $targetname);
} elseif ($plausibility_check[0] == \Froxlor\Validate\Check::FORMFIELDS_PLAUSIBILITY_CHECK_QUESTION) {
unset($plausibility_check[0]);
$question = $plausibility_check[1];
unset($plausibility_check[1]);
$targetname = implode(' ', $plausibility_check);
if (!isset($input[$question])) {
if (is_array($url_params) && isset($url_params['filename'])) {
$filename = $url_params['filename'];
unset($url_params['filename']);
} else {
$filename = '';
}
\Froxlor\UI\HTML::askYesNo($question, $filename, array_merge($url_params, $submitted_fields, array(
$question => $question
)), $targetname);
}
} else {
\Froxlor\UI\Response::standard_error('plausibilitychecknotunderstood');
}
}
}
}
}
}
foreach ($form['groups'] as $groupname => $groupdetails) {
if (\Froxlor\Validate\Form::validateFieldDefinition($groupdetails)) {
// Save fields
foreach ($groupdetails['fields'] as $fieldname => $fielddetails) {
if (isset($changed_fields[$fieldname])) {
if (($saved_field = self::saveFormField($fieldname, $fielddetails, self::manipulateFormFieldData($fieldname, $fielddetails, $changed_fields[$fieldname]))) !== false) {
$saved_fields = array_merge($saved_fields, $saved_field);
} else {
\Froxlor\UI\Response::standard_error('errorwhensaving', $fieldname);
}
}
}
}
}
// Save form
return self::saveForm($form, $saved_fields);
}
}
public static function processFormEx(&$form, &$input, $url_params = array(), $part = null, $settings_all = array(), $settings_part = null, $only_enabledisable = false)
{ {
if (\Froxlor\Validate\Form::validateFormDefinition($form)) { if (\Froxlor\Validate\Form::validateFormDefinition($form)) {
$submitted_fields = array(); $submitted_fields = array();
@@ -301,38 +206,16 @@ class Form
global $lng; global $lng;
$activated = true; $activated = true;
$option = [];
if (isset($groupdetails['fields'])) { if (isset($groupdetails['fields'])) {
foreach ($groupdetails['fields'] as $fieldname => $fielddetails) { foreach ($groupdetails['fields'] as $fielddetails) {
if (isset($fielddetails['overview_option']) && $fielddetails['overview_option'] == true) { if (isset($fielddetails['overview_option']) && $fielddetails['overview_option'] == true) {
if ($fielddetails['type'] != 'select' && $fielddetails['type'] != 'checkbox' && $fielddetails['type'] != 'option' && $fielddetails['type'] != 'bool') { if ($fielddetails['type'] != 'checkbox') {
// throw exception here as this is most likely an internal issue // throw exception here as this is most likely an internal issue
// if we messed up the arrays // if we messed up the arrays
\Froxlor\UI\Response::standard_error('overviewsettingoptionisnotavalidfield', '', true); \Froxlor\UI\Response::standard_error('overviewsettingoptionisnotavalidfield', '', true);
} }
$activated = (int) Settings::Get($fielddetails['settinggroup'] . '.' . $fielddetails['varname']);
if ($fielddetails['type'] == 'select') { break;
$options_array = $fielddetails['select_var'];
$options = [];
foreach ($options_array as $value => $vtitle) {
$options[] = [
'title' => $vtitle,
'value' => $value,
'default' => Settings::Get($fielddetails['settinggroup'] . '.' . $fielddetails['varname'])
];
}
$option['type'] = 'select';
$option['label'] = $fielddetails['label'];
$option['fieldname'] = $fieldname;
$option['options'] = $options;
$activated = true;
} else {
$option['type'] = 'bool';
$option['label'] = $lng['admin']['activated'];
$option['fieldname'] = $fieldname;
$option['value'] = Settings::Get($fielddetails['settinggroup'] . '.' . $fielddetails['varname']);
$activated = (int) Settings::Get($fielddetails['settinggroup'] . '.' . $fielddetails['varname']);
}
} }
} }
} }
@@ -341,8 +224,7 @@ class Form
'title' => $groupdetails['title'], 'title' => $groupdetails['title'],
'icon' => $groupdetails['icon'] ?? 'fa-solid fa-circle-question', 'icon' => $groupdetails['icon'] ?? 'fa-solid fa-circle-question',
'part' => $groupname, 'part' => $groupname,
'activated' => $activated, 'activated' => $activated
'option' => $option
]; ];
/** /**
@@ -354,7 +236,7 @@ class Form
$websrv = Settings::Get('system.webserver'); $websrv = Settings::Get('system.webserver');
if (!in_array($websrv, $groupdetails['websrv_avail'])) { if (!in_array($websrv, $groupdetails['websrv_avail'])) {
$item['info'] = sprintf($lng['serversettings']['option_unavailable_websrv'], implode(", ", $groupdetails['websrv_avail'])); $item['info'] = sprintf($lng['serversettings']['option_unavailable_websrv'], implode(", ", $groupdetails['websrv_avail']));
$option['visible'] = false; $item['visible'] = false;
} }
} }
@@ -366,7 +248,7 @@ class Form
global $lng; global $lng;
$returnvalue = []; $returnvalue = [];
if (is_array($fielddata) && isset($fielddata['type']) && $fielddata['type'] != '' /* && method_exists('\\Froxlor\\UI\\Fields', 'getFormFieldOutput' . ucfirst($fielddata['type'])) */) { if (is_array($fielddata) && isset($fielddata['type']) && $fielddata['type'] != '') {
if (!isset($fielddata['value'])) { if (!isset($fielddata['value'])) {
if (isset($fielddata['default'])) { if (isset($fielddata['default'])) {
@@ -417,14 +299,6 @@ class Form
$fielddata['visible'] = false; $fielddata['visible'] = false;
} }
/*
if ($do_show || (!$do_show && Settings::Get('system.hide_incompatible_settings') == '0')) {
$returnvalue = call_user_func(array(
'\\Froxlor\\UI\\Fields',
'getFormFieldOutput' . ucfirst($fielddata['type'])
), $fieldname, $fielddata, $do_show);
}
*/
$returnvalue = $fielddata; $returnvalue = $fielddata;
} }
return $returnvalue; return $returnvalue;
@@ -433,11 +307,11 @@ class Form
public static function prefetchFormFieldData($fieldname, $fielddata) public static function prefetchFormFieldData($fieldname, $fielddata)
{ {
$returnvalue = array(); $returnvalue = array();
if (is_array($fielddata) && isset($fielddata['type']) && $fielddata['type'] != '' && method_exists('\\Froxlor\\UI\\Fields', 'prefetchFormFieldData' . ucfirst($fielddata['type']))) { if (is_array($fielddata) && isset($fielddata['type']) && $fielddata['type'] == 'select') {
$returnvalue = call_user_func(array(
'\\Froxlor\\UI\\Fields', if ((!isset($fielddata['select_var']) || !is_array($fielddata['select_var']) || empty($fielddata['select_var'])) && (isset($fielddata['option_options_method']))) {
'prefetchFormFieldData' . ucfirst($fielddata['type']) $returnvalue['select_var'] = call_user_func($fielddata['option_options_method']);
), $fieldname, $fielddata); }
} }
return $returnvalue; return $returnvalue;
} }

View File

@@ -1,4 +1,5 @@
<?php <?php
namespace Froxlor\UI; namespace Froxlor\UI;
class Response class Response
@@ -86,7 +87,7 @@ class Response
$_SESSION['requestData'] = $_POST; $_SESSION['requestData'] = $_POST;
$replacer = htmlentities($replacer); $replacer = htmlentities($replacer);
if (! is_array($errors)) { if (!is_array($errors)) {
$errors = array( $errors = array(
$errors $errors
); );
@@ -164,7 +165,7 @@ class Response
*/ */
public static function standard_success($success_message = '', $replacer = '', $params = array(), $throw_exception = false) public static function standard_success($success_message = '', $replacer = '', $params = array(), $throw_exception = false)
{ {
global $s, $header, $footer, $lng, $theme; global $s, $lng;
if (isset($lng['success'][$success_message])) { if (isset($lng['success'][$success_message])) {
$success_message = strtr($lng['success'][$success_message], array( $success_message = strtr($lng['success'][$success_message], array(
@@ -189,7 +190,14 @@ class Response
$redirect_url = ''; $redirect_url = '';
} }
eval("echo \"" . Template::getTemplate('misc/success', '1') . "\";"); \Froxlor\UI\Panel\UI::twigBuffer('misc/alert.html.twig', [
exit(); 'type' => 'success',
'btntype' => 'light',
'heading' => $lng['success']['success'],
'alert_msg' => $success_message,
'redirect_link' => $redirect_url
]);
\Froxlor\UI\Panel\UI::twigOutputBuffer();
exit;
} }
} }

File diff suppressed because it is too large Load Diff

View File

@@ -1013,7 +1013,7 @@ $lng['serversettings']['perl_path']['description'] = 'Alleen relevant voor light
// ADDED IN FROXLOR 0.9.12-svn1 // ADDED IN FROXLOR 0.9.12-svn1
$lng['admin']['fcgid_settings'] = 'FCGID'; $lng['admin']['fcgid_settings'] = 'FCGID';
$lng['serversettings']['mod_fcgid_ownvhost']['title'] = 'FCGID inschakelen voor de VHost voor Froxlor'; $lng['serversettings']['mod_fcgid_ownvhost']['title'] = 'FCGID inschakelen voor de VHost voor Froxlor';
$lng['serversettings']['mod_fcgid_ownvhost']['description'] = 'Indien ingeschakeld wordt Froxlor ook uitgevoerd onder een lokale gebruiker<br /><strong>Let op:</strong>Dit vereist handmatige configuratie, zie <a target="blank" href="https://github.com/Froxlor/Froxlor/wiki/apache2-with-fcgid">FCGID - handbook</a>'; $lng['serversettings']['mod_fcgid_ownvhost']['description'] = 'Indien ingeschakeld wordt Froxlor ook uitgevoerd onder een lokale gebruiker<br /><strong>Let op:</strong>Dit vereist handmatige configuratie, zie <a target="_blank" href="https://docs.froxlor.org/general/configuration/fcgid.html">FCGID - handbook</a>';
$lng['admin']['mod_fcgid_user'] = 'Lokale gebruiker voor FCGID (Froxlor vhost)'; $lng['admin']['mod_fcgid_user'] = 'Lokale gebruiker voor FCGID (Froxlor vhost)';
$lng['admin']['mod_fcgid_group'] = 'Lokale groep voor FCGID (Froxlor vhost)'; $lng['admin']['mod_fcgid_group'] = 'Lokale groep voor FCGID (Froxlor vhost)';

View File

@@ -548,7 +548,7 @@ $lng['panel']['back'] = 'Back';
// ADDED IN 1.2.16-svn12 // ADDED IN 1.2.16-svn12
$lng['serversettings']['mod_fcgid']['title'] = 'Enable FCGID'; $lng['serversettings']['mod_fcgid']['title'] = 'Enable FCGID';
$lng['serversettings']['mod_fcgid']['description'] = 'Use this to run PHP with the corresponding user account.<br /><br /><b>This needs a special webserver configuration for Apache, see <a target="blank" href="https://github.com/Froxlor/Froxlor/wiki/apache2-with-fcgid">FCGID - handbook</a></b>'; $lng['serversettings']['mod_fcgid']['description'] = 'Use this to run PHP with the corresponding user account.<br /><br /><b>This needs a special webserver configuration for Apache, see <a target="_blank" href="https://docs.froxlor.org/general/configuration/fcgid.html">FCGID - handbook</a></b>';
$lng['serversettings']['sendalternativemail']['title'] = 'Use alternative email-address'; $lng['serversettings']['sendalternativemail']['title'] = 'Use alternative email-address';
$lng['serversettings']['sendalternativemail']['description'] = 'Send the password-email to a different address during email-account-creation'; $lng['serversettings']['sendalternativemail']['description'] = 'Send the password-email to a different address during email-account-creation';
$lng['emails']['alternative_emailaddress'] = 'Alternative e-mail-address'; $lng['emails']['alternative_emailaddress'] = 'Alternative e-mail-address';
@@ -1737,7 +1737,7 @@ $lng['domains']['import_file'] = 'CSV-File';
$lng['success']['domain_import_successfully'] = 'Successfully imported %s domains.'; $lng['success']['domain_import_successfully'] = 'Successfully imported %s domains.';
$lng['error']['domain_import_error'] = 'Following error occurred while importing domains: %s'; $lng['error']['domain_import_error'] = 'Following error occurred while importing domains: %s';
$lng['admin']['note'] = 'Note'; $lng['admin']['note'] = 'Note';
$lng['domains']['import_description'] = 'Detailed information about the structure of the import-file and how to import successfully, please visit <a href="https://github.com/Froxlor/Froxlor/wiki/Domain-import-documenation" target="_blank">https://github.com/Froxlor/Froxlor/wiki/Domain-import-documenation</a>'; $lng['domains']['import_description'] = 'Detailed information about the structure of the import-file and how to import successfully, please visit <a href="https://docs.froxlor.org/adminguide/domainimport.html" target="_blank">https://docs.froxlor.org/adminguide/domainimport.html</a>';
$lng['usersettings']['custom_notes']['title'] = 'Custom notes'; $lng['usersettings']['custom_notes']['title'] = 'Custom notes';
$lng['usersettings']['custom_notes']['description'] = 'Feel free to put any notes you want/need in here. They will show up in the admin/customer overview for the corresponding user.'; $lng['usersettings']['custom_notes']['description'] = 'Feel free to put any notes you want/need in here. They will show up in the admin/customer overview for the corresponding user.';
$lng['usersettings']['custom_notes']['show'] = 'Show your notes on the dashboard of the user'; $lng['usersettings']['custom_notes']['show'] = 'Show your notes on the dashboard of the user';

View File

@@ -542,7 +542,7 @@ $lng['panel']['back'] = 'Zurück';
// ADDED IN 1.2.16-svn12 // ADDED IN 1.2.16-svn12
$lng['serversettings']['mod_fcgid']['title'] = 'PHP über mod_fcgid/suexec einbinden'; $lng['serversettings']['mod_fcgid']['title'] = 'PHP über mod_fcgid/suexec einbinden';
$lng['serversettings']['mod_fcgid']['description'] = 'PHP wird unter dem Benutzer des Kunden ausgeführt.<br /><br /><b>Dies benötigt eine spezielle Webserver-Konfiguration für Apache, siehe <a target="blank" href="https://github.com/Froxlor/Froxlor/wiki/apache2-with-fcgid">FCGID-Handbuch</a>.</b>'; $lng['serversettings']['mod_fcgid']['description'] = 'PHP wird unter dem Benutzer des Kunden ausgeführt.<br /><br /><b>Dies benötigt eine spezielle Webserver-Konfiguration für Apache, siehe <a target="_blank" href="https://docs.froxlor.org/general/configuration/fcgid.html">FCGID-Handbuch</a>.</b>';
$lng['serversettings']['sendalternativemail']['title'] = 'Alternative E-Mail-Adresse benutzen'; $lng['serversettings']['sendalternativemail']['title'] = 'Alternative E-Mail-Adresse benutzen';
$lng['serversettings']['sendalternativemail']['description'] = 'Während des Erstellens eines Accounts das Passwort an eine andere E-Mail-Adresse senden'; $lng['serversettings']['sendalternativemail']['description'] = 'Während des Erstellens eines Accounts das Passwort an eine andere E-Mail-Adresse senden';
$lng['emails']['alternative_emailaddress'] = 'Alternative E-Mail-Adresse'; $lng['emails']['alternative_emailaddress'] = 'Alternative E-Mail-Adresse';
@@ -1460,7 +1460,7 @@ $lng['domains']['import_file'] = 'CSV-Datei';
$lng['success']['domain_import_successfully'] = 'Erfolgreich %s Domains importiert.'; $lng['success']['domain_import_successfully'] = 'Erfolgreich %s Domains importiert.';
$lng['error']['domain_import_error'] = 'Der folgende Fehler trat beim Importieren der Domains auf: %s'; $lng['error']['domain_import_error'] = 'Der folgende Fehler trat beim Importieren der Domains auf: %s';
$lng['admin']['note'] = 'Hinweis'; $lng['admin']['note'] = 'Hinweis';
$lng['domains']['import_description'] = 'Detaillierte Informationen über den Aufbau der Importdatei und einen erfolgreichen Import gibt es hier: <a href="https://github.com/Froxlor/Froxlor/wiki/Domain-import-documenation" target="_blank">https://github.com/Froxlor/Froxlor/wiki/Domain-import-documenation</a> (englisch)'; $lng['domains']['import_description'] = 'Detaillierte Informationen über den Aufbau der Importdatei und einen erfolgreichen Import gibt es hier: <a href="https://docs.froxlor.org/adminguide/domainimport.html" target="_blank">https://docs.froxlor.org/adminguide/domainimport.html</a> (englisch)';
$lng['usersettings']['custom_notes']['title'] = 'Eigene Notizen'; $lng['usersettings']['custom_notes']['title'] = 'Eigene Notizen';
$lng['usersettings']['custom_notes']['description'] = 'Hier können Notizen je nach Lust und Laune eingetragen werden. Diese werden in der Administrator/Kunden-Übersicht bei dem jeweiligen Benutzer angezeigt.'; $lng['usersettings']['custom_notes']['description'] = 'Hier können Notizen je nach Lust und Laune eingetragen werden. Diese werden in der Administrator/Kunden-Übersicht bei dem jeweiligen Benutzer angezeigt.';
$lng['usersettings']['custom_notes']['show'] = 'Zeige die Notizen auf dem Dashboard des Benutzers'; $lng['usersettings']['custom_notes']['show'] = 'Zeige die Notizen auf dem Dashboard des Benutzers';

View File

@@ -1041,7 +1041,7 @@ $lng['serversettings']['perl_path']['description'] = 'Rilevante solo se si utili
// ADDED IN FROXLOR 0.9.12-svn1 // ADDED IN FROXLOR 0.9.12-svn1
$lng['admin']['fcgid_settings'] = 'FCGID'; $lng['admin']['fcgid_settings'] = 'FCGID';
$lng['serversettings']['mod_fcgid_ownvhost']['title'] = 'Abilita FCGID per i vhost Froxlor'; $lng['serversettings']['mod_fcgid_ownvhost']['title'] = 'Abilita FCGID per i vhost Froxlor';
$lng['serversettings']['mod_fcgid_ownvhost']['description'] = 'Se attivato, Froxlor verrà eseguito con un utente locale<br /><strong>ATTENZIONE:</strong>Questo richiede una configurazione manuale, vedi <a target="blank" href="https://github.com/Froxlor/Froxlor/wiki/apache2-with-fcgid">FCGID - handbook</a>'; $lng['serversettings']['mod_fcgid_ownvhost']['description'] = 'Se attivato, Froxlor verrà eseguito con un utente locale<br /><strong>ATTENZIONE:</strong>Questo richiede una configurazione manuale, vedi <a target="_blank" href="https://docs.froxlor.org/general/configuration/fcgid.html">FCGID - handbook</a>';
$lng['admin']['mod_fcgid_user'] = 'Utente locale per FCGID (Froxlor vhost)'; $lng['admin']['mod_fcgid_user'] = 'Utente locale per FCGID (Froxlor vhost)';
$lng['admin']['mod_fcgid_group'] = 'Gruppo locale per FCGID (Froxlor vhost)'; $lng['admin']['mod_fcgid_group'] = 'Gruppo locale per FCGID (Froxlor vhost)';
@@ -1660,7 +1660,7 @@ $lng['domains']['import_file'] = 'File CSV';
$lng['success']['domain_import_successfully'] = 'Importato %s dominii con successo.'; $lng['success']['domain_import_successfully'] = 'Importato %s dominii con successo.';
$lng['error']['domain_import_error'] = 'Il seguente errore è occorsonell \'importazione di dominii: %s'; $lng['error']['domain_import_error'] = 'Il seguente errore è occorsonell \'importazione di dominii: %s';
$lng['admin']['note'] = 'Nota'; $lng['admin']['note'] = 'Nota';
$lng['domains']['import_description'] = 'Per ottenere informazioni dettagliate sulla struttura del file di importazione e su come importare con successo, visita <a href="https://github.com/Froxlor/Froxlor/wiki/Domain-import-documenation" target="_blank">https://github.com/Froxlor/Froxlor/wiki/Domain-import-documenation</a>'; $lng['domains']['import_description'] = 'Per ottenere informazioni dettagliate sulla struttura del file di importazione e su come importare con successo, visita <a href="https://docs.froxlor.org/adminguide/domainimport.html" target="_blank">https://docs.froxlor.org/adminguide/domainimport.html</a>';
$lng['usersettings']['custom_notes']['title'] = 'Note personali'; $lng['usersettings']['custom_notes']['title'] = 'Note personali';
$lng['usersettings']['custom_notes']['description'] = 'Sentiti libero di inserire qualsi nota vuoi o necessiti qui. Apparirano nel riepilogo dell\'amministratore/cliente perl \'utente corrispondente.'; $lng['usersettings']['custom_notes']['description'] = 'Sentiti libero di inserire qualsi nota vuoi o necessiti qui. Apparirano nel riepilogo dell\'amministratore/cliente perl \'utente corrispondente.';
$lng['usersettings']['custom_notes']['show'] = 'Mostra le tue note nel cruscotto dell\'utente'; $lng['usersettings']['custom_notes']['show'] = 'Mostra le tue note nel cruscotto dell\'utente';

View File

@@ -1,7 +1,7 @@
{% macro fieldrow(id, field, norow = false, nohide = false) %} {% macro fieldrow(id, field, norow = false, nohide = false) %}
{% if field.visible is not defined or (field.visible is defined and field.visible) or nohide == true %} {% if field.visible is not defined or (field.visible is defined and field.visible) or nohide == true %}
{% if norow == false and field.type != 'hidden' %} {% if norow == false and field.type != 'hidden' %}
<div class="row mb-3 pb-1 border-bottom"> <div class="row mb-3 pb-3 border-bottom">
{% if field.label is iterable %} {% if field.label is iterable %}
<label for="{{ id }}" class="col-sm-4 col-form-label">{{ field.label.title|raw }} <label for="{{ id }}" class="col-sm-4 col-form-label">{{ field.label.title|raw }}
{% if field.label.description is defined and field.label.description is not empty %}<br><small>{{ field.label.description|raw }}</small> {% if field.label.description is defined and field.label.description is not empty %}<br><small>{{ field.label.description|raw }}</small>

View File

@@ -8,9 +8,23 @@
<div class="card-body"> <div class="card-body">
{% for id,setting in fields %} {% for id,setting in fields %}
{% if id != '_group' %} {% if id != '_group' %}
{{ formfields.fieldrow(id, setting, false, true) }} {{ formfields.fieldrow(id, setting, false, (get_setting('system.hide_incompatible_settings') == '0')) }}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</div> </div>
</div> </div>
<div class="card mb-3">
<div class="card-body">
<input type="hidden" name="s" value="{{ s }}"/>
<input type="hidden" name="page" value="{{ page }}"/>
<input type="hidden" name="action" value="{{ action }}"/>
<input type="hidden" name="send" value="send"/>
<div class="col-12 text-center">
<button type="reset" class="btn btn-warning">{{ lng('panel.cancel') }}</button>
<button type="submit" class="btn btn-success">{{ lng('panel.save') }}</button>
</div>
</div>
</div>
{% endblock %} {% endblock %}

View File

@@ -8,7 +8,9 @@
<form action="{{ action|default(filename) }}" method="post" enctype="application/x-www-form-urlencoded" class="form"> <form action="{{ action|default(filename) }}" method="post" enctype="application/x-www-form-urlencoded" class="form">
<h3 class="page-header"> <h3 class="page-header">
<i class="fa-solid fa-gears"></i> <i class="fa-solid fa-gears"></i>
{{ lng('admin.serversettings') }}{% if fields._group is defined %}&nbsp;&raquo;&nbsp;{{ fields._group.title }}{% endif %} {{ lng('admin.serversettings') }}
{% if fields._group is defined %}&nbsp;&raquo;&nbsp;{{ fields._group.title }}
{% endif %}
</h3> </h3>
{% block settings %} {% block settings %}
@@ -17,14 +19,16 @@
<div class="col"> <div class="col">
<div class="card h-100 border {% if field.activated %}border-primary{% else %}border-secondary bg-light{% endif %}"> <div class="card h-100 border {% if field.activated %}border-primary{% else %}border-secondary bg-light{% endif %}">
<div class="card-body text-center"> <div class="card-body text-center">
{% if field.activated %} <a href="{{ linker({'section':'settings','page':'overview','part':field.part}) }}" class="btn btn-link stretched-link">
<a href="{{ linker({'section':'settings','page':'overview','part':field.part}) }}" class="btn btn-link stretched-link">
<i class="{{ field.icon }} fa-4x"></i>
</a>
{% else %}
<i class="{{ field.icon }} fa-4x"></i> <i class="{{ field.icon }} fa-4x"></i>
</a>
<p class="card-text mt-2">{{ field.title }}
{% if field.info is defined and field.info is not empty %}<br><small>{{ field.info|raw }}</small>
{% endif %}
</p>
{% if field.activated == false %}
<small class="text-danger">{{ lng('panel.not_activated') }}</small>
{% endif %} {% endif %}
<p class="card-text mt-2">{{ field.title }}{% if field.info is defined and field.info is not empty %}<br><small>{{ field.info|raw }}</small>{% endif %}</p>
</div> </div>
</div> </div>
</div> </div>