code review
This commit is contained in:
parent
f0debe050f
commit
aeb9bb3353
3 changed files with 44 additions and 35 deletions
|
@ -29,7 +29,6 @@ use Dotclear\Helper\Html\Form\{
|
|||
Para,
|
||||
Select
|
||||
};
|
||||
use Dotclear\Helper\Html\Html;
|
||||
use Exception;
|
||||
|
||||
class Config extends dcNsProcess
|
||||
|
|
|
@ -321,7 +321,8 @@ class Manage extends dcNsProcess
|
|||
<div class="two-cols">
|
||||
<p class="col checkboxes-helpers"></p>' .
|
||||
|
||||
(new Para())->class('col right')->items(array_merge([
|
||||
(new Para())->class('col right')->items(array_merge(
|
||||
[
|
||||
(new Text('', __('Selected languages action:'))),
|
||||
(new Select('action'))->items([
|
||||
__('Backup languages') => 'module_create_backups',
|
||||
|
@ -330,7 +331,8 @@ class Manage extends dcNsProcess
|
|||
]),
|
||||
(new Submit('do-action'))->value(__('ok')),
|
||||
dcCore::app()->formNonce(false),
|
||||
], dcCore::app()->adminurl?->hiddenFormFields(
|
||||
],
|
||||
dcCore::app()->adminurl?->hiddenFormFields(
|
||||
My::id(),
|
||||
['type' => $current->module->type, 'module' => $current->module->id]
|
||||
)
|
||||
|
@ -389,7 +391,8 @@ class Manage extends dcNsProcess
|
|||
<div class="two-cols">
|
||||
<p class="col checkboxes-helpers"></p>' .
|
||||
|
||||
(new Para())->class('col right')->items(array_merge([
|
||||
(new Para())->class('col right')->items(array_merge(
|
||||
[
|
||||
(new Text('', __('Selected backups action:'))),
|
||||
(new Select('action'))->items([
|
||||
__('Restore backups') => 'module_restore_backup',
|
||||
|
@ -397,7 +400,8 @@ class Manage extends dcNsProcess
|
|||
]),
|
||||
(new Submit('do-action'))->value(__('ok')),
|
||||
dcCore::app()->formNonce(false),
|
||||
], dcCore::app()->adminurl?->hiddenFormFields(
|
||||
],
|
||||
dcCore::app()->adminurl?->hiddenFormFields(
|
||||
My::id(),
|
||||
['type' => $current->module->type, 'module' => $current->module->id]
|
||||
)
|
||||
|
@ -428,10 +432,12 @@ class Manage extends dcNsProcess
|
|||
])->render();
|
||||
}
|
||||
echo
|
||||
(new Para())->items(array_merge([
|
||||
(new Para())->items(array_merge(
|
||||
[
|
||||
(new Submit(['save']))->value(__('Create')),
|
||||
dcCore::app()->formNonce(false),
|
||||
], dcCore::app()->adminurl?->hiddenFormFields(
|
||||
],
|
||||
dcCore::app()->adminurl?->hiddenFormFields(
|
||||
My::id(),
|
||||
['type' => $current->module->type, 'module' => $current->module->id, 'action' => 'module_add_code']
|
||||
)
|
||||
|
@ -447,10 +453,12 @@ class Manage extends dcNsProcess
|
|||
(new File('packfile')),
|
||||
|
||||
]),
|
||||
(new Para())->items(array_merge([
|
||||
(new Para())->items(array_merge(
|
||||
[
|
||||
(new Submit(['save']))->value(__('Import')),
|
||||
dcCore::app()->formNonce(false),
|
||||
], dcCore::app()->adminurl?->hiddenFormFields(
|
||||
],
|
||||
dcCore::app()->adminurl?->hiddenFormFields(
|
||||
My::id(),
|
||||
['type' => $current->module->type, 'module' => $current->module->id, 'action' => 'module_import_pack']
|
||||
)
|
||||
|
@ -590,11 +598,13 @@ class Manage extends dcNsProcess
|
|||
(new Select('multigroup'))->items(My::l10nGroupsCombo()),
|
||||
])->render() .
|
||||
'</div>' .
|
||||
(new Para())->class('col right')->items(array_merge([
|
||||
(new Para())->class('col right')->items(array_merge(
|
||||
[
|
||||
(new Submit('do-action'))->value(__('Save') . ' (s)')->accesskey('s'),
|
||||
dcCore::app()->formNonce(false),
|
||||
(new Hidden(['code'], $current->lang->code)),
|
||||
], dcCore::app()->adminurl?->hiddenFormFields(
|
||||
],
|
||||
dcCore::app()->adminurl?->hiddenFormFields(
|
||||
My::id(),
|
||||
['type' => $current->module?->type, 'module' => $current->module?->id, 'lang' => $current->lang->code, 'action' => 'module_update_code']
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue