Skip to content

Commit c9b23b5

Browse files
committed
bootstrap 4
1 parent 887cb61 commit c9b23b5

File tree

7 files changed

+415
-194
lines changed

7 files changed

+415
-194
lines changed

config/usersmanagement.php

-1
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,4 @@
2727
'enableBootstrapPopperJsCdn' => true,
2828
'bootstrapPopperJsCdn' => 'https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js',
2929

30-
3130
];

resources/lang/en/forms.php

+8-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262

6363
'create_user_label_role' => 'User Role',
6464
'create_user_ph_role' => 'Select User Role',
65-
'create_user_icon_role' => 'fa-shield',
65+
'create_user_icon_role' => 'fa fa-fw fa-shield',
6666

6767
'create_user_button_text' => 'Create New User',
6868

@@ -86,4 +86,11 @@
8686
'username-icon' => 'fa-user',
8787
'useremail-icon' => 'fa-envelope-o',
8888

89+
'change-pw' => 'Change Password',
90+
'cancel' => 'Cancel',
91+
'save-changes' => '<i class="fa fa-fw fa-save" aria-hidden="true"></i> Save Changes',
92+
93+
// Search Users Form
94+
'search-users-ph' => 'Search Users',
95+
8996
];
+23-16
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
1-
<div class="modal fade modal-success modal-save" id="confirmSave" role="dialog" aria-labelledby="confirmSaveLabel" aria-hidden="true">
2-
<div class="modal-dialog">
3-
<div class="modal-content">
4-
<div class="modal-header">
5-
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
6-
<h4 class="modal-title">{{ Lang::get('modals.confirm_modal_title_text') }} </h4>
7-
</div>
8-
<div class="modal-body">
9-
<p>{{ Lang::get('modals.confirm_modal_title_text') }} </p>
10-
</div>
11-
<div class="modal-footer">
12-
{!! Form::button('<i class="fa fa-fw '.Lang::get('modals.confirm_modal_button_cancel_icon').'" aria-hidden="true"></i> ' . Lang::get('modals.confirm_modal_button_cancel_text'), array('class' => 'btn btn-outline pull-left btn-flat', 'type' => 'button', 'data-dismiss' => 'modal' )) !!}
13-
{!! Form::button('<i class="fa fa-fw '.Lang::get('modals.confirm_modal_button_save_icon').'" aria-hidden="true"></i> ' . Lang::get('modals.confirm_modal_button_save_text'), array('class' => 'btn btn-success pull-right btn-flat', 'type' => 'button', 'id' => 'confirm' )) !!}
14-
</div>
1+
<div class="modal fade modal-success modal-save" id="confirmSave" role="dialog" aria-labelledby="confirmSaveLabel" aria-hidden="true" tabindex="-1">
2+
<div class="modal-dialog" role="document">
3+
<div class="modal-content">
4+
<div class="modal-header">
5+
<h5 class="modal-title">
6+
@lang('modals.edit_user__modal_text_confirm_title')
7+
</h5>
8+
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
9+
<span aria-hidden="true">&times;</span>
10+
<span class="sr-only">close</span>
11+
</button>
12+
</div>
13+
<div class="modal-body">
14+
<p>
15+
@lang('modals.confirm_modal_title_text')
16+
</p>
17+
</div>
18+
<div class="modal-footer">
19+
{!! Form::button('<i class="fa fa-fw '.trans('modals.confirm_modal_button_cancel_icon').'" aria-hidden="true"></i> ' . trans('modals.confirm_modal_button_cancel_text'), array('class' => 'btn btn-outline pull-left btn-flat', 'type' => 'button', 'data-dismiss' => 'modal' )) !!}
20+
{!! Form::button('<i class="fa fa-fw '.trans('modals.confirm_modal_button_save_icon').'" aria-hidden="true"></i> ' . trans('modals.confirm_modal_button_save_text'), array('class' => 'btn btn-success pull-right btn-flat', 'type' => 'button', 'id' => 'confirm' )) !!}
21+
</div>
22+
</div>
1523
</div>
16-
</div>
17-
</div>
24+
</div>

resources/views/usersmanagement/create-user.blade.php

+176-14
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,186 @@
11
@extends('layouts.app')
22

33
@section('template_title')
4-
Create New User
4+
@lang('usersmanagement.create-new-user')
55
@endsection
66

77
@section('template_fastload_css')
88
@endsection
99

1010
@section('content')
1111

12-
<div class="container">
13-
<div class="row">
14-
<div class="col-md-10 offset-md-1">
15-
<div class="card card-default">
16-
<div class="card-header">
12+
<div class="container">
13+
<div class="row">
14+
<div class="col-lg-10 offset-lg-1">
15+
<div class="card">
16+
<div class="card-header">
17+
<div style="display: flex; justify-content: space-between; align-items: center;">
18+
@lang('usersmanagement.create-new-user')
19+
<div class="pull-right">
20+
<a href="{{ route('users') }}" class="btn btn-light btn-sm float-right" data-toggle="tooltip" data-placement="left" title="@lang('usersmanagement.tooltips.back-users')">
21+
<i class="fa fa-fw fa-reply-all" aria-hidden="true"></i>
22+
@lang('usersmanagement.buttons.back-to-users')
23+
</a>
24+
</div>
25+
</div>
26+
</div>
1727

18-
Create New User
1928

20-
<a href="/users" class="btn btn-info btn-xs pull-right">
21-
<i class="fa fa-fw fa-mail-reply" aria-hidden="true"></i>
22-
Back <span class="hidden-xs">to</span><span class="hidden-xs"> Users</span>
23-
</a>
29+
<div class="card-body">
30+
{!! Form::open(array('route' => 'users.store', 'method' => 'POST', 'role' => 'form', 'class' => 'needs-validation')) !!}
31+
32+
{!! csrf_field() !!}
33+
34+
<div class="form-group has-feedback row {{ $errors->has('email') ? ' has-error ' : '' }}">
35+
{!! Form::label('email', trans('forms.create_user_label_email'), array('class' => 'col-md-3 control-label')); !!}
36+
<div class="col-md-9">
37+
<div class="input-group">
38+
{!! Form::text('email', NULL, array('id' => 'email', 'class' => 'form-control', 'placeholder' => trans('forms.create_user_ph_email'))) !!}
39+
<div class="input-group-append">
40+
<label for="email" class="input-group-text">
41+
<i class="fa fa-fw {{ trans('forms.create_user_icon_email') }}" aria-hidden="true"></i>
42+
</label>
43+
</div>
44+
</div>
45+
@if ($errors->has('email'))
46+
<span class="help-block">
47+
<strong>{{ $errors->first('email') }}</strong>
48+
</span>
49+
@endif
50+
</div>
51+
</div>
52+
53+
<div class="form-group has-feedback row {{ $errors->has('name') ? ' has-error ' : '' }}">
54+
{!! Form::label('name', trans('forms.create_user_label_username'), array('class' => 'col-md-3 control-label')); !!}
55+
<div class="col-md-9">
56+
<div class="input-group">
57+
{!! Form::text('name', NULL, array('id' => 'name', 'class' => 'form-control', 'placeholder' => trans('forms.create_user_ph_username'))) !!}
58+
<div class="input-group-append">
59+
<label class="input-group-text" for="name">
60+
<i class="fa fa-fw {{ trans('forms.create_user_icon_username') }}" aria-hidden="true"></i>
61+
</label>
62+
</div>
63+
</div>
64+
@if ($errors->has('name'))
65+
<span class="help-block">
66+
<strong>{{ $errors->first('name') }}</strong>
67+
</span>
68+
@endif
69+
</div>
70+
</div>
71+
72+
<div class="form-group has-feedback row {{ $errors->has('first_name') ? ' has-error ' : '' }}">
73+
{!! Form::label('first_name', trans('forms.create_user_label_firstname'), array('class' => 'col-md-3 control-label')); !!}
74+
<div class="col-md-9">
75+
<div class="input-group">
76+
{!! Form::text('first_name', NULL, array('id' => 'first_name', 'class' => 'form-control', 'placeholder' => trans('forms.create_user_ph_firstname'))) !!}
77+
<div class="input-group-append">
78+
<label class="input-group-text" for="first_name">
79+
<i class="fa fa-fw {{ trans('forms.create_user_icon_firstname') }}" aria-hidden="true"></i>
80+
</label>
81+
</div>
82+
</div>
83+
@if ($errors->has('first_name'))
84+
<span class="help-block">
85+
<strong>{{ $errors->first('first_name') }}</strong>
86+
</span>
87+
@endif
88+
</div>
89+
</div>
90+
91+
<div class="form-group has-feedback row {{ $errors->has('last_name') ? ' has-error ' : '' }}">
92+
{!! Form::label('last_name', trans('forms.create_user_label_lastname'), array('class' => 'col-md-3 control-label')); !!}
93+
<div class="col-md-9">
94+
<div class="input-group">
95+
{!! Form::text('last_name', NULL, array('id' => 'last_name', 'class' => 'form-control', 'placeholder' => trans('forms.create_user_ph_lastname'))) !!}
96+
<div class="input-group-append">
97+
<label class="input-group-text" for="last_name">
98+
<i class="fa fa-fw {{ trans('forms.create_user_icon_lastname') }}" aria-hidden="true"></i>
99+
</label>
100+
</div>
101+
</div>
102+
@if ($errors->has('last_name'))
103+
<span class="help-block">
104+
<strong>{{ $errors->first('last_name') }}</strong>
105+
</span>
106+
@endif
107+
</div>
108+
</div>
109+
110+
<div class="form-group has-feedback row {{ $errors->has('role') ? ' has-error ' : '' }}">
111+
{!! Form::label('role', trans('forms.create_user_label_role'), array('class' => 'col-md-3 control-label')); !!}
112+
<div class="col-md-9">
113+
<div class="input-group">
114+
<select class="custom-select form-control" name="role" id="role">
115+
<option value="">{{ trans('forms.create_user_ph_role') }}</option>
116+
@if ($roles)
117+
@foreach($roles as $role)
118+
<option value="{{ $role->id }}">{{ $role->name }}</option>
119+
@endforeach
120+
@endif
121+
</select>
122+
<div class="input-group-append">
123+
<label class="input-group-text" for="role">
124+
<i class="{{ trans('forms.create_user_icon_role') }}" aria-hidden="true"></i>
125+
</label>
126+
</div>
127+
</div>
128+
@if ($errors->has('role'))
129+
<span class="help-block">
130+
<strong>{{ $errors->first('role') }}</strong>
131+
</span>
132+
@endif
133+
</div>
134+
</div>
135+
136+
<div class="form-group has-feedback row {{ $errors->has('password') ? ' has-error ' : '' }}">
137+
{!! Form::label('password', trans('forms.create_user_label_password'), array('class' => 'col-md-3 control-label')); !!}
138+
<div class="col-md-9">
139+
<div class="input-group">
140+
{!! Form::password('password', array('id' => 'password', 'class' => 'form-control ', 'placeholder' => trans('forms.create_user_ph_password'))) !!}
141+
<div class="input-group-append">
142+
<label class="input-group-text" for="password">
143+
<i class="fa fa-fw {{ trans('forms.create_user_icon_password') }}" aria-hidden="true"></i>
144+
</label>
145+
</div>
146+
</div>
147+
@if ($errors->has('password'))
148+
<span class="help-block">
149+
<strong>{{ $errors->first('password') }}</strong>
150+
</span>
151+
@endif
152+
</div>
153+
</div>
154+
<div class="form-group has-feedback row {{ $errors->has('password_confirmation') ? ' has-error ' : '' }}">
155+
{!! Form::label('password_confirmation', trans('forms.create_user_label_pw_confirmation'), array('class' => 'col-md-3 control-label')); !!}
156+
<div class="col-md-9">
157+
<div class="input-group">
158+
{!! Form::password('password_confirmation', array('id' => 'password_confirmation', 'class' => 'form-control', 'placeholder' => trans('forms.create_user_ph_pw_confirmation'))) !!}
159+
<div class="input-group-append">
160+
<label class="input-group-text" for="password_confirmation">
161+
<i class="fa fa-fw {{ trans('forms.create_user_icon_pw_confirmation') }}" aria-hidden="true"></i>
162+
</label>
163+
</div>
164+
</div>
165+
@if ($errors->has('password_confirmation'))
166+
<span class="help-block">
167+
<strong>{{ $errors->first('password_confirmation') }}</strong>
168+
</span>
169+
@endif
170+
</div>
171+
</div>
172+
{!! Form::button(trans('forms.create_user_button_text'), array('class' => 'btn btn-success margin-bottom-1 mb-1 float-right','type' => 'submit' )) !!}
173+
{!! Form::close() !!}
174+
</div>
175+
176+
177+
178+
179+
180+
181+
182+
{{--
24183
25-
</div>
26184
<div class="card-body">
27185
28186
{!! Form::open(array('action' => 'UsersManagementController@store')) !!}
@@ -144,10 +302,14 @@
144302
{!! Form::close() !!}
145303
146304
</div>
305+
306+
--}}
307+
308+
309+
</div>
310+
</div>
147311
</div>
148-
</div>
149312
</div>
150-
</div>
151313

152314
@endsection
153315

0 commit comments

Comments
 (0)