From a4e2b855ce57eae005cdff6bc131dabbbd310cd1 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sat, 8 Apr 2023 22:25:12 +0200 Subject: [PATCH] fix form label --- src/Config.php | 2 +- src/Manage.php | 6 +++--- src/module/cssheader.php | 6 +++--- src/module/dcstore.php | 2 +- src/module/gitshields.php | 2 +- src/module/licensefile.php | 4 ++-- src/module/newline.php | 2 +- src/module/phpcsfixer.php | 4 ++-- src/module/phpheader.php | 6 +++--- src/module/phpstan.php | 8 ++++---- src/module/zip.php | 8 ++++---- 11 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/Config.php b/src/Config.php index c6ba619..b0b3999 100644 --- a/src/Config.php +++ b/src/Config.php @@ -111,7 +111,7 @@ class Config extends dcNsProcess (new Label(__('Show dotclear distributed modules'), Label::OUTSIDE_LABEL_AFTER))->class('classic')->for('allow_distrib'), ]), (new Para())->items([ - (new Label(__('Sort modules seletion by:')))->for('combosortby'), + (new Label(__('Sort modules seletion by:'), Label::OUTSIDE_LABEL_BEFORE))->for('combosortby'), (new Select('combosortby'))->items([__('Name') => 'name', __('Id') => 'id'])->default(dcCore::app()->blog->settings->get(My::id())->get('combosortby')), ]), ]), diff --git a/src/Manage.php b/src/Manage.php index 86fd5a5..d335e41 100644 --- a/src/Manage.php +++ b/src/Manage.php @@ -267,7 +267,7 @@ class Manage extends dcNsProcess echo (new Form('improve_menu'))->method('get')->action(dcCore::app()->adminurl->get('admin.plugin.' . My::id()))->fields([ (new Para())->class('anchor-nav')->items([ - (new Label(__('Goto:')))->for('type')->class('classic'), + (new Label(__('Goto:'), Label::OUTSIDE_LABEL_BEFORE))->for('type')->class('classic'), (new Select('type'))->default(self::$type)->items([__('Plugins') => 'plugin', __('Themes') => 'theme']), (new Submit('simenu'))->value(__('Save')), (new Hidden('p', My::id())), @@ -298,7 +298,7 @@ class Manage extends dcNsProcess ))->value($action->id())->disabled(!$action->isConfigured())->render() . '' . '' . - (new Label(Html::escapeHTML($action->name())))->for('action_' . $action->id())->class('classic')->render() . + (new Label(Html::escapeHTML($action->name()), Label::OUTSIDE_LABEL_AFTER))->for('action_' . $action->id())->class('classic')->render() . '' . '' . $action->description() . '' . '' . ( @@ -317,7 +317,7 @@ class Manage extends dcNsProcess (new Label(__('Save fields selection as preference'), Label::OUTSIDE_LABEL_AFTER))->for('save_preferences')->class('classic'), ]), (new Para())->class('col right')->items([ - (new Label(__('Select a module:')))->for('module')->class('classic'), + (new Label(__('Select a module:'), Label::OUTSIDE_LABEL_BEFORE))->for('module')->class('classic'), (new Select('module'))->default(self::$module)->items($combo_modules), (new Submit('fix'))->value(__('Fix it')), (new Hidden(['type'], self::$type)), diff --git a/src/module/cssheader.php b/src/module/cssheader.php index 1fb9cad..ae19627 100644 --- a/src/module/cssheader.php +++ b/src/module/cssheader.php @@ -120,7 +120,7 @@ class cssheader extends Action (new Fieldset())->class('fieldset')->legend((new Legend(__('Adjustments'))))->fields([ // bloc_action (new Para())->items([ - (new Label(__('Action:')))->for('bloc_action'), + (new Label(__('Action:'), Label::OUTSIDE_LABEL_BEFORE))->for('bloc_action'), (new Select('bloc_action'))->default($this->getSetting('bloc_action'))->items($this->action_bloc), ]), // exclude_locales @@ -137,7 +137,7 @@ class cssheader extends Action (new Fieldset())->class('fieldset')->legend((new Legend(__('Contents'))))->fields([ // bloc_content (new Para())->items([ - (new Label(__('Bloc content:')))->for('bloc_content'), + (new Label(__('Bloc content:'), Label::OUTSIDE_LABEL_BEFORE))->for('bloc_content'), (new Textarea('bloc_content', Html::escapeHTML($this->bloc_content)))->cols(120)->rows(10), ]), (new Note())->text(sprintf( @@ -147,7 +147,7 @@ class cssheader extends Action (new Note())->text(__('Do not put structural elements to the begining of lines.'))->class('form-note'), // exemple (new Para())->items([ - (new Label(__('Exemple:')))->for('content_exemple'), + (new Label(__('Exemple:'), Label::OUTSIDE_LABEL_BEFORE))->for('content_exemple'), (new Textarea('content_exemple', Html::escapeHTML(self::$exemple)))->cols(120)->rows(10)->readonly(true), ]), ]), diff --git a/src/module/dcstore.php b/src/module/dcstore.php index aac71d8..0763596 100644 --- a/src/module/dcstore.php +++ b/src/module/dcstore.php @@ -72,7 +72,7 @@ class dcstore extends Action (new Fieldset())->class('fieldset')->legend((new Legend(__('Contents'))))->fields([ // phpexe_path (new Para())->items([ - (new Label(__('Predictable URL to zip file on the external repository:')))->for('dcstore_pattern'), + (new Label(__('Predictable URL to zip file on the external repository:'), Label::OUTSIDE_LABEL_BEFORE))->for('dcstore_pattern'), (new Input('dcstore_pattern'))->size(65)->maxlenght(255)->value($this->pattern), ]), (new Note())->text(sprintf(__('You can use wildcards %s'), '%author%, %type%, %id%, %version%.'))->class('form-note'), diff --git a/src/module/gitshields.php b/src/module/gitshields.php index 375459c..1fb0a9e 100644 --- a/src/module/gitshields.php +++ b/src/module/gitshields.php @@ -97,7 +97,7 @@ class gitshields extends Action (new Fieldset())->class('fieldset')->legend((new Legend(__('Contents'))))->fields([ // username (new Para())->items([ - (new Label(__('Your Github user name:')))->for('username'), + (new Label(__('Your Github user name:'), Label::OUTSIDE_LABEL_BEFORE))->for('username'), (new Input('username'))->size(65)->maxlenght(255)->value($this->username), ]), (new Note())->text(__('Used in your Github URL: http://github.com/username/module_id.'))->class('form-note'), diff --git a/src/module/licensefile.php b/src/module/licensefile.php index 1669098..76d313d 100644 --- a/src/module/licensefile.php +++ b/src/module/licensefile.php @@ -93,12 +93,12 @@ class licensefile extends Action (new Fieldset())->class('fieldset')->legend((new Legend(__('Adjustments'))))->fields([ // action_version (new Para())->items([ - (new Label(__('License version:')))->for('action_version'), + (new Label(__('License version:'), Label::OUTSIDE_LABEL_BEFORE))->for('action_version'), (new Select('action_version'))->default($this->getSetting('action_version'))->items($this->action_version), ]), // action_full (new Para())->items([ - (new Label(__('Action on file:')))->for('action_full'), + (new Label(__('Action on file:'), Label::OUTSIDE_LABEL_BEFORE))->for('action_full'), (new Select('action_full'))->default($this->getSetting('action_full'))->items($this->action_full), ]), ]), diff --git a/src/module/newline.php b/src/module/newline.php index 0d243e1..5d9e8b1 100644 --- a/src/module/newline.php +++ b/src/module/newline.php @@ -69,7 +69,7 @@ class newline extends Action (new Fieldset())->class('fieldset')->legend((new Legend(__('Contents'))))->fields([ // newline_extensions (new Para())->items([ - (new Label(__('List of files extension to work on:')))->for('newline_extensions'), + (new Label(__('List of files extension to work on:'), Label::OUTSIDE_LABEL_BEFORE))->for('newline_extensions'), (new Input('newline_extensions'))->size(65)->maxlenght(255)->value(implode(',', $ext)), ]), (new Note())->text(__('Use comma separated list of extensions without dot, recommand "php,js,xml,txt,md".'))->class('form-note'), diff --git a/src/module/phpcsfixer.php b/src/module/phpcsfixer.php index ed4e761..5f72c44 100644 --- a/src/module/phpcsfixer.php +++ b/src/module/phpcsfixer.php @@ -105,7 +105,7 @@ class phpcsfixer extends Action (new Fieldset())->class('fieldset')->legend((new Legend(__('Root'))))->fields([ // phpexe_path (new Para())->items([ - (new Label(__('Root directory of PHP executable:')))->for('phpexe_path'), + (new Label(__('Root directory of PHP executable:'), Label::OUTSIDE_LABEL_BEFORE))->for('phpexe_path'), (new Input('phpexe_path'))->size(65)->maxlenght(255)->value($this->phpexe_path), ]), (new Note())->text(__('If this module does not work you can try to put here directory to php executable (without executable file name).'))->class('form-note'), @@ -113,7 +113,7 @@ class phpcsfixer extends Action (new Fieldset())->class('fieldset')->legend((new Legend(__('Bootstrap'))))->fields([ // file_content (new Para())->items([ - (new Label(__('PHP CS Fixer configuration file:')))->for('file_content'), + (new Label(__('PHP CS Fixer configuration file:'), Label::OUTSIDE_LABEL_BEFORE))->for('file_content'), (new Textarea('file_content', Html::escapeHTML($content)))->class('maximal')->cols(120)->rows(14)->readonly(true), ]), ]), diff --git a/src/module/phpheader.php b/src/module/phpheader.php index 9deaf33..f3f9d03 100644 --- a/src/module/phpheader.php +++ b/src/module/phpheader.php @@ -119,7 +119,7 @@ class phpheader extends Action (new Fieldset())->class('fieldset')->legend((new Legend(__('Adjustments'))))->fields([ // bloc_action (new Para())->items([ - (new Label(__('Action:')))->for('bloc_action'), + (new Label(__('Action:'), Label::OUTSIDE_LABEL_BEFORE))->for('bloc_action'), (new Select('bloc_action'))->default($this->getSetting('bloc_action'))->items($this->action_bloc), ]), // remove_old @@ -136,7 +136,7 @@ class phpheader extends Action (new Fieldset())->class('fieldset')->legend((new Legend(__('Contents'))))->fields([ // bloc_content (new Para())->items([ - (new Label(__('Bloc content:')))->for('bloc_content'), + (new Label(__('Bloc content:'), Label::OUTSIDE_LABEL_BEFORE))->for('bloc_content'), (new Textarea('bloc_content', Html::escapeHTML($this->bloc_content)))->cols(120)->rows(10), ]), (new Note())->text(sprintf( @@ -146,7 +146,7 @@ class phpheader extends Action (new Note())->text(__('Do not put structural elements to the begining of lines.'))->class('form-note'), // exemple (new Para())->items([ - (new Label(__('Exemple:')))->for('content_exemple'), + (new Label(__('Exemple:'), Label::OUTSIDE_LABEL_BEFORE))->for('content_exemple'), (new Textarea('content_exemple', Html::escapeHTML(self::$exemple)))->cols(120)->rows(10)->readonly(true), ]), ]), diff --git a/src/module/phpstan.php b/src/module/phpstan.php index 5a70b5c..9a5012a 100644 --- a/src/module/phpstan.php +++ b/src/module/phpstan.php @@ -114,7 +114,7 @@ class phpstan extends Action (new Fieldset())->class('fieldset')->legend((new Legend(__('Root'))))->fields([ // phpexe_path (new Para())->items([ - (new Label(__('Root directory of PHP executable:')))->for('phpexe_path'), + (new Label(__('Root directory of PHP executable:'), Label::OUTSIDE_LABEL_BEFORE))->for('phpexe_path'), (new Input('phpexe_path'))->size(65)->maxlenght(255)->value($this->phpexe_path), ]), (new Note())->text(__('If this module does not work you can try to put here directory to php executable (without executable file name).'))->class('form-note'), @@ -122,12 +122,12 @@ class phpstan extends Action (new Fieldset())->class('fieldset')->legend((new Legend(__('Adjustments'))))->fields([ // run_level (new Para())->items([ - (new Label(__('Level:')))->for('run_level')->class('classic'), + (new Label(__('Level:'), Label::OUTSIDE_LABEL_BEFORE))->for('run_level')->class('classic'), (new Number('run_level'))->min(0)->max(50)->value($this->run_level), ]), // ignored_vars (new Para())->items([ - (new Label(__('List of ignored variables:')))->for('ignored_vars'), + (new Label(__('List of ignored variables:'), Label::OUTSIDE_LABEL_BEFORE))->for('ignored_vars'), (new Input('ignored_vars'))->size(65)->maxlenght(255)->value($this->ignored_vars), ]), (new Note())->text( @@ -156,7 +156,7 @@ class phpstan extends Action (new Fieldset())->class('fieldset')->legend((new Legend(__('Bootstrap'))))->fields([ // file_content (new Para())->items([ - (new Label(__('PHPStan configuration file:')))->for('file_content'), + (new Label(__('PHPStan configuration file:'), Label::OUTSIDE_LABEL_BEFORE))->for('file_content'), (new Textarea('file_content', Html::escapeHTML($content)))->class('maximal')->cols(120)->rows(14)->readonly(true), ]), ]), diff --git a/src/module/zip.php b/src/module/zip.php index cc5924e..e64cea1 100644 --- a/src/module/zip.php +++ b/src/module/zip.php @@ -114,7 +114,7 @@ class zip extends Action (new Fieldset())->class('fieldset')->legend((new Legend(__('Root'))))->fields([ // pack_repository (new Para())->items([ - (new Label(__('Path to repository:')))->for('pack_repository'), + (new Label(__('Path to repository:'), Label::OUTSIDE_LABEL_BEFORE))->for('pack_repository'), (new Input('pack_repository'))->size(65)->maxlenght(255)->value($this->getSetting('pack_repository')), ]), (new Note())->text(sprintf( @@ -126,13 +126,13 @@ class zip extends Action (new Fieldset())->class('fieldset')->legend((new Legend(__('Files'))))->fields([ // pack_filename (new Para())->items([ - (new Label(__('Name of exported package:')))->for('pack_filename'), + (new Label(__('Name of exported package:'), Label::OUTSIDE_LABEL_BEFORE))->for('pack_filename'), (new Input('pack_filename'))->size(65)->maxlenght(255)->value($this->getSetting('pack_filename')), ]), (new Note())->text(sprintf(__('Preconization: %s'), '%type%-%id%'))->class('form-note'), // secondpack_filename (new Para())->items([ - (new Label(__('Name of second exported package:')))->for('secondpack_filename'), + (new Label(__('Name of second exported package:'), Label::OUTSIDE_LABEL_BEFORE))->for('secondpack_filename'), (new Input('secondpack_filename'))->size(65)->maxlenght(255)->value($this->getSetting('secondpack_filename')), ]), (new Note())->text(sprintf(__('Preconization: %s'), '%type%-%id%-%version%'))->class('form-note'), @@ -145,7 +145,7 @@ class zip extends Action (new Fieldset())->class('fieldset')->legend((new Legend(__('Contents'))))->fields([ // pack_excludefiles (new Para())->items([ - (new Label(__('Extra files to exclude from package:')))->for('pack_excludefiles'), + (new Label(__('Extra files to exclude from package:'), Label::OUTSIDE_LABEL_BEFORE))->for('pack_excludefiles'), (new Input('pack_excludefiles'))->size(65)->maxlenght(255)->value($this->getSetting('pack_excludefiles')), ]), (new Note())->text(sprintf(__('By default all these files are always removed from packages : %s'), implode(', ', self::$exclude)))->class('form-note'),