forked from rDrama/rDrama
add minlength and maxlength to name change field
parent
851242a721
commit
266b927488
|
@ -188,8 +188,13 @@
|
|||
<p>Your original username will always stay reserved for you: <code>{{v.original_username}}</code></p>
|
||||
<form action="/settings/name_change" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
|
||||
<input hidden name="formkey" value="{{v|formkey}}">
|
||||
<input id="name-body" autocomplete="off" type="text" name="name" class="form-control" value="{{v.username}}" {% if v.namechanged %}disabled{% endif %}>
|
||||
<small>{% if v.patron %}1{% else %}3{% endif %}-25 characters, including letters, numbers, _ , and -</small>
|
||||
{% if v.patron %}
|
||||
{% set minlength = 1 %}
|
||||
{% else %}
|
||||
{% set minlength = 3 %}
|
||||
{% endif %}
|
||||
<input id="name-body" autocomplete="off" type="text" name="name" class="form-control" value="{{v.username}}" minlength="{{minlength}}" maxlength="25" {% if v.namechanged %}disabled{% endif %}>
|
||||
<small>{{minlength}}-25 characters, including letters, numbers, _ , and -</small>
|
||||
<div class="d-flex mt-2">
|
||||
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Change Display Name" {% if v.namechanged %}disabled{% endif %}>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue