From 160e8eff8f652f2bb10a86670fb1a01b82c7909c Mon Sep 17 00:00:00 2001 From: batuhanbas Date: Sat, 28 Dec 2019 18:21:31 +0300 Subject: [PATCH] reset page converted to vue form --- public/css/custom.css | 4 +- resources/assets/js/views/auth/reset.js | 5 +- resources/views/auth/reset/create.blade.php | 51 +++++++------------ .../views/partials/form/text_group.blade.php | 2 +- routes/guest.php | 2 +- 5 files changed, 26 insertions(+), 38 deletions(-) diff --git a/public/css/custom.css b/public/css/custom.css index 80f3e1c55..3cf31691a 100644 --- a/public/css/custom.css +++ b/public/css/custom.css @@ -133,12 +133,14 @@ } /*--------Carousel Arrows Finish--------*/ + /*--------Credit Card--------*/ .card-input__input:hover, .card-input__input:focus { border-color: #55588b !important; } /*--------Credit Card Finish--------*/ + /*--------General Button Focus--------*/ button:focus { @@ -937,7 +939,7 @@ table .align-items-center td span.badge { width: 100%; height: 40px; font-size: .875rem; - padding: .425rem; + padding: .425rem 1.25rem; margin-top: 16px; } diff --git a/resources/assets/js/views/auth/reset.js b/resources/assets/js/views/auth/reset.js index e399770b0..014746c84 100644 --- a/resources/assets/js/views/auth/reset.js +++ b/resources/assets/js/views/auth/reset.js @@ -11,16 +11,17 @@ import Vue from 'vue'; import Global from './../../mixins/global'; import Form from './../../plugins/form'; -import BulkAction from './../../plugins/bulk-action'; const app = new Vue({ el: '#app', + mixins: [ Global ], + data: function () { return { - form: new Form('item') + form: new Form('reset') } } }); diff --git a/resources/views/auth/reset/create.blade.php b/resources/views/auth/reset/create.blade.php index 5aa6b3606..8e7124ad1 100644 --- a/resources/views/auth/reset/create.blade.php +++ b/resources/views/auth/reset/create.blade.php @@ -1,54 +1,39 @@ @extends('layouts.auth') -@section('title', trans('auth.reset_password')) @section('message', trans('auth.reset_password')) @section('content') -
- {{ csrf_field() }} + {!! Form::open([ + 'route' => 'reset.store', + 'id' => 'reset', + '@submit.prevent' => 'onSubmit', + '@keydown' => 'form.errors.clear($event.target.name)', + 'files' => true, + 'role' => 'form', + 'class' => 'form-loading-button', + 'novalidate' => true + ]) !!} @stack('email_input_start') -
- - - @if ($errors->has('email')) - - {{ $errors->first('email') }} - - @endif -
+ {{ Form::emailGroup('email', false, 'envelope', ['placeholder' => trans('general.email')], null, 'has-feedback', 'input-group-alternative') }} @stack('email_input_end') @stack('password_input_start') -
- - - @if ($errors->has('password')) - - {{ $errors->first('password') }} - - @endif -
+ {{ Form::passwordGroup('password', false, 'unlock-alt', ['placeholder' => trans('auth.password.new')], 'has-feedback', 'input-group-alternative') }} @stack('password_input_end') @stack('password_confirmation_input_start') -
- - - @if ($errors->has('password_confirmation')) - - {{ $errors->first('password_confirmation') }} - - @endif -
+ {{ Form::passwordGroup('password_confirmation', false, 'unlock-alt', ['placeholder' => trans('auth.password.new_confirm')], 'has-feedback', 'input-group-alternative') }} @stack('password_confirmation_input_end')
-
- +
+ {!! Form::button( + '
' . trans('auth.reset') . '', + [':disabled' => 'form.loading', 'type' => 'submit', 'class' => 'btn btn-success header-button-top float-right', 'data-loading-text' => trans('general.loading')]) !!}
- + {!! Form::close() !!} @endsection diff --git a/resources/views/partials/form/text_group.blade.php b/resources/views/partials/form/text_group.blade.php index 7dd052a44..affca8cb1 100644 --- a/resources/views/partials/form/text_group.blade.php +++ b/resources/views/partials/form/text_group.blade.php @@ -3,7 +3,7 @@
- {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} + {!! Form::label($name, $text, ['class' => 'form-control-label']) !!}
diff --git a/routes/guest.php b/routes/guest.php index 18708c02f..998dc46df 100644 --- a/routes/guest.php +++ b/routes/guest.php @@ -9,5 +9,5 @@ Route::group(['prefix' => 'auth'], function () { //Route::get('reset', 'Auth\Reset@create'); Route::get('reset/{token}', 'Auth\Reset@create')->name('reset'); - Route::post('reset', 'Auth\Reset@store'); + Route::post('reset', 'Auth\Reset@store')->name('reset.store'); });