fix form label

This commit is contained in:
Jean-Christian Denis 2023-04-08 22:25:12 +02:00
parent 10bd644971
commit a4e2b855ce
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951
11 changed files with 25 additions and 25 deletions

View file

@ -111,7 +111,7 @@ class Config extends dcNsProcess
(new Label(__('Show dotclear distributed modules'), Label::OUTSIDE_LABEL_AFTER))->class('classic')->for('allow_distrib'), (new Label(__('Show dotclear distributed modules'), Label::OUTSIDE_LABEL_AFTER))->class('classic')->for('allow_distrib'),
]), ]),
(new Para())->items([ (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')), (new Select('combosortby'))->items([__('Name') => 'name', __('Id') => 'id'])->default(dcCore::app()->blog->settings->get(My::id())->get('combosortby')),
]), ]),
]), ]),

View file

@ -267,7 +267,7 @@ class Manage extends dcNsProcess
echo echo
(new Form('improve_menu'))->method('get')->action(dcCore::app()->adminurl->get('admin.plugin.' . My::id()))->fields([ (new Form('improve_menu'))->method('get')->action(dcCore::app()->adminurl->get('admin.plugin.' . My::id()))->fields([
(new Para())->class('anchor-nav')->items([ (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 Select('type'))->default(self::$type)->items([__('Plugins') => 'plugin', __('Themes') => 'theme']),
(new Submit('simenu'))->value(__('Save')), (new Submit('simenu'))->value(__('Save')),
(new Hidden('p', My::id())), (new Hidden('p', My::id())),
@ -298,7 +298,7 @@ class Manage extends dcNsProcess
))->value($action->id())->disabled(!$action->isConfigured())->render() . ))->value($action->id())->disabled(!$action->isConfigured())->render() .
'</td>' . '</td>' .
'<td class="minimal nowrap">' . '<td class="minimal nowrap">' .
(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() .
'</td>' . '</td>' .
'<td class="maximal">' . $action->description() . '</td>' . '<td class="maximal">' . $action->description() . '</td>' .
'<td class="minimal nowrap modules">' . ( '<td class="minimal nowrap modules">' . (
@ -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 Label(__('Save fields selection as preference'), Label::OUTSIDE_LABEL_AFTER))->for('save_preferences')->class('classic'),
]), ]),
(new Para())->class('col right')->items([ (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 Select('module'))->default(self::$module)->items($combo_modules),
(new Submit('fix'))->value(__('Fix it')), (new Submit('fix'))->value(__('Fix it')),
(new Hidden(['type'], self::$type)), (new Hidden(['type'], self::$type)),

View file

@ -120,7 +120,7 @@ class cssheader extends Action
(new Fieldset())->class('fieldset')->legend((new Legend(__('Adjustments'))))->fields([ (new Fieldset())->class('fieldset')->legend((new Legend(__('Adjustments'))))->fields([
// bloc_action // bloc_action
(new Para())->items([ (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), (new Select('bloc_action'))->default($this->getSetting('bloc_action'))->items($this->action_bloc),
]), ]),
// exclude_locales // exclude_locales
@ -137,7 +137,7 @@ class cssheader extends Action
(new Fieldset())->class('fieldset')->legend((new Legend(__('Contents'))))->fields([ (new Fieldset())->class('fieldset')->legend((new Legend(__('Contents'))))->fields([
// bloc_content // bloc_content
(new Para())->items([ (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 Textarea('bloc_content', Html::escapeHTML($this->bloc_content)))->cols(120)->rows(10),
]), ]),
(new Note())->text(sprintf( (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'), (new Note())->text(__('Do not put structural elements to the begining of lines.'))->class('form-note'),
// exemple // exemple
(new Para())->items([ (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), (new Textarea('content_exemple', Html::escapeHTML(self::$exemple)))->cols(120)->rows(10)->readonly(true),
]), ]),
]), ]),

View file

@ -72,7 +72,7 @@ class dcstore extends Action
(new Fieldset())->class('fieldset')->legend((new Legend(__('Contents'))))->fields([ (new Fieldset())->class('fieldset')->legend((new Legend(__('Contents'))))->fields([
// phpexe_path // phpexe_path
(new Para())->items([ (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 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'), (new Note())->text(sprintf(__('You can use wildcards %s'), '%author%, %type%, %id%, %version%.'))->class('form-note'),

View file

@ -97,7 +97,7 @@ class gitshields extends Action
(new Fieldset())->class('fieldset')->legend((new Legend(__('Contents'))))->fields([ (new Fieldset())->class('fieldset')->legend((new Legend(__('Contents'))))->fields([
// username // username
(new Para())->items([ (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 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'), (new Note())->text(__('Used in your Github URL: http://github.com/username/module_id.'))->class('form-note'),

View file

@ -93,12 +93,12 @@ class licensefile extends Action
(new Fieldset())->class('fieldset')->legend((new Legend(__('Adjustments'))))->fields([ (new Fieldset())->class('fieldset')->legend((new Legend(__('Adjustments'))))->fields([
// action_version // action_version
(new Para())->items([ (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), (new Select('action_version'))->default($this->getSetting('action_version'))->items($this->action_version),
]), ]),
// action_full // action_full
(new Para())->items([ (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), (new Select('action_full'))->default($this->getSetting('action_full'))->items($this->action_full),
]), ]),
]), ]),

View file

@ -69,7 +69,7 @@ class newline extends Action
(new Fieldset())->class('fieldset')->legend((new Legend(__('Contents'))))->fields([ (new Fieldset())->class('fieldset')->legend((new Legend(__('Contents'))))->fields([
// newline_extensions // newline_extensions
(new Para())->items([ (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 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'), (new Note())->text(__('Use comma separated list of extensions without dot, recommand "php,js,xml,txt,md".'))->class('form-note'),

View file

@ -105,7 +105,7 @@ class phpcsfixer extends Action
(new Fieldset())->class('fieldset')->legend((new Legend(__('Root'))))->fields([ (new Fieldset())->class('fieldset')->legend((new Legend(__('Root'))))->fields([
// phpexe_path // phpexe_path
(new Para())->items([ (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 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'), (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([ (new Fieldset())->class('fieldset')->legend((new Legend(__('Bootstrap'))))->fields([
// file_content // file_content
(new Para())->items([ (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), (new Textarea('file_content', Html::escapeHTML($content)))->class('maximal')->cols(120)->rows(14)->readonly(true),
]), ]),
]), ]),

View file

@ -119,7 +119,7 @@ class phpheader extends Action
(new Fieldset())->class('fieldset')->legend((new Legend(__('Adjustments'))))->fields([ (new Fieldset())->class('fieldset')->legend((new Legend(__('Adjustments'))))->fields([
// bloc_action // bloc_action
(new Para())->items([ (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), (new Select('bloc_action'))->default($this->getSetting('bloc_action'))->items($this->action_bloc),
]), ]),
// remove_old // remove_old
@ -136,7 +136,7 @@ class phpheader extends Action
(new Fieldset())->class('fieldset')->legend((new Legend(__('Contents'))))->fields([ (new Fieldset())->class('fieldset')->legend((new Legend(__('Contents'))))->fields([
// bloc_content // bloc_content
(new Para())->items([ (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 Textarea('bloc_content', Html::escapeHTML($this->bloc_content)))->cols(120)->rows(10),
]), ]),
(new Note())->text(sprintf( (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'), (new Note())->text(__('Do not put structural elements to the begining of lines.'))->class('form-note'),
// exemple // exemple
(new Para())->items([ (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), (new Textarea('content_exemple', Html::escapeHTML(self::$exemple)))->cols(120)->rows(10)->readonly(true),
]), ]),
]), ]),

View file

@ -114,7 +114,7 @@ class phpstan extends Action
(new Fieldset())->class('fieldset')->legend((new Legend(__('Root'))))->fields([ (new Fieldset())->class('fieldset')->legend((new Legend(__('Root'))))->fields([
// phpexe_path // phpexe_path
(new Para())->items([ (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 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'), (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([ (new Fieldset())->class('fieldset')->legend((new Legend(__('Adjustments'))))->fields([
// run_level // run_level
(new Para())->items([ (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), (new Number('run_level'))->min(0)->max(50)->value($this->run_level),
]), ]),
// ignored_vars // ignored_vars
(new Para())->items([ (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 Input('ignored_vars'))->size(65)->maxlenght(255)->value($this->ignored_vars),
]), ]),
(new Note())->text( (new Note())->text(
@ -156,7 +156,7 @@ class phpstan extends Action
(new Fieldset())->class('fieldset')->legend((new Legend(__('Bootstrap'))))->fields([ (new Fieldset())->class('fieldset')->legend((new Legend(__('Bootstrap'))))->fields([
// file_content // file_content
(new Para())->items([ (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), (new Textarea('file_content', Html::escapeHTML($content)))->class('maximal')->cols(120)->rows(14)->readonly(true),
]), ]),
]), ]),

View file

@ -114,7 +114,7 @@ class zip extends Action
(new Fieldset())->class('fieldset')->legend((new Legend(__('Root'))))->fields([ (new Fieldset())->class('fieldset')->legend((new Legend(__('Root'))))->fields([
// pack_repository // pack_repository
(new Para())->items([ (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 Input('pack_repository'))->size(65)->maxlenght(255)->value($this->getSetting('pack_repository')),
]), ]),
(new Note())->text(sprintf( (new Note())->text(sprintf(
@ -126,13 +126,13 @@ class zip extends Action
(new Fieldset())->class('fieldset')->legend((new Legend(__('Files'))))->fields([ (new Fieldset())->class('fieldset')->legend((new Legend(__('Files'))))->fields([
// pack_filename // pack_filename
(new Para())->items([ (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 Input('pack_filename'))->size(65)->maxlenght(255)->value($this->getSetting('pack_filename')),
]), ]),
(new Note())->text(sprintf(__('Preconization: %s'), '%type%-%id%'))->class('form-note'), (new Note())->text(sprintf(__('Preconization: %s'), '%type%-%id%'))->class('form-note'),
// secondpack_filename // secondpack_filename
(new Para())->items([ (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 Input('secondpack_filename'))->size(65)->maxlenght(255)->value($this->getSetting('secondpack_filename')),
]), ]),
(new Note())->text(sprintf(__('Preconization: %s'), '%type%-%id%-%version%'))->class('form-note'), (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([ (new Fieldset())->class('fieldset')->legend((new Legend(__('Contents'))))->fields([
// pack_excludefiles // pack_excludefiles
(new Para())->items([ (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 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'), (new Note())->text(sprintf(__('By default all these files are always removed from packages : %s'), implode(', ', self::$exclude)))->class('form-note'),