mirror of
https://github.com/a2nt/cms-niceties.git
synced 2024-10-22 09:05:46 +00:00
IMPR: Add asteriks
This commit is contained in:
parent
170afbaa73
commit
3e8828bdbd
@ -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'] ? ' *' : '')
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user