summaryrefslogtreecommitdiff
path: root/src/views/pages/users/new.html.php
blob: 62a0f097ef3eb862c6e6ebb05872d951dbda0d84 (plain)
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
<?php global $VARS;
$t = $VARS['template'];

$t->header('Create new user');

$t->openTag('form', array('method'=>'post',
                          'action'=>$t->url('users')));

$t->openFieldset("New User: Step 1");
if (in_array('illegal name', $VARS['errors'])) {
	$t->inputP("That is a forbidden username.", true);
}
if (in_array('user exists', $VARS['errors'])) {
	$t->inputP("A user with that name already exists.");
}
$t->inputText('auth_name','Username',
              "This is the name you use to log in, but it is also a ".
              "short name that is used in various places, think of it ".
              "as a sort of <q>Twitter name</q>.",$VARS['username']);

@$password = $VARS['password1'];
if (in_array('pw mixmatch', $VARS['errors'])) {
	$t->inputP("The passwords didn't match.", true);
	$password = '';
}
if (in_array('no pw', $VARS['errors'])) {
	$t->inputP("You must set a password.", true);
	$password = '';
}
$t->inputNewPassword('auth_password','Password', $password);
$t->closeFieldset();

foreach ($VARS['antispam_html'] as $html) {
	echo $html;
}

$t->tag('input', array('type'=>'submit', 'value'=>'Go on to Step 2'));

$t->closeTag('form');

$t->footer();