student numbers
[ssproject1617.git] / testcms-final-anon / system / admin / theme / users / edit.php
1 <h1>Editing <?php echo $user->username; ?>&rsquo;s profile</h1>
2
3 <?php echo Notifications::read(); ?>
4
5 <section class="content">
6
7 <form method="post" action="<?php echo Url::current(); ?>" novalidate autocomplete="off">
8 <fieldset>
9 <p>
10 <label for="real_name">Real name:</label>
11 <input id="real_name" name="real_name" value="<?php echo Input::post('real_name', $user->real_name); ?>">
12
13 <em>The user&rsquo;s real name. Used in author bylines (visible to public).</em>
14 </p>
15
16 <p>
17 <label for="bio">Biography:</label>
18 <textarea id="bio" name="bio"><?php echo Input::post('bio', $user->bio); ?></textarea>
19
20 <em>A short biography for your user. Accepts valid HTML.</em>
21 </p>
22
23 <p>
24 <label for="status">Status:</label>
25 <select id="status" name="status">
26 <?php foreach(array('inactive','active') as $status): ?>
27 <?php $selected = (Input::post('status', $user->status) == $status) ? ' selected' : ''; ?>
28 <option value="<?php echo $status; ?>"<?php echo $selected; ?>>
29 <?php echo ucwords($status); ?>
30 </option>
31 <?php endforeach; ?>
32 </select>
33
34 <em>If inactive, the user will not be able to log in.</em>
35 </p>
36
37 <p>
38 <label for="role">Role:</label>
39 <select id="role" name="role">
40 <?php foreach(array('administrator', 'editor', 'user') as $role): ?>
41 <?php $selected = (Input::post('role', $user->role) == $role) ? ' selected' : ''; ?>
42 <option value="<?php echo $role; ?>"<?php echo $selected; ?>>
43 <?php echo ucwords($role); ?>
44 </option>
45 <?php endforeach; ?>
46 </select>
47
48 <em>The user&rsquo;s role. See <a href="//google.com">here</a> for more info.</em>
49 </p>
50 </fieldset>
51
52 <fieldset>
53
54 <legend>User details</legend>
55 <em>Create the details for your new user to log in to Test CMS.</em>
56
57 <p>
58 <label for="username">Username:</label>
59 <input id="username" name="username" value="<?php echo Input::post('username', $user->username); ?>">
60
61 <em>The desired username. Can be changed later.</em>
62 </p>
63
64 <p>
65 <label for="password">Password:</label>
66 <input id="password" type="password" name="password">
67
68 <em>Leave blank for no change.</em>
69 </p>
70
71 <p>
72 <label for="email">Email:</label>
73 <input id="email" name="email" value="<?php echo Input::post('email', $user->email); ?>">
74
75 <em>The user&rsquo;s email address. Needed if the user forgets their password.</em>
76 </p>
77 </fieldset>
78
79 <p class="buttons">
80 <button type="submit">Update</button>
81 <?php if(Users::authed()->id !== $user->id): ?>
82 <button name="delete" type="submit">Delete</button>
83 <?php endif; ?>
84
85 <a href="<?php echo admin_url('users'); ?>">Return to users</a>
86 </p>
87 </form>
88
89 </section>