diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-01-07 08:21:00 -0800 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-01-07 10:20:28 -0800 |
commit | 464f4d3497617fadb9d7752868f1175849cfa6d2 (patch) | |
tree | 0771bd935b30971bf2c244b6f158ed7496b644e5 /apps/um/views/pages/users/new.html.php | |
parent | 3d64793a1ee45857856be1cd71c3a0a040a3e869 (diff) |
Refactor to separate the framework from the app; drop message stuff, this app is just user management. Add a json view for individual usersHEADmaster
Diffstat (limited to 'apps/um/views/pages/users/new.html.php')
-rw-r--r-- | apps/um/views/pages/users/new.html.php | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/apps/um/views/pages/users/new.html.php b/apps/um/views/pages/users/new.html.php new file mode 100644 index 0000000..9df376f --- /dev/null +++ b/apps/um/views/pages/users/new.html.php @@ -0,0 +1,57 @@ +<?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 ($VARS['userlist']) { + $t->inputP("If you may have already created a username, please, ". + "<em>please</em> check the ". + $t->link($t->url('users/'), 'user-list', true). + " to find your old username, instead of creating a new ". + "user. If you don't like the name, you can log in and ". + "change it."); +} + +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); + +if (in_array('no email', $VARS['errors'])) { + $t->inputP("You must provide an email address.", true); +} +$t->inputText('user_email', 'Email Address', + 'This is so that we can contact you. (duh).', $VARS['email']); +$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(); |