Skip to content
Snippets Groups Projects
Commit 3b9ce0f8 authored by Alexander Purr's avatar Alexander Purr Committed by Robert Lange
Browse files

refs #20735 [finc] better error messages on set pin form

* remove min and max length check and associated error messages
* instead display customized message (title-attribute) on pattern mismatch
parent 289071af
No related merge requests found
...@@ -39,8 +39,7 @@ $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . ...@@ -39,8 +39,7 @@ $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') .
<div class="form-group"> <div class="form-group">
<label for="pin" class="control-label"><?=$this->transEsc('LiberoAccount::new_pin')?>:</label> <label for="pin" class="control-label"><?=$this->transEsc('LiberoAccount::new_pin')?>:</label>
<input type="password" id="pin" name="pin" class="form-control" required aria-required="true" aria-describedby="pin-policy-error" <input type="password" id="pin" name="pin" class="form-control" required aria-required="true" aria-describedby="pin-policy-error"
<?=isset($this->passwordPolicy['minLength']) ? ' data-minlength="' . $this->passwordPolicy['minLength'] . '" data-minlength-error="' . $this->escapeHtmlAttr($this->translate('password_minimum_length', array('%%minlength%%' => $this->passwordPolicy['minLength']))) . '"' : ''?> pattern="[0-9]{4}" title="<?=$this->escapeHtmlAttr($this->translate('LiberoAccount::set_pin_note'))?>" />
<?=isset($this->passwordPolicy['maxLength']) ? ' maxlength="' . $this->passwordPolicy['maxLength'] . '"' : ''?> pattern="[0-9]{4}" />
<div id="pin-policy-error" class="help-block with-errors"></div> <div id="pin-policy-error" class="help-block with-errors"></div>
</div> </div>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment