Skip to content

Commit

Permalink
Forms: fix validation for application form email and URL fields which…
Browse files Browse the repository at this point in the history
… allow placeholder values
  • Loading branch information
SKuipers committed Jan 6, 2025
1 parent b0e8582 commit ba37b0f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ v29.0.00
Library: enabled students to access the Library Borrowing page on their profile

Bug Fixes
System Admin: fixed field validation for Student Default Email in Form Builder

v28.0.01
--------
Expand Down
2 changes: 1 addition & 1 deletion modules/User Admin/applicationFormSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
$setting = $settingGateway->getSettingByScope('Application Form', 'studentDefaultWebsite', true);
$row = $form->addRow();
$row->addLabel($setting['name'], __($setting['nameDisplay']))->description(__($setting['description']));
$row->addURL($setting['name'])->setValue($setting['value']);
$row->addTextField($setting['name'])->setValue($setting['value']);

$setting = $settingGateway->getSettingByScope('Application Form', 'autoHouseAssign', true);
$row = $form->addRow();
Expand Down
4 changes: 2 additions & 2 deletions src/Forms/Builder/View/NewStudentDetailsView.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ public function configure(Form $form)

$row = $form->addRow()->setClass('newStudentDetails');
$row->addLabel('studentDefaultEmail', __('Student Default Email'))->description(__('Set default email for students on acceptance, using [username] to insert username.'));
$row->addEmail('studentDefaultEmail');
$row->addTextField('studentDefaultEmail');

$row = $form->addRow()->setClass('newStudentDetails');
$row->addLabel('studentDefaultWebsite', __('Student Default Website'))->description(__('Set default website for students on acceptance, using [username] to insert username.'));
$row->addURL('studentDefaultWebsite');
$row->addTextField('studentDefaultWebsite');
}

public function display(Form $form, FormDataInterface $data)
Expand Down

0 comments on commit ba37b0f

Please sign in to comment.