Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/resources/views/admin/users/new.blade.php
7461 views
1
@extends('layouts.admin')
2
3
@section('title')
4
Create User
5
@endsection
6
7
@section('content-header')
8
<h1>Create User<small>Add a new user to the system.</small></h1>
9
<ol class="breadcrumb">
10
<li><a href="{{ route('admin.index') }}">Admin</a></li>
11
<li><a href="{{ route('admin.users') }}">Users</a></li>
12
<li class="active">Create</li>
13
</ol>
14
@endsection
15
16
@section('content')
17
<div class="row">
18
<form method="post">
19
<div class="col-md-6">
20
<div class="box box-primary">
21
<div class="box-header with-border">
22
<h3 class="box-title">Identity</h3>
23
</div>
24
<div class="box-body">
25
<div class="form-group">
26
<label for="email" class="control-label">Email</label>
27
<div>
28
<input type="text" autocomplete="off" name="email" value="{{ old('email') }}" class="form-control" />
29
</div>
30
</div>
31
<div class="form-group">
32
<label for="username" class="control-label">Username</label>
33
<div>
34
<input type="text" autocomplete="off" name="username" value="{{ old('username') }}" class="form-control" />
35
</div>
36
</div>
37
<div class="form-group">
38
<label for="name_first" class="control-label">Client First Name</label>
39
<div>
40
<input type="text" autocomplete="off" name="name_first" value="{{ old('name_first') }}" class="form-control" />
41
</div>
42
</div>
43
<div class="form-group">
44
<label for="name_last" class="control-label">Client Last Name</label>
45
<div>
46
<input type="text" autocomplete="off" name="name_last" value="{{ old('name_last') }}" class="form-control" />
47
</div>
48
</div>
49
<div class="form-group">
50
<label class="control-label">Default Language</label>
51
<div>
52
<select name="language" class="form-control">
53
@foreach($languages as $key => $value)
54
<option value="{{ $key }}" @if(config('app.locale') === $key) selected @endif>{{ $value }}</option>
55
@endforeach
56
</select>
57
<p class="text-muted"><small>The default language to use when rendering the Panel for this user.</small></p>
58
</div>
59
</div>
60
</div>
61
<div class="box-footer">
62
{!! csrf_field() !!}
63
<input type="submit" value="Create User" class="btn btn-success btn-sm">
64
</div>
65
</div>
66
</div>
67
<div class="col-md-6">
68
<div class="box">
69
<div class="box-header with-border">
70
<h3 class="box-title">Permissions</h3>
71
</div>
72
<div class="box-body">
73
<div class="form-group col-md-12">
74
<label for="root_admin" class="control-label">Administrator</label>
75
<div>
76
<select name="root_admin" class="form-control">
77
<option value="0">@lang('strings.no')</option>
78
<option value="1">@lang('strings.yes')</option>
79
</select>
80
<p class="text-muted"><small>Setting this to 'Yes' gives a user full administrative access.</small></p>
81
</div>
82
</div>
83
</div>
84
</div>
85
</div>
86
<div class="col-md-6">
87
<div class="box">
88
<div class="box-header with-border">
89
<h3 class="box-title">Password</h3>
90
</div>
91
<div class="box-body">
92
<div class="alert alert-info">
93
<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>
94
</div>
95
<div id="gen_pass" class=" alert alert-success" style="display:none;margin-bottom: 10px;"></div>
96
<div class="form-group">
97
<label for="pass" class="control-label">Password</label>
98
<div>
99
<input type="password" name="password" class="form-control" />
100
</div>
101
</div>
102
</div>
103
</div>
104
</div>
105
</form>
106
</div>
107
@endsection
108
109
@section('footer-scripts')
110
@parent
111
<script>$("#gen_pass_bttn").click(function (event) {
112
event.preventDefault();
113
$.ajax({
114
type: "GET",
115
url: "/password-gen/12",
116
headers: {
117
'X-CSRF-TOKEN': '{{ csrf_token() }}'
118
},
119
success: function(data) {
120
$("#gen_pass").html('<strong>Generated Password:</strong> ' + data).slideDown();
121
$('input[name="password"], input[name="password_confirmation"]').val(data);
122
return false;
123
}
124
});
125
return false;
126
});
127
</script>
128
@endsection
129
130