Add autocapitalize="off" for email fields
This commit is contained in:
parent
f997cb59a1
commit
4f884d43e6
8 changed files with 10 additions and 10 deletions
app
Models/Pages
templates/layouts
|
@ -336,7 +336,7 @@ class Install extends Admin
|
|||
'required' => true,
|
||||
],
|
||||
'email' => [
|
||||
'type' => 'text',
|
||||
'type' => 'email',
|
||||
'maxlength' => '80',
|
||||
'pattern' => '.+@.+',
|
||||
'value' => $v->email ?? '',
|
||||
|
|
|
@ -512,7 +512,7 @@ class Options extends Admin
|
|||
'legend' => 'E-mail subhead',
|
||||
'fields' => [
|
||||
'o_admin_email' => [
|
||||
'type' => 'text',
|
||||
'type' => 'email',
|
||||
'maxlength' => '80',
|
||||
'value' => $config->o_admin_email,
|
||||
'caption' => 'Admin e-mail label',
|
||||
|
@ -521,7 +521,7 @@ class Options extends Admin
|
|||
'pattern' => '.+@.+',
|
||||
],
|
||||
'o_webmaster_email' => [
|
||||
'type' => 'text',
|
||||
'type' => 'email',
|
||||
'maxlength' => '80',
|
||||
'value' => $config->o_webmaster_email,
|
||||
'caption' => 'Webmaster e-mail label',
|
||||
|
|
|
@ -104,7 +104,7 @@ class NewUser extends Users
|
|||
'pattern' => '^.{2,25}$',
|
||||
],
|
||||
'email' => [
|
||||
'type' => 'text',
|
||||
'type' => 'email',
|
||||
'maxlength' => '80',
|
||||
'value' => $data['email'] ?? null,
|
||||
'caption' => 'Email',
|
||||
|
|
|
@ -371,7 +371,7 @@ class Auth extends Page
|
|||
'fields' => [
|
||||
'email' => [
|
||||
'autofocus' => true,
|
||||
'type' => 'text',
|
||||
'type' => 'email',
|
||||
'maxlength' => '80',
|
||||
'value' => $email,
|
||||
'caption' => 'Email',
|
||||
|
|
|
@ -60,7 +60,7 @@ trait PostFormTrait
|
|||
];
|
||||
$fieldset['email'] = [
|
||||
'class' => ['w2'],
|
||||
'type' => 'text',
|
||||
'type' => 'email',
|
||||
'maxlength' => '80',
|
||||
'caption' => 'Email',
|
||||
'required' => 1 === $this->c->config->b_force_guest_email,
|
||||
|
|
|
@ -227,7 +227,7 @@ class Email extends Profile
|
|||
'fields' => [
|
||||
'new_email' => [
|
||||
'autofocus' => true,
|
||||
'type' => 'text',
|
||||
'type' => 'email',
|
||||
'maxlength' => '80',
|
||||
'caption' => $this->rules->confirmEmail ? 'New or old email' : 'New email',
|
||||
'required' => true,
|
||||
|
|
|
@ -111,7 +111,7 @@ class Register extends Page
|
|||
'email' => [
|
||||
'autofocus' => true,
|
||||
'class' => ['hint'],
|
||||
'type' => 'text',
|
||||
'type' => 'email',
|
||||
'maxlength' => '80',
|
||||
'value' => $v->email,
|
||||
'caption' => 'Email',
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
<dl id="id-dl-{{ $cur['id'] or $key }}" @if ($cur['class']) class="f-field-{{ \implode(' f-field-', $cur['class']) }}" @endif>
|
||||
<dt> @if ($cur['caption'])<label class="f-ycaption @if ($cur['required']) f-req @endif" @if (false === \strpos('.radio.yield.str.btn.link.', ".{$cur['type']}.")) for="id-{{ $key }}" @endif>{!! __($cur['caption']) !!}</label> @endif</dt>
|
||||
<dd>
|
||||
@if ('text' === $cur['type'])
|
||||
<input @if ($cur['required']) required @endif @if ($cur['disabled']) disabled @endif @if ($cur['autofocus']) autofocus @endif class="f-ctrl f-ytxt" id="id-{{ $key }}" name="{{ $key }}" type="text" @if ($cur['maxlength']) maxlength="{{ $cur['maxlength'] }}" @endif @if ($cur['pattern']) pattern="{{ $cur['pattern'] }}" @endif @isset ($cur['value']) value="{{ $cur['value'] }}" @endisset>
|
||||
@if ('text' === $cur['type'] || 'email' === $cur['type'])
|
||||
<input @if ($cur['required']) required @endif @if ($cur['disabled']) disabled @endif @if ($cur['autofocus']) autofocus @endif @if ('email' === $cur['type']) autocapitalize="off" @endif class="f-ctrl f-ytxt" id="id-{{ $key }}" name="{{ $key }}" type="text" @if ($cur['maxlength']) maxlength="{{ $cur['maxlength'] }}" @endif @if ($cur['pattern']) pattern="{{ $cur['pattern'] }}" @endif @isset ($cur['value']) value="{{ $cur['value'] }}" @endisset>
|
||||
@elseif ('textarea' === $cur['type'])
|
||||
<textarea @if ($cur['required']) required @endif @if ($cur['disabled']) disabled @endif @if ($cur['autofocus']) autofocus @endif class="f-ctrl f-ytxtarea" id="id-{{ $key }}" name="{{ $key }}" @if ($cur['data']) @foreach ($cur['data'] as $k => $v) data-{{ $k }}="{{ $v }}" @endforeach @endif>{{ $cur['value'] or '' }}</textarea>
|
||||
@elseif ('select' === $cur['type'])
|
||||
|
|
Loading…
Add table
Reference in a new issue