create user from customer page

This commit is contained in:
denisdulici 2017-11-27 12:44:50 +03:00
parent 3894872d33
commit 971a86abf4
7 changed files with 25 additions and 30 deletions

View File

@ -55,7 +55,7 @@ class Customers extends Controller
flash($message)->error();
return redirect()->back()->withInput($request->except('create_user'))->withErrors(
['email' => trans('customer.error.email')]
['email' => trans('customers.error.email')]
);
}
@ -129,7 +129,7 @@ class Customers extends Controller
flash($message)->error();
return redirect()->back()->withInput($request->except('create_user'))->withErrors(
['email' => trans('customer.error.email')]
['email' => trans('customers.error.email')]
);
}

4
public/css/app.css vendored
View File

@ -453,6 +453,10 @@ ul.add-new.nav.navbar-nav.pull-left {
overflow-x: visible;
}
.margin-top {
margin-top: 20px;
}
@media only screen and (max-width : 768px) {
.main-header .add-new.nav.navbar-nav i {
margin-top: 3px;

View File

@ -1,9 +0,0 @@
<?php
return [
'all' => 'All Customers',
'error' => [
'email' => 'The email has already been taken.'
]
];

View File

@ -0,0 +1,11 @@
<?php
return [
'allow_login' => 'Allow Login?',
'user_created' => 'User Created',
'error' => [
'email' => 'The email has already been taken.'
]
];

View File

@ -83,8 +83,6 @@ return [
'search' => 'Search',
'search_placeholder' => 'Type to search..',
'filter' => 'Filter',
'create_user' => 'Create User',
'created_user' => 'Created User',
'help' => 'Help',
'all' => 'All',
'all_type' => 'All :type',

View File

@ -24,18 +24,13 @@
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
<div class="form-group col-md-12">
{!! Form::label('create_user', trans('general.create_user'), ['class' => 'control-label']) !!}
<br/>
<div class="col-md-12">
{{ Form::checkbox('create_user', '1') }} &nbsp; {{ trans('general.create_user') }}
</div>
<div class="form-group col-md-12 margin-top">
<strong>{{ trans('customers.allow_login') }}</strong> &nbsp; {{ Form::checkbox('create_user', '1', null, ['id' => 'create_user']) }}
</div>
{{ Form::passwordGroup('password', trans('auth.password.current'), 'key', [], null, 'col-md-6 password hidden') }}
{{ Form::passwordGroup('password_confirmation', trans('auth.password.current_confirm'), 'key', [], null, 'col-md-6 password hidden') }}
</div>
<!-- /.box-body -->

View File

@ -28,16 +28,12 @@
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
<div class="form-group col-md-12">
{!! Form::label('create_user', trans('general.create_user'), ['class' => 'control-label']) !!}
<br/>
<div class="col-md-12">
@if ($customer->user_id)
{{ Form::checkbox('create_user', '1', 1, array('disabled')) }} &nbsp; {{ trans('general.created_user') }}
@else
{{ Form::checkbox('create_user', '1') }} &nbsp; {{ trans('general.create_user') }}
@endif
</div>
<div class="form-group col-md-12 margin-top">
@if ($customer->user_id)
<strong>{{ trans('customers.user_created') }}</strong> &nbsp; {{ Form::checkbox('create_user', '1', 1, ['id' => 'create_user', 'disabled' => 'disabled']) }}
@else
<strong>{{ trans('customers.allow_login') }}</strong> &nbsp; {{ Form::checkbox('create_user', '1', null, ['id' => 'create_user']) }}
@endif
</div>
{{ Form::passwordGroup('password', trans('auth.password.current'), 'key', [], null, 'col-md-6 password hidden') }}