Commit 1f50584d authored by Christian Giupponi's avatar Christian Giupponi

Revert "Fix the bug that prevent user to login or register to the site"

This reverts commit 8445397d.
parent e4ad318b
...@@ -54,13 +54,3 @@ if (! function_exists('asgard_editor')) { ...@@ -54,13 +54,3 @@ if (! function_exists('asgard_editor')) {
return view('core::components.textarea-wrapper', compact('fieldName', 'labelName', 'content')); return view('core::components.textarea-wrapper', compact('fieldName', 'labelName', 'content'));
} }
} }
if (! function_exists('localize_route')) {
function localize_route($route, $locale = null)
{
$locale = $locale ? : app()->getLocale();
return str_replace(env('APP_URL'), rtrim(env('APP_URL'), '/') . '/' . $locale, route($route));
}
}
\ No newline at end of file
...@@ -13,8 +13,7 @@ ...@@ -13,8 +13,7 @@
<p class="login-box-msg">{{ trans('user::auth.sign in welcome message') }}</p> <p class="login-box-msg">{{ trans('user::auth.sign in welcome message') }}</p>
@include('partials.notifications') @include('partials.notifications')
<form method="POST" action="{{localize_route('login.post')}}" accept-charset="UTF-8"> {!! Form::open(['route' => 'login.post']) !!}
{{csrf_field()}}
<div class="form-group has-feedback {{ $errors->has('email') ? ' has-error' : '' }}"> <div class="form-group has-feedback {{ $errors->has('email') ? ' has-error' : '' }}">
<input type="email" class="form-control" autofocus <input type="email" class="form-control" autofocus
name="email" placeholder="{{ trans('user::auth.email') }}" value="{{ old('email')}}"> name="email" placeholder="{{ trans('user::auth.email') }}" value="{{ old('email')}}">
......
...@@ -11,9 +11,7 @@ ...@@ -11,9 +11,7 @@
<div class="register-box-body"> <div class="register-box-body">
<p class="login-box-msg">{{ trans('user::auth.register') }}</p> <p class="login-box-msg">{{ trans('user::auth.register') }}</p>
@include('partials.notifications') @include('partials.notifications')
{!! Form::open(['route' => 'register.post']) !!}
<form method="POST" action="{{localize_route('register.post')}}" accept-charset="UTF-8">
{{csrf_field()}}
<div class="form-group has-feedback {{ $errors->has('email') ? ' has-error has-feedback' : '' }}"> <div class="form-group has-feedback {{ $errors->has('email') ? ' has-error has-feedback' : '' }}">
<input type="email" name="email" class="form-control" autofocus <input type="email" name="email" class="form-control" autofocus
placeholder="{{ trans('user::auth.email') }}" value="{{ old('email') }}"> placeholder="{{ trans('user::auth.email') }}" value="{{ old('email') }}">
......
...@@ -13,8 +13,7 @@ ...@@ -13,8 +13,7 @@
<p class="login-box-msg">{{ trans('user::auth.to reset password complete this form') }}</p> <p class="login-box-msg">{{ trans('user::auth.to reset password complete this form') }}</p>
@include('partials.notifications') @include('partials.notifications')
<form method="POST" action="{{localize_route('reset.post')}}" accept-charset="UTF-8"> {!! Form::open(['route' => 'reset.post']) !!}
{{csrf_field()}}
<div class="form-group has-feedback {{ $errors->has('email') ? ' has-error' : '' }}"> <div class="form-group has-feedback {{ $errors->has('email') ? ' has-error' : '' }}">
<input type="email" class="form-control" autofocus <input type="email" class="form-control" autofocus
name="email" placeholder="{{ trans('user::auth.email') }}" value="{{ old('email')}}"> name="email" placeholder="{{ trans('user::auth.email') }}" value="{{ old('email')}}">
...@@ -29,7 +28,7 @@ ...@@ -29,7 +28,7 @@
</button> </button>
</div> </div>
</div> </div>
</form> {!! Form::close() !!}
<a href="{{ route('login') }}" class="text-center">{{ trans('user::auth.I remembered my password') }}</a> <a href="{{ route('login') }}" class="text-center">{{ trans('user::auth.I remembered my password') }}</a>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment