IMPR: Add asteriks

This commit is contained in:
Tony Air 2024-03-11 18:13:11 +02:00
parent 170afbaa73
commit 3e8828bdbd
1 changed files with 3 additions and 1 deletions

View File

@ -22,6 +22,7 @@ class AjaxControllerEx extends Extension
{
private static $no_placeholders = false;
private static $show_labels = false;
private static $add_asteriks = false;
private static $allowed_actions = [
'LoginFormEx',
@ -48,12 +49,13 @@ class AjaxControllerEx extends Extension
* A2nt\CMSNiceties\Ajax\Ex\AjaxControllerEx:
* show_labels: false
* no_placeholders: false
* add_asteriks: false
*/
if (!$cfg['no_placeholders']) {
$placeholder = $field->Title();
$field->setAttribute(
'placeholder',
$placeholder
$placeholder.($cfg['add_asteriks'] ? ' *' : '')
);
}