Skip to content

Commit 23dfcbd

Browse files
committed
retheme admin create user page
1 parent d181182 commit 23dfcbd

File tree

1 file changed

+144
-0
lines changed

1 file changed

+144
-0
lines changed
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
{{-- Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com> --}}
2+
3+
{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}}
4+
{{-- of this software and associated documentation files (the "Software"), to deal --}}
5+
{{-- in the Software without restriction, including without limitation the rights --}}
6+
{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}}
7+
{{-- copies of the Software, and to permit persons to whom the Software is --}}
8+
{{-- furnished to do so, subject to the following conditions: --}}
9+
10+
{{-- The above copyright notice and this permission notice shall be included in all --}}
11+
{{-- copies or substantial portions of the Software. --}}
12+
13+
{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}}
14+
{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}}
15+
{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}}
16+
{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}}
17+
{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}}
18+
{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}}
19+
{{-- SOFTWARE. --}}
20+
@extends('layouts.admin')
21+
22+
@section('title')
23+
Create User
24+
@endsection
25+
26+
@section('content-header')
27+
<h1>Create User<small>Add a new user to the system.</small></h1>
28+
<ol class="breadcrumb">
29+
<li><a href="{{ route('admin.index') }}">Admin</a></li>
30+
<li><a href="{{ route('admin.users') }}">Users</a></li>
31+
<li class="active">Create</li>
32+
</ol>
33+
@endsection
34+
35+
@section('content')
36+
<div class="row">
37+
<form method="post">
38+
<div class="col-xs-6">
39+
<div class="box box-primary">
40+
<div class="box-header with-border">
41+
<h3 class="box-title">Identity</h3>
42+
</div>
43+
<div class="box-body">
44+
<div class="row">
45+
<div class="form-group col-md-6">
46+
<label for="email" class="control-label">Email</label>
47+
<div>
48+
<input type="text" autocomplete="off" name="email" value="{{ old('email') }}" class="form-control" />
49+
</div>
50+
</div>
51+
<div class="form-group col-md-6">
52+
<label for="username" class="control-label">Username</label>
53+
<div>
54+
<input type="text" autocomplete="off" name="username" value="{{ old('username') }}" class="form-control" />
55+
</div>
56+
</div>
57+
</div>
58+
<div class="row">
59+
<div class="form-group col-md-6">
60+
<label for="name_first" class="control-label">Client First Name</label>
61+
<div>
62+
<input type="text" autocomplete="off" name="name_first" value="{{ old('name_first') }}" class="form-control" />
63+
</div>
64+
</div>
65+
<div class="form-group col-md-6">
66+
<label for="name_last" class="control-label">Client Last Name</label>
67+
<div>
68+
<input type="text" autocomplete="off" name="name_last" value="{{ old('name_last') }}" class="form-control" />
69+
</div>
70+
</div>
71+
72+
</div>
73+
</div>
74+
<div class="box-footer">
75+
{!! csrf_field() !!}
76+
<input type="submit" value="Create User" class="btn btn-success btn-sm">
77+
</div>
78+
</div>
79+
</div>
80+
<div class="col-xs-6">
81+
<div class="box">
82+
<div class="box-header with-border">
83+
<h3 class="box-title">Permissions</h3>
84+
</div>
85+
<div class="box-body">
86+
<div class="form-group col-md-12">
87+
<label for="root_admin" class="control-label">Administrator</label>
88+
<div>
89+
<select name="root_admin" class="form-control">
90+
<option value="0">{{ trans('strings.no') }}</option>
91+
<option value="1">{{ trans('strings.yes') }}</option>
92+
</select>
93+
<p class="text-muted"><small>Setting this to 'Yes' gives a user full administrative access.</small></p>
94+
</div>
95+
</div>
96+
</div>
97+
</div>
98+
</div>
99+
<div class="col-xs-6">
100+
<div class="box">
101+
<div class="box-header with-border">
102+
<h3 class="box-title">Password</h3>
103+
</div>
104+
<div class="box-body">
105+
<div class="alert alert-info">
106+
<p>Providing a user password is optional. New user emails prompt users to create a password the first time they login. If a password is provided here you will need to find a different method of providing it to the user.</p>
107+
</div>
108+
<div id="gen_pass" class=" alert alert-success" style="display:none;margin-bottom: 10px;"></div>
109+
<div class="form-group">
110+
<label for="pass" class="control-label">Password</label>
111+
<div>
112+
<input type="password" name="password" class="form-control" />
113+
</div>
114+
</div>
115+
<div class="form-group">
116+
<button class="btn btn-default btn-sm" id="gen_pass_bttn" type="button">Generate Password</button>
117+
</div>
118+
</div>
119+
</div>
120+
</div>
121+
</form>
122+
</div>
123+
@endsection
124+
125+
@section('footer-scripts')
126+
@parent
127+
<script>$("#gen_pass_bttn").click(function (event) {
128+
event.preventDefault();
129+
$.ajax({
130+
type: "GET",
131+
url: "/password-gen/12",
132+
headers: {
133+
'X-CSRF-TOKEN': '{{ csrf_token() }}'
134+
},
135+
success: function(data) {
136+
$("#gen_pass").html('<strong>Generated Password:</strong> ' + data).slideDown();
137+
$('input[name="password"], input[name="password_confirmation"]').val(data);
138+
return false;
139+
}
140+
});
141+
return false;
142+
});
143+
</script>
144+
@endsection

0 commit comments

Comments
 (0)