Merge pull request #1124 from prashant-webkul/development

Fixed issue #1080
This commit is contained in:
Jitendra Singh 2019-06-27 16:18:13 +05:30 committed by GitHub
commit 4feeffaf51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -12,7 +12,7 @@
@push('scripts')
<script type="text/x-template" id="cart-rule-form-template">
<form method="POST" action="{{ route('admin.cart-rule.store') }}" @submit.prevent="onSubmit">
<form method="POST" action="{{ route('admin.cart-rule.store') }}" @submit.prevent="onSubmit" autocomplete="off">
@csrf
<div class="page-header">
@ -68,7 +68,7 @@
<div class="control-group" :class="[errors.has('ends_till') ? 'has-error' : '']">
<label for="ends_till">{{ __('admin::app.promotion.general-info.ends-till') }}</label>
<input type="text" class="control" v-model="ends_till" name="ends_till" data-vv-as="&quot;{{ __('admin::app.promotion.general-info.ends-till') }}&quot;">
<input type="text" class="control" v-model="ends_till" v-validate="'after:starts_from'" name="ends_till" data-vv-as="&quot;{{ __('admin::app.promotion.general-info.ends-till') }}&quot;">
<span class="control-error" v-if="errors.has('ends_till')">@{{ errors.first('ends_till') }}</span>
</div>

View File

@ -19,6 +19,13 @@ class RedirectIfNotCustomer
{
if (! Auth::guard($guard)->check()) {
return redirect()->route('customer.session.index');
} else {
if (Auth::guard($guard)->user()->status == 0) {
Auth::guard($guard)->logout();
session()->flash('warning', trans('shop::app.customer.login-form.not-activated'));
return redirect()->route('customer.session.index');
}
}
return $next($request);