Skip to content

Commit

Permalink
Career: Use FormValidator::addText instead of FormValidator:addElemen…
Browse files Browse the repository at this point in the history
…t('text'
  • Loading branch information
AngelFQC committed Jun 7, 2023
1 parent 75e9b3e commit 546a18b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion main/inc/lib/career.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public function return_form($url, $action)
$id = isset($_GET['id']) ? (int) $_GET['id'] : '';
$form->addHeader($header);
$form->addHidden('id', $id);
$form->addElement('text', 'name', get_lang('Name'), ['size' => '70']);
$form->addText('name', get_lang('Name'), true, ['size' => '70']);
$form->addHtmlEditor(
'description',
get_lang('Description'),
Expand Down
11 changes: 3 additions & 8 deletions main/inc/lib/promotion.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,14 +227,9 @@ public function return_form($url, $action = 'add')

$id = isset($_GET['id']) ? (int) $_GET['id'] : '';

$form->addElement('header', '', $header);
$form->addElement('hidden', 'id', $id);
$form->addElement(
'text',
'name',
get_lang('Name'),
['size' => '70', 'id' => 'name']
);
$form->addHeader($header);
$form->addHidden('id', $id);
$form->addText('name', get_lang('Name'), true, ['size' => '70', 'id' => 'name']);
$form->addHtmlEditor(
'description',
get_lang('Description'),
Expand Down

0 comments on commit 546a18b

Please sign in to comment.