Create documentation and adjust tpl as a result

This commit is contained in:
Dennis Eichhorn 2018-06-24 10:11:21 +02:00
parent dfe74dfb5e
commit 8d4d155238
11 changed files with 570 additions and 277 deletions

79
Docs/help_groups.md Normal file
View File

@ -0,0 +1,79 @@
# Groups
In `Groups` you can create, delete and modify the groups. Groups are global for all applications and units. If you want to have application or unit specific permissions you can do so in the group.
## General
![General Settings](img/groups/groups_general.png)
### Name
In some cases it makes sense to put some additional information in the group name. In some cases a group is only for a specific unit or application in such a case it could make sense to prefix the group name e.g. `unitname_groupname` or `appname_groupname`. Group names can be changed any time without any side effects.
### Description
Sometimes it makes sense to provide some additional information for a group. In such a case you can add this in the discription field.
## Permissions
![General Settings](img/groups/groups_permissions.png)
Permissions have the following components which can be combined to either address a wide e.g. range of units, applications or modules or in order to address a very specific combination of those.
### Unit
The unit this permission is set for. Leave empty to address all units
### App
The application this permission is set for. Leave empty to address all applications
### Module
The module this permission is set for. Leave empty to address all modules
### Type
The type is a `module` specific subpart which only should be set if the module is defined in the permission. For further information what kind of types are available for a module please refere to the module specific documentation. Usually it referes to a single page of a module.
### Element
The element is a `module` and `type` specific subpart which only should be set if the `type` is defined in the permission. For further information what kind of elements are available for a module and type please refere to the module specific documentation. Usually it referes to a section on a module page.
### Component
The component is a `module`, `type` and `element` specific subpart which only should be set if the `element` is defined in the permission. For further information what kind of components are available for a module, type and element please refere to the module specific documentation. Usually it referes to a single input or option in a module.
### Permission
The actual permission consists of create (C), read (R), update (U), delete (D), permission (P) options.
#### Create (C)
This allows a user to create something. Usually a user should also have (R) permission in this case.
#### Read (R)
This allows a user to read/see something.
#### Update (U)
This allows a user to update/modify something. Usually a user should also have (R) permission in this case.
#### Delete (D)
This allows a user to delete/remove something. Usually a user should also have (R) permission in this case.
#### Permission (P)
This allows a user to change permissions. Usually a user should also have (C, R, U, D) permissions because the user could just give himself these permissions anyways. Only selected users should have this permission even if it is only specified for a specific module, type, element or component.
## Accounts
![General Settings](img/groups/groups_accounts.png)
In the accounts section you can see all users that are assigned to this group and you can also add or remove accounts. If you would like to add all users from a different group simply select the group and all the users that are part of this group will be added to this group as well (one time only, there will be **no relation** (e.g. parent/child group) between these two groups).
## Audit Log
In the audit log you can see all the changes of the group.

93
Docs/help_settings.md Normal file
View File

@ -0,0 +1,93 @@
# Settings
## Genral
In the admin module under `General` the global settings can be set.
### Security
In the security section it's possible to define and modify the global security settings. These settings will be used for every user.
![General Settings](img/general/settings_security.png)
#### Password Regex
In this field the password strucutre can be defined that is required by every account. Examples are:
##### Password Example 1
At least 8 characters including at least one numeric value, one lower letter, one upper letter, one special char
```^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&;:\(\)\[\]=\{\}\+\-])[.]{8,}```
##### Password Example 2
At least 8 characters including at least one numeric value, one upper letter, one special char
```^(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&;:\(\)\[\]=\{\}\+\-])[.]{8,}```
##### Password Example 3
At least 8 characters including at least one numeric value, one special char
```^(?=.*\d)(?=.*[$@$!%*?&;:\(\)\[\]=\{\}\+\-])[.]{8,}```
##### Password Example 4
At least 8 characters including at least one special char
```^(?=.*[$@$!%*?&;:\(\)\[\]=\{\}\+\-])[.]{8,}```
##### Password Example 5
At least 8 characters
```^[.]{8,}```
##### Password Example 6
At least 12 characters
```^[.]{12,}```
#### Login Retries
In this field the amount of retries can be defined until the user login receives a timeout. During this timeout period no login is possible even if the correct password is entered. Infinite amount of retries can be activated by setting the value to `-1`
**Recommended:** `3 times`
#### Timeout Period
In this field the timeout period after inputting a incorrect password too often can be specified. During this period the user cannot login even if the password is correct.
**Recommended:** `30 minutes`
#### Password Change Interval
In this field the interval in days can be set in which the password must be changed. If passwords don't have to be changed set the value to `-1`
**Recommended:** `90 days`
#### Password History
In this field the relevant password history can be defined. If a password change interval is defined the new password has to be different from the last `x` passwords
**Recommended:** `3 last passwords`
### Logging
In the logging section the logging settings can be defined. These settings don't include audit logs as they cannot be changed in order to prevent data manipulation.
**Recommended:** `active and default path`
![General Settings](img/general/settings_logging.png)
## Localization
In the localization tab it's possible to define the default localization settings. Be aware that users may have localization settings different from the default settings. These localization settings are only important to provide a fallback if the user localization settings are not working.
![Localization Settings](img/general/settings_localization.png)
### Defaults
In the defaults field you can select a default localization configuration which you can adjust afterwards.

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -18,6 +18,7 @@ return [
'Active' => 'Active',
'Activate' => 'Activate',
'Activity' => 'Activity',
'AuditLog' => 'Audit Log',
'Available' => 'Available',
'All' => 'All',
'Area' => 'Area',
@ -29,7 +30,9 @@ return [
'Created' => 'Created',
'CreatedBy' => 'Created By',
'Currency' => 'Currency',
'Customized' => 'Customized',
'DecimalPoint' => 'Decimal Point',
'Defaults' => 'Defaults',
'Description' => 'Description',
'Delete' => 'Delete',
'Deactivate' => 'Deactivate',
@ -51,8 +54,13 @@ return [
'Large' => 'Large',
'Length' => 'Length',
'Light' => 'Light',
'Load' => 'Load',
'Localization' => 'Localization',
'Long' => 'Long',
'Log' => 'Log',
'LoginRetries' => 'Login Retries',
'LogPath' => 'Log Path',
'Logging' => 'Logging',
'Loginname' => 'Login Name',
'Lowercase' => 'Lowercase',
'Maintenance' => 'Maintenance',
@ -77,6 +85,8 @@ return [
'Parent' => 'Parent',
'Parents' => 'Parents',
'Password' => 'Password',
'PasswordChangeInterval' => 'Password Change Interval (days)',
'PasswordHistory' => 'Password History',
'PasswordRegex' => 'Password Regex',
'Permissions' => 'Permissions',
'Person' => 'Person',
@ -86,6 +96,7 @@ return [
'Running' => 'Running',
'Short' => 'Short',
'Sea' => 'Sea',
'Security' => 'Security',
'Settings' => 'Settings',
'SettingsGeneral' => 'Settings - General',
'Single' => 'Single',
@ -102,6 +113,7 @@ return [
'Theme' => 'Theme',
'ThousandsSeparator' => 'Thousands Separator',
'Time' => 'Time',
'TimeoutPeriod' => 'Timeout Period (minutes)',
'Timestamp' => 'Timestamp',
'Timeformat' => 'Timeformat',
'Timeout' => 'Timeout',
@ -137,5 +149,10 @@ return [
'GroupStatus1' => 'Active',
'GroupStatus2' => 'Inactive',
'GroupStatus4' => 'Hidden',
'i:PasswordRegex' => 'Password requirement for users',
'i:LoginRetries' => 'Amount of allowed retries (-1 = unlimited)',
'i:TimeoutPeriod' => 'Timeout period after too many logins',
'i:PasswordChangeInterval' => 'Interval in which passwards need to be changed (-1 = never)',
'i:PasswordHistory' => 'New password has to be different from the last N passwords',
],
];

View File

@ -20,119 +20,157 @@ $accounts = $this->getData('accounts');
echo $this->getData('nav')->render(); ?>
<div class="row">
<div class="col-xs-12 col-md-6">
<section class="box wf-100">
<header><h1><?= $this->getHtml('Group'); ?></h1></header>
<div class="inner">
<form id="fGroupEdit" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/group'); ?>" method="post">
<table class="layout wf-100">
<tbody>
<tr><td><label for="iGid"><?= $this->getHtml('ID', 0, 0); ?></label>
<tr><td><input id="iGid" name="id" type="text" value="<?= $this->printHtml($group->getId()); ?>" disabled>
<tr><td><label for="iGname"><?= $this->getHtml('Name'); ?></label>
<tr><td><input id="iGname" name="name" type="text" placeholder="&#xf0c0; Guest" value="<?= $this->printHtml($group->getName()); ?>">
<tr><td><label for="iGstatus"><?= $this->getHtml('Status'); ?></label>
<tr><td><select id="iGstatus" name="status">
<?php $status = \phpOMS\Account\GroupStatus::getConstants(); foreach ($status as $stat) : ?>
<option value="<?= $stat; ?>"<?= $stat === $group->getStatus() ? ' selected' : ''; ?>><?= $this->getHtml('GroupStatus' . $stat); ?>
<?php endforeach; ?>
</select>
<tr><td><label for="iGroupDescription"><?= $this->getHtml('Description'); ?></label>
<tr><td>
<textarea id="iGroupDescription" name="description" placeholder="&#xf040;"><?= $this->printHtml($group->getDescription()); ?></textarea>
<tr><td><input id="groupSubmit" name="groupsubmit" type="submit" value="<?= $this->getHtml('Save', 0, 0); ?>">
</table>
</form>
</div>
</section>
<div class="tabular-2">
<div class="box wf-100">
<ul class="tab-links">
<li><label for="c-tab-1"><?= $this->getHtml('General'); ?></label></li>
<li><label for="c-tab-2"><?= $this->getHtml('AuditLog'); ?></label></li>
</ul>
</div>
<div class="tab-content">
<input type="radio" id="c-tab-1" name="tabular-2" checked>
<div class="tab">
<div class="row">
<div class="col-xs-12 col-md-6">
<section class="box wf-100">
<header><h1><?= $this->getHtml('Group'); ?></h1></header>
<div class="inner">
<form id="fGroupEdit" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/group'); ?>" method="post">
<table class="layout wf-100">
<tbody>
<tr><td><label for="iGid"><?= $this->getHtml('ID', 0, 0); ?></label>
<tr><td><input id="iGid" name="id" type="text" value="<?= $this->printHtml($group->getId()); ?>" disabled>
<tr><td><label for="iGname"><?= $this->getHtml('Name'); ?></label>
<tr><td><input id="iGname" name="name" type="text" placeholder="&#xf0c0; Guest" value="<?= $this->printHtml($group->getName()); ?>">
<tr><td><label for="iGstatus"><?= $this->getHtml('Status'); ?></label>
<tr><td><select id="iGstatus" name="status">
<?php $status = \phpOMS\Account\GroupStatus::getConstants(); foreach ($status as $stat) : ?>
<option value="<?= $stat; ?>"<?= $stat === $group->getStatus() ? ' selected' : ''; ?>><?= $this->getHtml('GroupStatus' . $stat); ?>
<?php endforeach; ?>
</select>
<tr><td><label for="iGroupDescription"><?= $this->getHtml('Description'); ?></label>
<tr><td>
<textarea id="iGroupDescription" name="description" placeholder="&#xf040;"><?= $this->printHtml($group->getDescription()); ?></textarea>
<tr><td><input id="groupSubmit" name="groupsubmit" type="submit" value="<?= $this->getHtml('Save', 0, 0); ?>">
</table>
</form>
</div>
</section>
</div>
<div class="col-xs-12 col-md-6">
<table class="box table red wf-100">
<caption><?= $this->getHtml('Accounts') ?></caption>
<thead>
<tr>
<td><?= $this->getHtml('ID', 0, 0); ?>
<td class="wf-100">Name
<tbody>
<?php $c = 0; foreach ([] as $key => $value) : $c++; ?>
<tr>
<td><a href="#"><i class="fa fa-times"></i></a>
<td>
<td>
<?php endforeach; ?>
<?php if ($c === 0) : ?>
<tr><td colspan="2" class="empty"><?= $this->getHtml('Empty', 0, 0); ?>
<?php endif; ?>
</table>
<section class="box wf-100">
<header><h1><?= $this->getHtml('Accounts'); ?></h1></header>
<div class="inner">
<form action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/group'); ?>" method="post">
<table class="layout wf-100">
<div class="col-xs-12 col-md-6">
<table class="box table red wf-100">
<caption><?= $this->getHtml('Accounts') ?></caption>
<thead>
<tr>
<td><?= $this->getHtml('ID', 0, 0); ?>
<td class="wf-100">Name
<tbody>
<tr><td><label for="iGParentName"><?= $this->getHtml('Name'); ?></label>
<tr><td><input id="iGParentName" name="parentname" type="text" placeholder="&#xf234; Donald Duck">
<tr><td><input type="submit" value="<?= $this->getHtml('Add', 0, 0); ?>">
<?php $c = 0; foreach ([] as $key => $value) : $c++; ?>
<tr>
<td><a href="#"><i class="fa fa-times"></i></a>
<td>
<td>
<?php endforeach; ?>
<?php if ($c === 0) : ?>
<tr><td colspan="2" class="empty"><?= $this->getHtml('Empty', 0, 0); ?>
<?php endif; ?>
</table>
</form>
</div>
</section>
</div>
<div class="col-xs-12 col-md-6">
<table class="box table red wf-100">
<caption><?= $this->getHtml('Permissions') ?></caption>
<thead>
<tr>
<td>
<td>
<td><?= $this->getHtml('ID', 0, 0); ?>
<td>Unit
<td class="wf-100">App
<td>Module
<td>Type
<td>Ele.
<td>Comp.
<td class="wf-100">Perm.
<tbody>
<?php $c = 0; foreach ($permissions as $key => $value) : $c++; $permission = $value->getPermission(); ?>
<tr>
<td><a href="#"><i class="fa fa-times"></i></a>
<td><a href="#"><i class="fa fa-cogs"></i></a>
<td><?= $value->getId(); ?>
<td><?= $value->getUnit(); ?>
<td><?= $value->getApp(); ?>
<td><?= $value->getModule(); ?>
<td><?= $value->getType(); ?>
<td><?= $value->getElement(); ?>
<td><?= $value->getComponent(); ?>
<td>
<?= (\phpOMS\Account\PermissionType::CREATE | $permission) === $permission ? 'C' : ''; ?>
<?= (\phpOMS\Account\PermissionType::READ | $permission) === $permission ? 'R' : ''; ?>
<?= (\phpOMS\Account\PermissionType::MODIFY | $permission) === $permission ? 'U' : ''; ?>
<?= (\phpOMS\Account\PermissionType::DELETE | $permission) === $permission ? 'D' : ''; ?>
<?= (\phpOMS\Account\PermissionType::PERMISSION | $permission) === $permission ? 'P' : ''; ?>
<?php endforeach; ?>
<?php if ($c === 0) : ?>
<tr><td colspan="8" class="empty"><?= $this->getHtml('Empty', 0, 0); ?>
<?php endif; ?>
</table>
<section class="box wf-100">
<header><h1><?= $this->getHtml('Accounts'); ?></h1></header>
<div class="inner">
<form action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/group'); ?>" method="post">
<table class="layout wf-100">
<tbody>
<tr><td><label for="iGParentName"><?= $this->getHtml('Name'); ?></label>
<tr><td><input id="iGParentName" name="parentname" type="text" placeholder="&#xf234; Donald Duck">
<tr><td><input type="submit" value="<?= $this->getHtml('Add', 0, 0); ?>">
</table>
</form>
</div>
</section>
</div>
<section class="box wf-100">
<header><h1><?= $this->getHtml('Permissions'); ?></h1></header>
<div class="inner">
<form action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/group'); ?>" method="post">
<table class="layout wf-100">
<div class="col-xs-12 col-md-6">
<table class="box table red wf-100">
<caption><?= $this->getHtml('Permissions') ?></caption>
<thead>
<tr>
<td>
<td>
<td><?= $this->getHtml('ID', 0, 0); ?>
<td>Unit
<td class="wf-100">App
<td>Module
<td>Type
<td>Ele.
<td>Comp.
<td class="wf-100">Perm.
<tbody>
<tr><td><label for="iPermissionName"><?= $this->getHtml('Name'); ?></label>
<tr><td><input id="iPermissionName" name="permissionname" type="text" placeholder="&#xf084; Admin">
<tr><td><input type="submit" value="<?= $this->getHtml('Add', 0, 0); ?>">
<?php $c = 0; foreach ($permissions as $key => $value) : $c++; $permission = $value->getPermission(); ?>
<tr>
<td><a href="#"><i class="fa fa-times"></i></a>
<td><a href="#"><i class="fa fa-cogs"></i></a>
<td><?= $value->getId(); ?>
<td><?= $value->getUnit(); ?>
<td><?= $value->getApp(); ?>
<td><?= $value->getModule(); ?>
<td><?= $value->getType(); ?>
<td><?= $value->getElement(); ?>
<td><?= $value->getComponent(); ?>
<td>
<?= (\phpOMS\Account\PermissionType::CREATE | $permission) === $permission ? 'C' : ''; ?>
<?= (\phpOMS\Account\PermissionType::READ | $permission) === $permission ? 'R' : ''; ?>
<?= (\phpOMS\Account\PermissionType::MODIFY | $permission) === $permission ? 'U' : ''; ?>
<?= (\phpOMS\Account\PermissionType::DELETE | $permission) === $permission ? 'D' : ''; ?>
<?= (\phpOMS\Account\PermissionType::PERMISSION | $permission) === $permission ? 'P' : ''; ?>
<?php endforeach; ?>
<?php if ($c === 0) : ?>
<tr><td colspan="8" class="empty"><?= $this->getHtml('Empty', 0, 0); ?>
<?php endif; ?>
</table>
</form>
<section class="box wf-100">
<header><h1><?= $this->getHtml('Permissions'); ?></h1></header>
<div class="inner">
<form action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/group'); ?>" method="post">
<table class="layout wf-100">
<tbody>
<tr><td><label for="iPermissionName"><?= $this->getHtml('Name'); ?></label>
<tr><td><input id="iPermissionName" name="permissionname" type="text" placeholder="&#xf084; Admin">
<tr><td><input type="submit" value="<?= $this->getHtml('Add', 0, 0); ?>">
</table>
</form>
</div>
</section>
</div>
</div>
</section>
</div>
<input type="radio" id="c-tab-2" name="tabular-2">
<div class="tab">
<div class="row">
<div class="col-xs-12">
<table class="box table red wf-100">
<caption><?= $this->getHtml('AuditLog') ?></caption>
<thead>
<tr>
<td><?= $this->getHtml('ID', 0, 0); ?>
<td class="wf-100">Name
<tbody>
<?php $c = 0; foreach ([] as $key => $value) : $c++; ?>
<tr>
<td><a href="#"><i class="fa fa-times"></i></a>
<td>
<td>
<?php endforeach; ?>
<?php if ($c === 0) : ?>
<tr><td colspan="2" class="empty"><?= $this->getHtml('Empty', 0, 0); ?>
<?php endif; ?>
</table>
</div>
</div>
</div>
</div>
</div>

View File

@ -24,11 +24,12 @@ $_thousands_sep = $this->getData('thousands_sep') ?? '';
$_password = $this->getData('password') ?? '';
$_country = $this->getData('country') ?? '';
$countries = \phpOMS\Localization\ISO3166NameEnum::getConstants();
$timezones = \phpOMS\Localization\TimeZoneEnumArray::getConstants();
$timeformats = \phpOMS\Localization\ISO8601EnumArray::getConstants();
$languages = \phpOMS\Localization\ISO639Enum::getConstants();
$currencies = \phpOMS\Localization\ISO4217Enum::getConstants();
$countries = \phpOMS\Localization\ISO3166NameEnum::getConstants();
$timezones = \phpOMS\Localization\TimeZoneEnumArray::getConstants();
$timeformats = \phpOMS\Localization\ISO8601EnumArray::getConstants();
$languages = \phpOMS\Localization\ISO639Enum::getConstants();
$currencies = \phpOMS\Localization\ISO4217Enum::getConstants();
$l11nDefinitions = \phpOMS\System\File\Local\Directory::list(__DIR__ . '/../../../../phpOMS/Localization/Defaults/Definitions');
?>
<div class="tabular-2">
@ -51,8 +52,61 @@ $currencies = \phpOMS\Localization\ISO4217Enum::getConstants();
<tbody>
<tr><td><label for="iOname"><?= $this->getHtml('OrganizationName'); ?></label>
<tr><td><input id="iOname" name="oname" type="text" value="<?= $this->printHtml($_oname); ?>" placeholder="&#xf12e; Money Bin" required>
<tr><td><label for="iPassword"><?= $this->getHtml('PasswordRegex'); ?></label>
<tr><td><input id="iSubmitGeneral" name="submitGeneral" type="submit" value="<?= $this->getHtml('Save', 0); ?>">
</table>
</form>
</div>
</section>
</div>
<div class="col-xs-12 col-md-6">
<section class="box wf-100">
<header><h1><?= $this->getHtml('Security'); ?></h1></header>
<div class="inner">
<form id="iSecuritySettings" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/settings/general'); ?>" method="post">
<table class="layout wf-100">
<tbody>
<tr><td>
<label for="iPassword"><?= $this->getHtml('PasswordRegex'); ?></label>
<i class="fa fa-info-circle tooltip"><i><?= $this->getHtml('i:PasswordRegex') ?></i></i>
<tr><td><input id="iPassword" name="passpattern" type="text" value="<?= $this->printHtml($_password); ?>" placeholder="&#xf023; ^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&;:\(\)\[\]=\{\}\+\-])[A-Za-z\d$@$!%*?&;:\(\)\[\]=\{\}\+\-]{8,}">
<tr><td>
<label for="iLoginRetries"><?= $this->getHtml('LoginRetries'); ?></label>
<i class="fa fa-info-circle tooltip"><i><?= $this->getHtml('i:LoginRetries') ?></i></i>
<tr><td><input id="iLoginRetries" name="loginretries" type="number" value="3" min="-1">
<tr><td>
<label for="iTimeoutPeriod"><?= $this->getHtml('TimeoutPeriod'); ?></label>
<i class="fa fa-info-circle tooltip"><i><?= $this->getHtml('i:TimeoutPeriod') ?></i></i>
<tr><td><input id="iTimeoutPeriod" name="timeoutperiod" type="number" value="3">
<tr><td>
<label for="iPasswordChangeInterval"><?= $this->getHtml('PasswordChangeInterval'); ?></label>
<i class="fa fa-info-circle tooltip"><i><?= $this->getHtml('i:PasswordChangeInterval') ?></i></i>
<tr><td><input id="iPasswordChangeInterval" name="passwordchangeinterval" type="number" value="90">
<tr><td>
<label for="iPasswordHistory"><?= $this->getHtml('PasswordHistory'); ?></label>
<i class="fa fa-info-circle tooltip"><i><?= $this->getHtml('i:PasswordHistory') ?></i></i>
<tr><td><input id="iPasswordHistory" name="passwordhistory" type="number" value="3">
<tr><td><input id="iSubmitGeneral" name="submitGeneral" type="submit" value="<?= $this->getHtml('Save', 0); ?>">
</table>
</form>
</div>
</section>
</div>
<div class="col-xs-12 col-md-6">
<section class="box wf-100">
<header><h1><?= $this->getHtml('Logging'); ?></h1></header>
<div class="inner">
<form id="iLoggingSettings" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/settings/general'); ?>" method="post">
<table class="layout wf-100">
<tbody>
<tr><td>
<span class="checkbox">
<input id="iLog" name="log" type="checkbox" value="1">
<label for="iLog"><?= $this->getHtml('Log'); ?></label>
</span>
<tr><td><label for="iLogPath"><?= $this->getHtml('LogPath'); ?></label>
<tr><td><input id="iLogPath" name="logpath" type="text" value="<?= $this->printHtml($_password); ?>" placeholder="&#xf023; asdf">
<tr><td><input id="iSubmitGeneral" name="submitGeneral" type="submit" value="<?= $this->getHtml('Save', 0); ?>">
</table>
</form>
@ -71,6 +125,18 @@ $currencies = \phpOMS\Localization\ISO4217Enum::getConstants();
<form id="fLocalization" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/settings/localization'); ?>" method="post">
<table class="layout wf-100">
<tbody>
<tr><td><label for="iDefaultLocalizations"><?= $this->getHtml('Defaults'); ?></label>
<tr><td>
<div class="ipt-wrap">
<div class="ipt-first"><select id="iDefaultLocalizations" name="defaultlocalizations">
<option selected><?= $this->getHtml('Customized'); ?>
<?php foreach ($l11nDefinitions as $def) : ?>
<option value="<?= $this->printHtml(explode('.', $def)[0]); ?>"><?= $this->printHtml(explode('.', $def)[0]); ?>
<?php endforeach; ?>
</select>
</div>
<div class="ipt-second"><input type="submit" value="<?= $this->getHtml('Load') ?>"></div>
</div>
<tr><td colspan="2"><label for="iCountries"><?= $this->getHtml('Country'); ?></label>
<tr><td colspan="2">
<select id="iCountries" name="country">
@ -110,188 +176,188 @@ $currencies = \phpOMS\Localization\ISO4217Enum::getConstants();
</section>
</div>
<div class="col-xs-12 col-md-4">
<section class="box wf-100 green">
<header><h1><?= $this->getHtml('Numeric'); ?></h1></header>
<div class="inner">
<form>
<table class="layout wf-100">
<tr><td colspan="2"><label for="iCurrencies"><?= $this->getHtml('Currency'); ?></label>
<tr><td colspan="2">
<select form="fLocalization" id="iCurrencies" name="currency">
<?php foreach ($currencies as $code => $currency) : ?>
<option value="<?= $this->printHtml($code); ?>"<?= $this->printHtml(strtolower($code) == strtolower($_currency) ? ' selected' : ''); ?>><?= $this->printHtml($currency); ?>
<?php endforeach; ?>
<div class="col-xs-12 col-md-4">
<section class="box wf-100 green">
<header><h1><?= $this->getHtml('Numeric'); ?></h1></header>
<div class="inner">
<form>
<table class="layout wf-100">
<tr><td colspan="2"><label for="iCurrencies"><?= $this->getHtml('Currency'); ?></label>
<tr><td colspan="2">
<select form="fLocalization" id="iCurrencies" name="currency">
<?php foreach ($currencies as $code => $currency) : ?>
<option value="<?= $this->printHtml($code); ?>"<?= $this->printHtml(strtolower($code) == strtolower($_currency) ? ' selected' : ''); ?>><?= $this->printHtml($currency); ?>
<?php endforeach; ?>
</select>
<tr><td colspan="2"><h2><?= $this->getHtml('Numberformat'); ?></h2>
<tr><td><label for="iDecimalPoint"><?= $this->getHtml('DecimalPoint'); ?></label>
<td><label for="iThousandSep"><?= $this->getHtml('ThousandsSeparator'); ?></label>
<tr><td><input form="fLocalization" id="iDecimalPoint" name="decimalpoint" type="text" value="<?= $this->printHtml($_decimal_point); ?>" placeholder="." required>
<td><input form="fLocalization" id="iThousandSep" name="thousandsep" type="text" value="<?= $this->printHtml($_thousands_sep); ?>" placeholder="," required>
</table>
</form>
</div>
</section>
</div>
<div class="col-xs-12 col-md-4">
<section class="box wf-100 red">
<header><h1><?= $this->getHtml('Weight'); ?></h1></header>
<div class="inner">
<form>
<table class="layout wf-100">
<tbody>
<tr><td><label for="iVeryLight"><?= $this->getHtml('VeryLight'); ?></label>
<tr><td><select form="fLocalization" id="iVeryLight" name="very_light">
</select>
<tr><td colspan="2"><h2><?= $this->getHtml('Numberformat'); ?></h2>
<tr><td><label for="iDecimalPoint"><?= $this->getHtml('DecimalPoint'); ?></label>
<td><label for="iThousandSep"><?= $this->getHtml('ThousandsSeparator'); ?></label>
<tr><td><input form="fLocalization" id="iDecimalPoint" name="decimalpoint" type="text" value="<?= $this->printHtml($_decimal_point); ?>" placeholder="." required>
<td><input form="fLocalization" id="iThousandSep" name="thousandsep" type="text" value="<?= $this->printHtml($_thousands_sep); ?>" placeholder="," required>
</table>
</form>
</div>
</section>
</div>
<div class="col-xs-12 col-md-4">
<section class="box wf-100 red">
<header><h1><?= $this->getHtml('Weight'); ?></h1></header>
<div class="inner">
<form>
<table class="layout wf-100">
<tbody>
<tr><label for="iVeryLight"><?= $this->getHtml('VeryLight'); ?></label>
<tr><select form="fLocalization" id="iVeryLight" name="very_light">
</select>
<tr><label for="iLight"><?= $this->getHtml('Light'); ?></label>
<tr><select form="fLocalization" id="iLight" name="light">
</select>
<tr><label for="iMedium"><?= $this->getHtml('Medium'); ?></label>
<tr><select form="fLocalization" id="iMedium" name="medium">
</select>
<tr><label for="iHeavy"><?= $this->getHtml('Heavy'); ?></label>
<tr><select form="fLocalization" id="iHeavy" name="heavy">
</select>
<tr><label for="iVeryHeavy"><?= $this->getHtml('VeryHeavy'); ?></label>
<tr><select form="fLocalization" id="iVeryHeavy" name="very_heavy">
</select>
</table>
</form>
<tr><td><label for="iLight"><?= $this->getHtml('Light'); ?></label>
<tr><td><select form="fLocalization" id="iLight" name="light">
</select>
<tr><td><label for="iMedium"><?= $this->getHtml('Medium'); ?></label>
<tr><td><select form="fLocalization" id="iMedium" name="medium">
</select>
<tr><td><label for="iHeavy"><?= $this->getHtml('Heavy'); ?></label>
<tr><td><select form="fLocalization" id="iHeavy" name="heavy">
</select>
<tr><td><label for="iVeryHeavy"><?= $this->getHtml('VeryHeavy'); ?></label>
<tr><td><select form="fLocalization" id="iVeryHeavy" name="very_heavy">
</select>
</table>
</form>
</div>
</section>
</div>
</section>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-4">
<section class="box wf-100 blue">
<header><h1><?= $this->getHtml('Speed'); ?></h1></header>
<div class="inner">
<form>
<table class="layout wf-100">
<tbody>
<tr><label for="iVerySlow"><?= $this->getHtml('VerySlow'); ?></label>
<tr><select form="fLocalization" id="iVerySlow" name="very_slow">
</select>
<tr><label for="iSlow"><?= $this->getHtml('Slow'); ?></label>
<tr><select form="fLocalization" id="iSlow" name="slow">
</select>
<tr><label for="iMedium"><?= $this->getHtml('Medium'); ?></label>
<tr><select form="fLocalization" id="iMedium" name="medium">
</select>
<tr><label for="iFast"><?= $this->getHtml('Fast'); ?></label>
<tr><select form="fLocalization" id="iFast" name="fast">
</select>
<tr><label for="iVeryFast"><?= $this->getHtml('VeryFast'); ?></label>
<tr><select form="fLocalization" id="iVeryFast" name="very_fast">
</select>
<tr><label for="iSeaSpeed"><?= $this->getHtml('Sea'); ?></label>
<tr><select form="fLocalization" id="iSeaSpeed" name="sea_speed">
</select>
</table>
</form>
<section class="box wf-100 blue">
<header><h1><?= $this->getHtml('Speed'); ?></h1></header>
<div class="inner">
<form>
<table class="layout wf-100">
<tbody>
<tr><td><label for="iVerySlow"><?= $this->getHtml('VerySlow'); ?></label>
<tr><td><select form="fLocalization" id="iVerySlow" name="very_slow">
</select>
<tr><td><label for="iSlow"><?= $this->getHtml('Slow'); ?></label>
<tr><td><select form="fLocalization" id="iSlow" name="slow">
</select>
<tr><td><label for="iMedium"><?= $this->getHtml('Medium'); ?></label>
<tr><td><select form="fLocalization" id="iMedium" name="medium">
</select>
<tr><td><label for="iFast"><?= $this->getHtml('Fast'); ?></label>
<tr><td><select form="fLocalization" id="iFast" name="fast">
</select>
<tr><td><label for="iVeryFast"><?= $this->getHtml('VeryFast'); ?></label>
<tr><td><select form="fLocalization" id="iVeryFast" name="very_fast">
</select>
<tr><td><label for="iSeaSpeed"><?= $this->getHtml('Sea'); ?></label>
<tr><td><select form="fLocalization" id="iSeaSpeed" name="sea_speed">
</select>
</table>
</form>
</div>
</section>
</div>
</section>
</div>
<div class="col-xs-12 col-md-4">
<section class="box wf-100 purple">
<header><h1><?= $this->getHtml('Length'); ?></h1></header>
<div class="inner">
<form>
<table class="layout wf-100">
<tbody>
<tr><label for="iVeryShort"><?= $this->getHtml('VeryShort'); ?></label>
<tr><select form="fLocalization" id="iVeryShort" name="very_short">
</select>
<tr><label for="iShort"><?= $this->getHtml('Short'); ?></label>
<tr><select form="fLocalization" id="iShort" name="short">
</select>
<tr><label for="iMedium"><?= $this->getHtml('Medium'); ?></label>
<tr><select form="fLocalization" id="iMedium" name="medium">
</select>
<tr><label for="iLong"><?= $this->getHtml('Long'); ?></label>
<tr><select form="fLocalization" id="iLong" name="long">
</select>
<tr><label for="iVeryLong"><?= $this->getHtml('VeryLong'); ?></label>
<tr><select form="fLocalization" id="iVeryLong" name="very_long">
</select>
<tr><label for="iSeaLength"><?= $this->getHtml('Sea'); ?></label>
<tr><select form="fLocalization" id="iSeaLength" name="sea_length">
</select>
</table>
</form>
<div class="col-xs-12 col-md-4">
<section class="box wf-100 purple">
<header><h1><?= $this->getHtml('Length'); ?></h1></header>
<div class="inner">
<form>
<table class="layout wf-100">
<tbody>
<tr><td><label for="iVeryShort"><?= $this->getHtml('VeryShort'); ?></label>
<tr><td><select form="fLocalization" id="iVeryShort" name="very_short">
</select>
<tr><td><label for="iShort"><?= $this->getHtml('Short'); ?></label>
<tr><td><select form="fLocalization" id="iShort" name="short">
</select>
<tr><td><label for="iMedium"><?= $this->getHtml('Medium'); ?></label>
<tr><td><select form="fLocalization" id="iMedium" name="medium">
</select>
<tr><td><label for="iLong"><?= $this->getHtml('Long'); ?></label>
<tr><td><select form="fLocalization" id="iLong" name="long">
</select>
<tr><td><label for="iVeryLong"><?= $this->getHtml('VeryLong'); ?></label>
<tr><td><select form="fLocalization" id="iVeryLong" name="very_long">
</select>
<tr><td><label for="iSeaLength"><?= $this->getHtml('Sea'); ?></label>
<tr><td><select form="fLocalization" id="iSeaLength" name="sea_length">
</select>
</table>
</form>
</div>
</section>
</div>
</section>
</div>
<div class="col-xs-12 col-md-4">
<section class="box wf-100">
<header><h1><?= $this->getHtml('Area'); ?></h1></header>
<div class="inner">
<form>
<table class="layout wf-100">
<tbody>
<tr><label for="iVerySmall"><?= $this->getHtml('VerySmall'); ?></label>
<tr><select form="fLocalization" id="iVerySmall" name="very_small">
</select>
<tr><label for="iSmall"><?= $this->getHtml('Small'); ?></label>
<tr><select form="fLocalization" id="iSmall" name="small">
</select>
<tr><label for="iMedium"><?= $this->getHtml('Medium'); ?></label>
<tr><select form="fLocalization" id="iMedium" name="medium">
</select>
<tr><label for="iLarge"><?= $this->getHtml('Large'); ?></label>
<tr><select form="fLocalization" id="iLarge" name="large">
</select>
<tr><label for="iVeryLarge"><?= $this->getHtml('VeryLarge'); ?></label>
<tr><select form="fLocalization" id="iVeryLarge" name="very_large">
</select>
</table>
</form>
<div class="col-xs-12 col-md-4">
<section class="box wf-100">
<header><h1><?= $this->getHtml('Area'); ?></h1></header>
<div class="inner">
<form>
<table class="layout wf-100">
<tbody>
<tr><td><label for="iVerySmall"><?= $this->getHtml('VerySmall'); ?></label>
<tr><td><select form="fLocalization" id="iVerySmall" name="very_small">
</select>
<tr><td><label for="iSmall"><?= $this->getHtml('Small'); ?></label>
<tr><td><select form="fLocalization" id="iSmall" name="small">
</select>
<tr><td><label for="iMedium"><?= $this->getHtml('Medium'); ?></label>
<tr><td><select form="fLocalization" id="iMedium" name="medium">
</select>
<tr><td><label for="iLarge"><?= $this->getHtml('Large'); ?></label>
<tr><td><select form="fLocalization" id="iLarge" name="large">
</select>
<tr><td><label for="iVeryLarge"><?= $this->getHtml('VeryLarge'); ?></label>
<tr><td><select form="fLocalization" id="iVeryLarge" name="very_large">
</select>
</table>
</form>
</div>
</section>
</div>
</section>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-4">
<section class="box wf-100">
<header><h1><?= $this->getHtml('Volume'); ?></h1></header>
<div class="inner">
<form>
<table class="layout wf-100">
<tbody>
<tr><label for="iVerySmall"><?= $this->getHtml('VerySmall'); ?></label>
<tr><select form="fLocalization" id="iVerySmall" name="very_small">
</select>
<tr><label for="iSmall"><?= $this->getHtml('Small'); ?></label>
<tr><select form="fLocalization" id="iSmall" name="small">
</select>
<tr><label for="iMedium"><?= $this->getHtml('Medium'); ?></label>
<tr><select form="fLocalization" id="iMedium" name="medium">
</select>
<tr><label for="iLarge"><?= $this->getHtml('Large'); ?></label>
<tr><select form="fLocalization" id="iLarge" name="large">
</select>
<tr><label for="iVeryLarge"><?= $this->getHtml('VeryLarge'); ?></label>
<tr><select form="fLocalization" id="iVeryLarge" name="very_large">
</select>
<tr><label for="iTeaspoon"><?= $this->getHtml('Teaspoon'); ?></label>
<tr><select form="fLocalization" id="iTeaspoon" name="teaspoon">
</select>
<tr><label for="iTablespoon"><?= $this->getHtml('Tablespoon'); ?></label>
<tr><select form="fLocalization" id="iTablespoon" name="tablespoon">
</select>
<tr><label for="iGlass"><?= $this->getHtml('Glass'); ?></label>
<tr><select form="fLocalization" id="iGlass" name="glass">
</select>
</table>
</form>
<section class="box wf-100">
<header><h1><?= $this->getHtml('Volume'); ?></h1></header>
<div class="inner">
<form>
<table class="layout wf-100">
<tbody>
<tr><td><label for="iVerySmall"><?= $this->getHtml('VerySmall'); ?></label>
<tr><td><select form="fLocalization" id="iVerySmall" name="very_small">
</select>
<tr><td><label for="iSmall"><?= $this->getHtml('Small'); ?></label>
<tr><td><select form="fLocalization" id="iSmall" name="small">
</select>
<tr><td><label for="iMedium"><?= $this->getHtml('Medium'); ?></label>
<tr><td><select form="fLocalization" id="iMedium" name="medium">
</select>
<tr><td><label for="iLarge"><?= $this->getHtml('Large'); ?></label>
<tr><td><select form="fLocalization" id="iLarge" name="large">
</select>
<tr><td><label for="iVeryLarge"><?= $this->getHtml('VeryLarge'); ?></label>
<tr><td><select form="fLocalization" id="iVeryLarge" name="very_large">
</select>
<tr><td><label for="iTeaspoon"><?= $this->getHtml('Teaspoon'); ?></label>
<tr><td><select form="fLocalization" id="iTeaspoon" name="teaspoon">
</select>
<tr><td><label for="iTablespoon"><?= $this->getHtml('Tablespoon'); ?></label>
<tr><td><select form="fLocalization" id="iTablespoon" name="tablespoon">
</select>
<tr><td><label for="iGlass"><?= $this->getHtml('Glass'); ?></label>
<tr><td><select form="fLocalization" id="iGlass" name="glass">
</select>
</table>
</form>
</div>
</section>
</div>
</section>
</div>
</div>
</div>
</div>