This repository was archived by the owner on Dec 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcreate.php
More file actions
89 lines (74 loc) · 5.41 KB
/
create.php
File metadata and controls
89 lines (74 loc) · 5.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-4">
<h1><?php echo $title; ?></h1>
</div>
</div>
<div class="row">
<div class="container">
<div class="row">
<div class="col-md-12">
<?php if(isset($response)) { printResponse($response); } ?>
<form action="/user/create" method="post" enctype="multipart/form-data">
<div class="row">
<div class="col-md-6">
<div class="form-group <?php if(isset($error) && isset($error['name']) && !empty($error['name'])) { echo "has-error"; } ?>">
<label for="name">User Name:</label>
<input type="text" name="name" id="name" class="form-control">
<?php if(isset($error) && isset($error['name']) && !empty($error['name'])) { echo '<span class="help-block text-danger">' . $error['name'] . '</span>'; } ?>
</div>
<div class="form-group <?php if(isset($error) && isset($error['email']) && !empty($error['email'])) { echo "has-error"; } ?>">
<label for="email">Email:</label>
<input type="email" name="email" id="email" class="form-control">
<?php if(isset($error) && isset($error['email']) && !empty($error['email'])) { echo '<span class="help-block text-danger">' . $error['email'] . '</span>'; } ?>
</div>
<div class="form-group <?php if(isset($error) && isset($error['role']) && !empty($error['role'])) { echo "has-error"; } ?>">
<label for="role">User Role:</label>
<select id="role" name="role" class="form-control selectpicker">
<option></option>
<?php foreach($roles as $role){ ?>
<option value="<?php echo $role->id; ?>"><?php echo $role->role; ?></option>
<?php } ?>
</select>
<?php if(isset($error) && isset($error['role']) && !empty($error['role'])) { echo '<span class="help-block text-danger">' . $error['role'] . '</span>'; } ?>
</div>
<div class="form-group">
<label for="profile">Profile Picture:</label>
<input type="file" class="form-control file" name="profile" data-show-upload="false" data-show-caption="true">
</div>
</div>
<div class="col-md-6">
<?php /*
<div class="form-group <?php if(isset($error) && isset($error['name']) && !empty($error['name'])) { echo "has-error"; } ?>">
<label for="password">Password:</label>
<input type="password" name="password" id="password" class="form-control">
<?php if(isset($error) && isset($error['password']) && !empty($error['password'])) { echo '<span class="help-block text-danger">' . $error['password'] . '</span>'; } ?>
</div>
<div class="form-group">
<label for="c_password">Confirm Password:</label>
<input type="password" name="c_password" id="c_password" class="form-control">
</div>
*/ ?>
<div class="form-group <?php if(isset($error) && isset($error['group']) && !empty($error['group'])) { echo "has-error"; } ?>">
<label for="group">Group(s):</label>
<?php if(isset($error) && isset($error['group']) && !empty($error['group'])) { echo '<span class="help-block text-danger">' . $error['group'] . '</span>'; } ?>
<?php foreach($groups as $group){ ?>
<div class="checkbox">
<label>
<input value="<?php echo $group->id; ?>" type="checkbox" name="groups[]" id="group-<?php echo $group->id; ?>"> <?php echo $group->name; ?>
</label>
<?php } ?>
</div>
</div>
<div class="form-group">
<button class="btn btn-default" type="reset"><i class="fa fa-refresh"></i> reset</button>
<button class="btn btn-primary" type="submit"><i class="fa fa-save"></i> save</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>