HTML5 require the fields when enforce is on
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
0cf04c3c3c
commit
20b4e3b86f
|
|
@ -236,8 +236,10 @@ class RegisterController extends Controller {
|
||||||
'loginname' => $loginname,
|
'loginname' => $loginname,
|
||||||
'fullname' => $fullname,
|
'fullname' => $fullname,
|
||||||
'show_fullname' => $this->config->getAppValue('registration', 'show_fullname', 'no') === 'yes',
|
'show_fullname' => $this->config->getAppValue('registration', 'show_fullname', 'no') === 'yes',
|
||||||
|
'enforce_fullname' => $this->config->getAppValue('registration', 'enforce_fullname', 'no') === 'yes',
|
||||||
'phone' => $phone,
|
'phone' => $phone,
|
||||||
'show_phone' => $this->config->getAppValue('registration', 'show_phone', 'no') === 'yes',
|
'show_phone' => $this->config->getAppValue('registration', 'show_phone', 'no') === 'yes',
|
||||||
|
'enforce_phone' => $this->config->getAppValue('registration', 'enforce_phone', 'no') === 'yes',
|
||||||
'message' => $message,
|
'message' => $message,
|
||||||
'password' => $password,
|
'password' => $password,
|
||||||
'additional_hint' => $additional_hint,
|
'additional_hint' => $additional_hint,
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ script('registration', 'registration-form');
|
||||||
<p class="groupmiddle">
|
<p class="groupmiddle">
|
||||||
<input type="text" name="fullname" id="fullname" value="<?php if (!empty($_['fullname'])) {
|
<input type="text" name="fullname" id="fullname" value="<?php if (!empty($_['fullname'])) {
|
||||||
p($_['fullname']);
|
p($_['fullname']);
|
||||||
} ?>" placeholder="<?php p($l->t('Full name')); ?>" />
|
} ?>" placeholder="<?php p($l->t('Full name')); ?>" <?php if ($_['enforce_fullname']) { p('required'); } ?> />
|
||||||
<label for="fullname" class="infield"><?php p($l->t('Full name')); ?></label>
|
<label for="fullname" class="infield"><?php p($l->t('Full name')); ?></label>
|
||||||
<img id="fullname-icon" class="svg" src="<?php print_unescaped(image_path('', 'actions/user.svg')); ?>" alt=""/>
|
<img id="fullname-icon" class="svg" src="<?php print_unescaped(image_path('', 'actions/user.svg')); ?>" alt=""/>
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -57,7 +57,7 @@ script('registration', 'registration-form');
|
||||||
<p class="groupmiddle">
|
<p class="groupmiddle">
|
||||||
<input type="text" name="phone" id="phone" value="<?php if (!empty($_['phone'])) {
|
<input type="text" name="phone" id="phone" value="<?php if (!empty($_['phone'])) {
|
||||||
p($_['phone']);
|
p($_['phone']);
|
||||||
} ?>" placeholder="<?php p($l->t('Phone number')); ?>" />
|
} ?>" placeholder="<?php p($l->t('Phone number')); ?>" <?php if ($_['enforce_phone']) { p('required'); } ?> />
|
||||||
<label for="phone" class="infield"><?php p($l->t('Phone number')); ?></label>
|
<label for="phone" class="infield"><?php p($l->t('Phone number')); ?></label>
|
||||||
<img id="phone-icon" class="svg" src="<?php print_unescaped(image_path('', 'clients/phone.svg')); ?>" alt=""/>
|
<img id="phone-icon" class="svg" src="<?php print_unescaped(image_path('', 'clients/phone.svg')); ?>" alt=""/>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue