Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Can now edit own firstname and lastname, and some tidying

  • Loading branch information...
commit 9c055aa5d2adf344537b927a41e3262d5550e5ae 1 parent 5d13db8
martin authored
Showing with 19 additions and 1 deletion.
  1. +13 −1 user/edit.html
  2. +6 −0 user/edit.php
14 user/edit.html
View
@@ -9,6 +9,18 @@
</td>
</tr>
<tr valign=top>
+ <td><P><? print_string("firstname") ?>:</td>
+ <td><input type="text" name="firstname" size=30 value="<? p($user->firstname) ?>">
+ <? formerr($err["firstname"]) ?>
+ </td>
+</tr>
+<tr valign=top>
+ <td><P><? print_string("lastname") ?>:</td>
+ <td><input type="text" name="lastname" size=30 value="<? p($user->lastname) ?>">
+ <? formerr($err["lastname"]) ?>
+ </td>
+</tr>
+<tr valign=top>
<td><P><? print_string("userdescription") ?>:</td>
<td><TEXTAREA NAME=description COLS=50 ROWS=10 WRAP=virtual><? p($user->description) ?></TEXTAREA>
<? helpbutton("text", get_string("helptext")) ?>
@@ -104,7 +116,7 @@
</tr>
<tr>
<td></td>
- <td><input type="submit" value="<? print_string("updatemyprofile") ?>"></td>
+ <td align=right><input type="submit" value="<? print_string("updatemyprofile") ?>"></td>
</TABLE>
<INPUT type="hidden" name="course" value="<? p($course->id) ?>">
<INPUT type="hidden" name="id" value="<? p($user->id) ?>">
6 user/edit.php
View
@@ -160,6 +160,12 @@ function find_form_errors(&$user, &$usernew, &$err) {
if (empty($usernew->city))
$err["city"] = get_string("missingcity");
+ if (empty($usernew->firstname))
+ $err["firstname"] = get_string("missingfirstname");
+
+ if (empty($usernew->lastname))
+ $err["lastname"] = get_string("missinglastname");
+
if (empty($usernew->country))
$err["country"] = get_string("missingcountry");
Please sign in to comment.
Something went wrong with that request. Please try again.