Translations and nicer formatting for login/password reset

This commit is contained in:
snipe 2016-05-20 00:25:45 -07:00
parent 6724489be2
commit 6b5d0a5abf
6 changed files with 122 additions and 81 deletions

View file

@ -0,0 +1,12 @@
<?php
return [
'send_password_link' => 'Send Password Reset Link',
'email_reset_password' => 'Email Password Reset',
'reset_password' => 'Reset Password',
'login' => 'Login',
'login_prompt' => 'Please Login',
'forgot_password' => 'I forgot my password',
'remember_me' => 'Remember Me',
];

View file

@ -0,0 +1,7 @@
<?php
return [
'sent' => 'Your password link has been sent!',
'user' => 'That user does not exist or does not have an email address associated',
];

View file

@ -13,7 +13,7 @@
<div class="box login-box">
<div class="box-header">
<h3 class="box-title"> Please Login</h3>
<h3 class="box-title"> {{ trans('auth/general.login_prompt') }}</h3>
</div>
@ -30,16 +30,16 @@
<fieldset>
<div class="form-group{{ $errors->has('username') ? ' has-error' : '' }}">
<input class="form-control" placeholder="Username" name="username" type="text" autofocus>
<input class="form-control" placeholder="{{ trans('admin/users/table.username') }}" name="username" type="text" autofocus>
{!! $errors->first('username', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
<div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}">
<input class="form-control" placeholder="Password" name="password" type="password">
<input class="form-control" placeholder="{{ trans('admin/users/table.password') }}" name="password" type="password">
{!! $errors->first('password', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
<div class="checkbox">
<label>
<input name="remember" type="checkbox" value="Remember Me">Remember Me
<input name="remember" type="checkbox" value="Remember Me">{{ trans('auth/general.remember_me') }}
</label>
</div>
</fieldset>
@ -48,10 +48,10 @@
</div>
</div>
<div class="box-footer">
<button class="btn btn-lg btn-primary btn-block">Login</button>
<button class="btn btn-lg btn-primary btn-block">{{ trans('auth/general.login') }}</button>
</div>
<div class="col-md-12 col-sm-12 col-xs-12 text-right" style="padding-top: 10px;">
<a href="../password/reset">I forgot my password</a>
<a href="../password/reset">{{ trans('auth/general.forgot_password') }}</a>
</div>
</div>
</div>

View file

@ -1,52 +1,54 @@
@extends('layouts/basic')
<!-- Main Content -->
@section('content')
{{-- Page content --}}
@section('content')
<form class="form" role="form" method="POST" action="{{ url('/password/email') }}">
{!! csrf_field() !!}
<div class="container">
<div class="row">
<div class="col-md-5 col-md-offset-4">
<div class="login-panel panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Reset Password</h3>
</div>
<div class="panel-body">
@if (session('status'))
<div class="alert alert-success">
{{ session('status') }}
<div class="col-md-4 col-md-offset-4">
<div class="box login-box">
<div class="box-header">
<h3 class="box-title"> {{ trans('auth/general.send_password_link') }}</h3>
</div>
@endif
<form class="form-horizontal" role="form" method="POST" action="{{ url('/password/email') }}">
{!! csrf_field() !!}
<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
<label class="col-md-4 control-label">{{ trans('admin/users/table.email') }}</label>
<div class="login-box-body">
<div class="row">
<!-- Notifications -->
@include('notifications')
<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
<div class="col-md-12">
<input type="email" class="form-control" name="email" value="{{ old('email') }}" placeholder="{{ trans('admin/users/table.email') }}">
{!! $errors->first('email', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
</div>
<div class="col-md-6">
<input type="email" class="form-control" name="email" value="{{ old('email') }}">
@if ($errors->has('email'))
<span class="help-block">
<strong>{!! $errors->first('email') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group">
<div class="col-md-6 col-md-offset-4">
<button type="submit" class="btn btn-primary">
Send Password Reset Link
<div class="box-footer">
<button type="submit" class="btn btn-lg btn-primary btn-block">
{{ trans('auth/general.email_reset_password') }}
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
</form>
@stop

View file

@ -1,72 +1,79 @@
@extends('layouts/basic')
{{-- Page content --}}
@section('content')
<div class="container">
<div class="row">
<div class="col-md-5 col-md-offset-4">
<div class="login-panel panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Reset Password</h3>
</div>
<div class="panel-body">
<form class="form-horizontal" role="form" method="POST" action="{{ url('/password/reset') }}">
{!! csrf_field() !!}
<input type="hidden" name="token" value="{{ $token }}">
<form class="form-horizontal" role="form" method="POST" action="{{ url('/password/reset') }}">
{!! csrf_field() !!}
<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
<label class="col-md-4 control-label">E-Mail Address</label>
<div class="container">
<div class="row">
<div class="col-md-6">
<input type="email" class="form-control" name="email" value="{{ $email or old('email') }}">
@if ($errors->has('email'))
<span class="help-block">
<strong>{!! $errors->first('email') }}</strong>
</span>
@endif
<div class="col-md-4 col-md-offset-4">
<div class="box login-box" style="width: 100%">
<div class="box-header">
<h3 class="box-title"> {{ trans('auth/general.reset_password') }}</h3>
</div>
<div class="login-box-body">
<div class="row">
<!-- Notifications -->
@include('notifications')
<input type="hidden" name="token" value="{{ $token }}">
<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
<label class="col-md-4 control-label">{{ trans('admin/users/table.email') }}</label>
<div class="col-md-6">
<input type="email" class="form-control" name="email" value="{{ $email or old('email') }}">
{!! $errors->first('email', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
</div>
<div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}">
<label class="col-md-4 control-label">Password</label>
<label class="col-md-4 control-label">{{ trans('admin/users/table.password') }}</label>
<div class="col-md-6">
<input type="password" class="form-control" name="password">
@if ($errors->has('password'))
<span class="help-block">
<strong>{!! $errors->first('password') }}</strong>
</span>
@endif
{!! $errors->first('password', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
</div>
<div class="form-group{{ $errors->has('password_confirmation') ? ' has-error' : '' }}">
<label class="col-md-4 control-label">Confirm Password</label>
<label class="col-md-4 control-label">{{ trans('admin/users/table.password_confirm') }}</label>
<div class="col-md-6">
<input type="password" class="form-control" name="password_confirmation">
{!! $errors->first('password_confirmation', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
@if ($errors->has('password_confirmation'))
<span class="help-block">
<strong>{!! $errors->first('password_confirmation') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group">
<div class="col-md-6 col-md-offset-4">
<button type="submit" class="btn btn-primary">
Reset Password
</button>
</div>
</div>
</form>
<div class="box-footer">
<button type="submit" class="btn btn-lg btn-primary btn-block">
{{ trans('auth/general.reset_password') }}
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
</form>
@stop

View file

@ -10,6 +10,19 @@
@endif
@if ($message = Session::get('status'))
<div class="col-md-12">
<div class="alert alert-success">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<i class="fa fa-check faa-pulse animated"></i>
<strong>Success: </strong>
{{ $message }}
</div>
</div>
@endif
@if ($message = Session::get('success'))
<div class="col-md-12">
<div class="alert alert-success">