From 45777916af14e97ef8490c5c5e6839676905f78a Mon Sep 17 00:00:00 2001 From: ARCANEDEV Date: Fri, 19 Aug 2016 19:33:19 +0100 Subject: [PATCH] Updating the auth forms and translations --- resources/lang/en/login.php | 11 ++++ resources/lang/en/register.php | 9 +++ resources/lang/en/reset.php | 10 ++++ resources/lang/en/users.php | 15 +++++ resources/lang/fr/login.php | 11 ++++ resources/lang/fr/register.php | 9 +++ resources/lang/fr/reset.php | 10 ++++ resources/lang/fr/users.php | 15 +++++ .../views/public/_template/master.blade.php | 14 ++--- resources/views/public/login.blade.php | 40 +++++++++----- resources/views/public/register.blade.php | 55 ++++++++++--------- resources/views/public/reset.blade.php | 28 ++++++---- 12 files changed, 170 insertions(+), 57 deletions(-) create mode 100644 resources/lang/en/login.php create mode 100644 resources/lang/en/register.php create mode 100644 resources/lang/en/reset.php create mode 100644 resources/lang/fr/login.php create mode 100644 resources/lang/fr/register.php create mode 100644 resources/lang/fr/reset.php diff --git a/resources/lang/en/login.php b/resources/lang/en/login.php new file mode 100644 index 0000000..4761ad7 --- /dev/null +++ b/resources/lang/en/login.php @@ -0,0 +1,11 @@ + 'Welcome Back!', + 'remember' => 'Remember Me', + 'submit' => 'Sign in', + 'links' => [ + 'register' => 'Don\'t have an account ? Sign up', + 'reset' => 'Have you forgotten your password?', + ], +]; diff --git a/resources/lang/en/register.php b/resources/lang/en/register.php new file mode 100644 index 0000000..ab0ebdb --- /dev/null +++ b/resources/lang/en/register.php @@ -0,0 +1,9 @@ + 'Welcome!', + 'submit' => 'Sign up', + 'links' => [ + 'login' => 'Already have an account ? Sign in', + ], +]; diff --git a/resources/lang/en/reset.php b/resources/lang/en/reset.php new file mode 100644 index 0000000..f6b545c --- /dev/null +++ b/resources/lang/en/reset.php @@ -0,0 +1,10 @@ + 'Have you forgotten your password?', + 'submit' => 'Send Password Reset Link', + 'links' => [ + 'login' => 'You\'ve remembered your password ? Sign in', + 'register' => 'Don\'t have an account ? Sign up', + ], +]; diff --git a/resources/lang/en/users.php b/resources/lang/en/users.php index d984b93..f35bda8 100644 --- a/resources/lang/en/users.php +++ b/resources/lang/en/users.php @@ -1,5 +1,20 @@ 'Email address', + 'username' => 'Username', + 'password' => 'Password', + 'password_confirmation' => 'Password Confirmation', + 'first_name' => 'First Name', + 'last_name' => 'Last Name', + + /* ------------------------------------------------------------------------------------------------ + | Messages + | ------------------------------------------------------------------------------------------------ + */ 'since' => 'Member since :date', ]; diff --git a/resources/lang/fr/login.php b/resources/lang/fr/login.php new file mode 100644 index 0000000..c783a87 --- /dev/null +++ b/resources/lang/fr/login.php @@ -0,0 +1,11 @@ + 'Bienvenu!', + 'remember' => 'Se souvenir de moi', + 'submit' => 'Se connecter', + 'links' => [ + 'register' => 'Vous n\'avez pas un compte? Inscrivez-vous', + 'reset' => 'Avez-vous oublié votre mot de passe?', + ], +]; diff --git a/resources/lang/fr/register.php b/resources/lang/fr/register.php new file mode 100644 index 0000000..94bc9a7 --- /dev/null +++ b/resources/lang/fr/register.php @@ -0,0 +1,9 @@ + 'Bienvenu!', + 'submit' => 'S\'inscrire', + 'links' => [ + 'login' => 'Avez-vous déjà un compte ? Connectez-vous', + ], +]; diff --git a/resources/lang/fr/reset.php b/resources/lang/fr/reset.php new file mode 100644 index 0000000..ca00791 --- /dev/null +++ b/resources/lang/fr/reset.php @@ -0,0 +1,10 @@ + 'Avez-vous oublié votre mot de passe?', + 'submit' => 'Envoyer le lien de réinitialisation d\'un mot de passe', + 'links' => [ + 'login' => 'Avez-vous souvenu de votre mot de passe? Connectez-vous', + 'register' => 'Vous n\'avez pas un compte? Inscrivez-vous', + ], +]; diff --git a/resources/lang/fr/users.php b/resources/lang/fr/users.php index 3f73c24..a26c57e 100644 --- a/resources/lang/fr/users.php +++ b/resources/lang/fr/users.php @@ -1,5 +1,20 @@ 'Email', + 'username' => 'Nom d\'utilisateur', + 'password' => 'Mot de passe', + 'password_confirmation' => 'Confirmation mot de passe', + 'first_name' => 'Prénom', + 'last_name' => 'Nom', + + /* ------------------------------------------------------------------------------------------------ + | Messages + | ------------------------------------------------------------------------------------------------ + */ 'since' => 'Membre depuis :date', ]; diff --git a/resources/views/public/_template/master.blade.php b/resources/views/public/_template/master.blade.php index 92099fe..d6063ed 100644 --- a/resources/views/public/_template/master.blade.php +++ b/resources/views/public/_template/master.blade.php @@ -1,5 +1,5 @@ - + @@ -9,12 +9,12 @@ {{-- STYLE --}} - {!! Html::style('assets/css/style.css') !!} + {{ Html::style('assets/css/style.css') }} {{-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --}} @@ -27,9 +27,9 @@ @include('auth::public._template.footer') {{-- SCRIPTS --}} - {!! Html::script('assets/js/vendors.js') !!} - {!! Html::script('assets/js/app.js') !!} - {!! Html::script('assets/js/auth.js') !!} + {{ Html::script('assets/js/vendors.js') }} + {{ Html::script('assets/js/app.js') }} + {{ Html::script('assets/js/auth.js') }} @yield('scripts') diff --git a/resources/views/public/login.blade.php b/resources/views/public/login.blade.php index eaeea83..316a644 100644 --- a/resources/views/public/login.blade.php +++ b/resources/views/public/login.blade.php @@ -1,41 +1,51 @@ @extends('auth::public._template.master') + @section('content')
- {!! Form::open(['route' => 'auth::login.post', 'method' => 'POST', 'class' => 'form-auth form-login']) !!} -

Welcome Back!

+ {{ Form::open(['route' => 'auth::login.post', 'method' => 'POST', 'class' => 'form-auth form-login']) }} +

{{ trans('auth::login.heading') }}

{{-- EMAIL --}} -
- {!! Form::label('email', 'Email address', ['class' => 'control-label sr-only']) !!} +
+ {{ Form::label('email', trans('auth::users.email'), ['class' => 'control-label sr-only']) }}
- {!! Form::email('email', old('email'), ['class' => 'form-control', 'placeholder' => 'Email address', 'required' => '', 'autofocus' => '']) !!} + {{ Form::email('email', old('email'), ['class' => 'form-control', 'placeholder' => trans('auth::users.email'), 'required' => '', 'autofocus' => '']) }}
{!! $errors->first('email', ':message') !!}
{{-- PASSWORD --}} -
- {!! Form::label('password', 'Password', ['class' => 'control-label sr-only']) !!} +
+ {{ Form::label('password', trans('auth::users.password'), ['class' => 'control-label sr-only']) }}
- {!! Form::password('password', ['class' => 'form-control', 'placeholder' => 'Password', 'required' => '']) !!} + {{ Form::password('password', ['class' => 'form-control', 'placeholder' => trans('auth::users.password'), 'required' => '']) }}
{!! $errors->first('password', ':message') !!}
{{-- REMEMBER ME --}}
- {!! Form::submit('Sign in', ['class' => 'btn btn-lg btn-success btn-block']) !!} - {!! Form::close() !!} + {{ Form::button(trans('auth::login.submit'), ['type' => 'submit', 'class' => 'btn btn-lg btn-success btn-block']) }} + {{ Form::close() }} -
- {!! link_to_route('auth::register.get', 'Don\'t have an account? Sign up', [], ['class' => 'btn btn-primary btn-block']) !!} - {!! link_to_route('auth::password.email.get', 'Have you forgotten your password?', [], ['class' => 'btn btn-warning btn-block']) !!} -
+ @if ($hasRegisterForm || $hasResetForm) +
+ @if ($hasRegisterForm) + {{ link_to_route('auth::register.get', trans('auth::login.links.register'), [], ['class' => 'btn btn-primary btn-block']) }} + @endif + @if ($hasResetForm) + {{ link_to_route('auth::password.email.get', trans('auth::login.links.reset'), [], ['class' => 'btn btn-warning btn-block']) }} + @endif +
+ @endif
@endsection diff --git a/resources/views/public/register.blade.php b/resources/views/public/register.blade.php index eb575a0..fc1fa14 100644 --- a/resources/views/public/register.blade.php +++ b/resources/views/public/register.blade.php @@ -1,29 +1,32 @@ @extends('auth::public._template.master') + @section('content')
- {!! Form::open(['route' => 'auth::register.post', 'method' => 'POST', 'class' => 'form-auth form-register']) !!} -

Welcome!

+ {{ Form::open(['route' => 'auth::register.post', 'method' => 'POST', 'class' => 'form-auth form-register']) }} +

{{ trans('auth::register.heading') }}

{{-- EMAIL --}}
-
- {!! Form::label('email', 'Email address', ['class' => 'control-label sr-only']) !!} +
+ {{ Form::label('email', trans('auth::users.email'), ['class' => 'control-label sr-only']) }}
- {!! Form::email('email', old('email'), ['class' => 'form-control', 'placeholder' => 'Email address', 'required' => '', 'autofocus' => '']) !!} + {{ Form::email('email', old('email'), ['class' => 'form-control', 'placeholder' => trans('auth::users.email'), 'required' => '', 'autofocus' => '']) }}
{!! $errors->first('email', ':message') !!}
{{-- USERNAME --}}
-
- {!! Form::label('username', 'Username', ['class' => 'control-label sr-only']) !!} +
+ {{ Form::label('username', trans('auth::users.username'), ['class' => 'control-label sr-only']) }}
- {!! Form::text('username', old('username'), ['class' => 'form-control', 'placeholder' => 'Username', 'required' => '', 'autofocus' => '']) !!} + {{ Form::text('username', old('username'), ['class' => 'form-control', 'placeholder' => trans('auth::users.username'), 'required' => '', 'autofocus' => '']) }}
{!! $errors->first('username', ':message') !!}
@@ -33,22 +36,22 @@ {{-- PASSWORD --}}
-
- {!! Form::label('password', 'Password', ['class' => 'control-label sr-only']) !!} +
+ {{ Form::label('password', trans('auth::users.password'), ['class' => 'control-label sr-only']) }}
- {!! Form::password('password', ['class' => 'form-control', 'placeholder' => 'Password', 'required' => '', 'autofocus' => '']) !!} + {{ Form::password('password', ['class' => 'form-control', 'placeholder' => trans('auth::users.password'), 'required' => '', 'autofocus' => '']) }}
{!! $errors->first('password', ':message') !!}
{{-- PASSWORD CONFIRMATION --}}
-
- {!! Form::label('password_confirmation', 'Password Confirmation', ['class' => 'control-label sr-only']) !!} +
+ {{ Form::label('password_confirmation', trans('auth::users.email'), ['class' => 'control-label sr-only']) }}
- {!! Form::password('password_confirmation', ['class' => 'form-control', 'placeholder' => 'Password confirmation', 'required' => '', 'autofocus' => '']) !!} + {{ Form::password('password_confirmation', ['class' => 'form-control', 'placeholder' => trans('auth::users.password_confirmation'), 'required' => '', 'autofocus' => '']) }}
{!! $errors->first('password_confirmation', ':message') !!}
@@ -58,11 +61,11 @@ {{-- FIRST NAME --}}
-
- {!! Form::label('first_name', 'First Name', ['class' => 'control-label sr-only']) !!} +
+ {{ Form::label('first_name', trans('auth::users.first_name'), ['class' => 'control-label sr-only']) }}
- {!! Form::text('first_name', old('first_name'), ['class' => 'form-control', 'placeholder' => 'First Name', 'required' => '', 'autofocus' => '']) !!} + {{ Form::text('first_name', old('first_name'), ['class' => 'form-control', 'placeholder' => trans('auth::users.first_name'), 'required' => '', 'autofocus' => '']) }}
{!! $errors->first('first_name', ':message') !!}
@@ -70,22 +73,24 @@ {{-- LAST NAME --}}
-
- {!! Form::label('last_name', 'Last Name', ['class' => 'control-label sr-only']) !!} +
+ {{ Form::label('last_name', trans('auth::users.last_name'), ['class' => 'control-label sr-only']) }}
- {!! Form::text('last_name', old('last_name'), ['class' => 'form-control', 'placeholder' => 'Last Name', 'required' => '', 'autofocus' => '']) !!} + {{ Form::text('last_name', old('last_name'), ['class' => 'form-control', 'placeholder' => trans('auth::users.last_name'), 'required' => '', 'autofocus' => '']) }}
{!! $errors->first('last_name', ':message') !!}
- {!! Form::submit('Sign up', ['class' => 'btn btn-lg btn-success btn-block']) !!} - {!! Form::close() !!} + {{ Form::button(trans('auth::register.submit'), ['type' => 'submit', 'class' => 'btn btn-lg btn-success btn-block']) }} + {{ Form::close() }} -
- {!! link_to_route('auth::login.get', 'Already have an account ? Sign in', [], ['class' => 'btn btn-primary btn-block']) !!} -
+ @if ($hasLoginForm) +
+ {{ link_to_route('auth::login.get', trans('auth::register.links.login'), [], ['class' => 'btn btn-primary btn-block']) }} +
+ @endif
@endsection diff --git a/resources/views/public/reset.blade.php b/resources/views/public/reset.blade.php index 14d80f2..c4848fc 100644 --- a/resources/views/public/reset.blade.php +++ b/resources/views/public/reset.blade.php @@ -1,30 +1,38 @@ @extends('auth::public._template.master') + @section('content')
- {!! Form::open(['route' => 'auth::password.email.post', 'method' => 'POST', 'class' => 'form-auth form-reset-pass']) !!} -

Have you forgotten your password?

+ {{ Form::open(['route' => 'auth::password.email.post', 'method' => 'POST', 'class' => 'form-auth form-reset-pass']) }} +

{{ trans('auth::reset.heading') }}

{{-- EMAIL --}} -
- {!! Form::label('email', 'Email address', ['class' => 'control-label sr-only']) !!} +
+ {{ Form::label('email', trans('auth::users.email'), ['class' => 'control-label sr-only']) }}
- {!! Form::email('email', old('email'), ['class' => 'form-control', 'placeholder' => 'Email address', 'required' => '', 'autofocus' => '']) !!} + {{ Form::email('email', old('email'), ['class' => 'form-control', 'placeholder' => trans('auth::users.email'), 'required' => '', 'autofocus' => '']) }}
{!! $errors->first('email', ':message') !!}
- {!! Form::submit('Send Password Reset Link', ['class' => 'btn btn-lg btn-success btn-block']) !!} - {!! Form::close() !!} + {{ Form::submit(trans('auth::reset.submit'), ['class' => 'btn btn-lg btn-success btn-block']) }} + {{ Form::close() }} + @if ($hasLoginForm || $hasRegisterForm)
- {!! link_to_route('auth::login.get', 'You\'ve remembered your password? Sign in', [], ['class' => 'btn btn-info btn-block']) !!} - @if (config('arcanesoft.auth.authentication.register.enabled', true)) - {!! link_to_route('auth::register.get', 'Don\'t have an account? Sign up', [], ['class' => 'btn btn-primary btn-block']) !!} + @if ($hasLoginForm) + {!! link_to_route('auth::login.get', trans('auth::reset.links.login'), [], ['class' => 'btn btn-info btn-block']) !!} + @endif + @if ($hasRegisterForm) + {!! link_to_route('auth::register.get', trans('auth::reset.links.register'), [], ['class' => 'btn btn-primary btn-block']) !!} @endif
+ @endif
@endsection