use floating labels for installation, looks less confusing
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -503,7 +503,6 @@ class Core
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// last but not least create the main admin
|
// last but not least create the main admin
|
||||||
$ins_data = [
|
$ins_data = [
|
||||||
'loginname' => $this->validatedData['admin_user'],
|
'loginname' => $this->validatedData['admin_user'],
|
||||||
|
|||||||
@@ -35,40 +35,56 @@ return [
|
|||||||
'fields' => [
|
'fields' => [
|
||||||
'mysql_host' => [
|
'mysql_host' => [
|
||||||
'label' => lng('mysql.mysql_server'),
|
'label' => lng('mysql.mysql_server'),
|
||||||
|
'placeholder' => lng('mysql.mysql_server'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'value' => old('mysql_host', 'localhost', 'installation')
|
'value' => old('mysql_host', 'localhost', 'installation')
|
||||||
],
|
],
|
||||||
|
'mysql_ssl_ca_file' => [
|
||||||
|
'label' => lng('mysql.mysql_ssl_ca_file'),
|
||||||
|
'placeholder' => lng('mysql.mysql_ssl_ca_file'),
|
||||||
|
'type' => 'text',
|
||||||
|
'value' => old('mysql_ssl_ca_file', null, 'installation'),
|
||||||
|
'advanced' => true, // @todo
|
||||||
|
],
|
||||||
|
'mysql_ssl_verify_server_certificate' => [
|
||||||
|
'label' => lng('mysql.mysql_ssl_verify_server_certificate'),
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'value' => '1',
|
||||||
|
'checked' => old('mysql_ssl_verify_server_certificate', '0', 'installation'),
|
||||||
|
'advanced' => true // @todo
|
||||||
|
],
|
||||||
'mysql_root_user' => [
|
'mysql_root_user' => [
|
||||||
'label' => lng('mysql.privileged_user'),
|
'label' => lng('mysql.privileged_user'),
|
||||||
|
'placeholder' => lng('mysql.privileged_user'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'value' => old('mysql_root_user', 'froxroot', 'installation'),
|
'value' => old('mysql_root_user', 'froxroot', 'installation'),
|
||||||
'next_to' => [
|
],
|
||||||
'mysql_root_pass' => [
|
'mysql_root_pass' => [
|
||||||
'label' => lng('login.password'),
|
'label' => lng('mysql.privileged_passwd'),
|
||||||
'type' => 'password',
|
'placeholder' => lng('mysql.privileged_passwd'),
|
||||||
'mandatory' => true,
|
'type' => 'password',
|
||||||
'value' => old('mysql_root_pass', null, 'installation'),
|
'mandatory' => true,
|
||||||
],
|
'value' => old('mysql_root_pass', null, 'installation'),
|
||||||
]
|
|
||||||
],
|
],
|
||||||
'mysql_unprivileged_user' => [
|
'mysql_unprivileged_user' => [
|
||||||
'label' => lng('install.database.user'),
|
'label' => lng('install.database.user'),
|
||||||
|
'placeholder' => lng('install.database.user'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'value' => old('mysql_unprivileged_user', 'froxlor', 'installation'),
|
'value' => old('mysql_unprivileged_user', 'froxlor', 'installation'),
|
||||||
'next_to' => [
|
],
|
||||||
'mysql_unprivileged_pass' => [
|
'mysql_unprivileged_pass' => [
|
||||||
'label' => lng('login.password'),
|
'label' => lng('mysql.unprivileged_passwd'),
|
||||||
'type' => 'password',
|
'placeholder' => lng('mysql.unprivileged_passwd'),
|
||||||
'mandatory' => true,
|
'type' => 'password',
|
||||||
'value' => old('mysql_unprivileged_pass', null, 'installation'),
|
'mandatory' => true,
|
||||||
],
|
'value' => old('mysql_unprivileged_pass', null, 'installation'),
|
||||||
]
|
|
||||||
],
|
],
|
||||||
'mysql_database' => [
|
'mysql_database' => [
|
||||||
'label' => lng('install.database.dbname'),
|
'label' => lng('install.database.dbname'),
|
||||||
|
'placeholder' => lng('install.database.dbname'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'value' => old('mysql_database', 'froxlor', 'installation'),
|
'value' => old('mysql_database', 'froxlor', 'installation'),
|
||||||
@@ -87,30 +103,35 @@ return [
|
|||||||
'fields' => [
|
'fields' => [
|
||||||
'admin_name' => [
|
'admin_name' => [
|
||||||
'label' => lng('customer.name'),
|
'label' => lng('customer.name'),
|
||||||
|
'placeholder' => lng('customer.name'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'value' => old('admin_name', 'Administrator', 'installation'),
|
'value' => old('admin_name', 'Administrator', 'installation'),
|
||||||
],
|
],
|
||||||
'admin_user' => [
|
'admin_user' => [
|
||||||
'label' => lng('login.username'),
|
'label' => lng('login.username'),
|
||||||
|
'placeholder' => lng('login.username'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'value' => old('admin_user', 'admin', 'installation'),
|
'value' => old('admin_user', 'admin', 'installation'),
|
||||||
],
|
],
|
||||||
'admin_pass' => [
|
'admin_pass' => [
|
||||||
'label' => lng('login.password'),
|
'label' => lng('login.password'),
|
||||||
|
'placeholder' => lng('login.password'),
|
||||||
'type' => 'password',
|
'type' => 'password',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'value' => old('admin_pass', null, 'installation'),
|
'value' => old('admin_pass', null, 'installation'),
|
||||||
],
|
],
|
||||||
'admin_pass_confirm' => [
|
'admin_pass_confirm' => [
|
||||||
'label' => lng('changepassword.new_password_confirm'),
|
'label' => lng('changepassword.new_password_confirm'),
|
||||||
|
'placeholder' => lng('changepassword.new_password_confirm'),
|
||||||
'type' => 'password',
|
'type' => 'password',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'value' => old('admin_pass_confirm', null, 'installation'),
|
'value' => old('admin_pass_confirm', null, 'installation'),
|
||||||
],
|
],
|
||||||
'admin_email' => [
|
'admin_email' => [
|
||||||
'label' => lng('customer.email'),
|
'label' => lng('customer.email'),
|
||||||
|
'placeholder' => lng('customer.email'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'value' => old('admin_email', null, 'installation'),
|
'value' => old('admin_email', null, 'installation'),
|
||||||
@@ -129,12 +150,14 @@ return [
|
|||||||
],
|
],
|
||||||
'serverip' => [
|
'serverip' => [
|
||||||
'label' => lng('serversettings.ipaddress.title'),
|
'label' => lng('serversettings.ipaddress.title'),
|
||||||
|
'placeholder' => lng('serversettings.ipaddress.title'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'value' => old('serverip', null, 'installation'),
|
'value' => old('serverip', null, 'installation'),
|
||||||
],
|
],
|
||||||
'servername' => [
|
'servername' => [
|
||||||
'label' => lng('install.system.servername'),
|
'label' => lng('install.system.servername'),
|
||||||
|
'placeholder' => lng('install.system.servername'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'value' => old('servername', null, 'installation'),
|
'value' => old('servername', null, 'installation'),
|
||||||
@@ -160,12 +183,14 @@ return [
|
|||||||
],
|
],
|
||||||
'httpuser' => [
|
'httpuser' => [
|
||||||
'label' => lng('admin.webserver_user'),
|
'label' => lng('admin.webserver_user'),
|
||||||
|
'placeholder' => lng('admin.webserver_user'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'value' => old('httpuser', 'www-data', 'installation'),
|
'value' => old('httpuser', 'www-data', 'installation'),
|
||||||
],
|
],
|
||||||
'httpgroup' => [
|
'httpgroup' => [
|
||||||
'label' => lng('admin.webserver_group'),
|
'label' => lng('admin.webserver_group'),
|
||||||
|
'placeholder' => lng('admin.webserver_group'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'value' => old('httpgroup', 'www-data', 'installation'),
|
'value' => old('httpgroup', 'www-data', 'installation'),
|
||||||
@@ -185,7 +210,7 @@ return [
|
|||||||
'system' => [
|
'system' => [
|
||||||
'label' => lng('install.install.runcmd'),
|
'label' => lng('install.install.runcmd'),
|
||||||
'type' => 'textarea',
|
'type' => 'textarea',
|
||||||
'value' => Froxlor::getInstallDir().'bin/froxlor-cli froxlor:config-services -a [JSON PARAMETER] --yes-to-all',
|
'value' => Froxlor::getInstallDir() . 'bin/froxlor-cli froxlor:config-services -a [JSON PARAMETER] --yes-to-all',
|
||||||
'readonly' => true,
|
'readonly' => true,
|
||||||
'rows' => 1
|
'rows' => 1
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1369,6 +1369,10 @@ Yours sincerely, your administrator',
|
|||||||
'database_edit' => 'Edit database',
|
'database_edit' => 'Edit database',
|
||||||
'size' => 'Size',
|
'size' => 'Size',
|
||||||
'privileged_user' => 'Privileged database user',
|
'privileged_user' => 'Privileged database user',
|
||||||
|
'privileged_passwd' => 'Password for priviliged user',
|
||||||
|
'unprivileged_passwd' => 'Password for unpriviliged user',
|
||||||
|
'mysql_ssl_ca_file' => 'SSL server certificate',
|
||||||
|
'mysql_ssl_verify_server_certificate' => 'Verify SSL server certificate'
|
||||||
],
|
],
|
||||||
'opcacheinfo' => [
|
'opcacheinfo' => [
|
||||||
'generaltitle' => 'General Information',
|
'generaltitle' => 'General Information',
|
||||||
|
|||||||
@@ -61,11 +61,20 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
|
{# installation specific format #}
|
||||||
{% macro field(id, field, norow = true, nohide = false, em = false) %}
|
{% macro field(id, field, norow = true, nohide = false, em = false) %}
|
||||||
<div class="mb-3">
|
{% if field.type != 'checkbox' %}
|
||||||
<label for="{{ id }}" class="form-label">{{ field.label|raw }}</label>
|
<div class="form-floating mb-3">
|
||||||
{{ _self.fieldrow(id, field, norow, nohide, em) }}
|
{{ _self.fieldrow(id, field, norow, nohide, em) }}
|
||||||
|
<label for="{{ id }}" class="form-label">{{ field.label|raw }}</label>
|
||||||
</div>
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<div class="form-check form-switch mb-3">
|
||||||
|
<input type="hidden" value="0" name="{{ id }}" />
|
||||||
|
<input type="checkbox" {% if (field.visible is defined and field.visible == false) or (field.disabled is defined and field.disabled == true) %} disabled {% endif %} value="{{ subfield.value }}" name="{{ id }}[]" class="form-check-input" {% if field.value is defined and subfield.value in field.value %} checked="checked" {% endif %}>
|
||||||
|
<label for="{{ id }}" class="form-check-label">{{ field.label|raw }}</label>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro bool(id, field) %}
|
{% macro bool(id, field) %}
|
||||||
|
|||||||
Reference in New Issue
Block a user