diff --git a/tableeditor.css b/tableeditor.css
index 06285be9..d41bd0dd 100644
--- a/tableeditor.css
+++ b/tableeditor.css
@@ -111,8 +111,12 @@ form.editor table tr td {
vertical-align: baseline;
}
+/* Enforce a minimum width, but let the table layout
+ * expand to fit the width of the maximum label */
form.editor table tr td:first-child {
text-align: right;
+ width: 20%;
+ white-space: nowrap;
}
diff --git a/user_personal.php b/user_personal.php
index b79fad25..683c09b2 100644
--- a/user_personal.php
+++ b/user_personal.php
@@ -23,13 +23,13 @@
*/
?>
- require_once("common.inc.php");
- require_once("user.inc.php");
+require_once('common.inc.php');
+require_once('user.inc.php');
- /* Ensure they're logged in as something, anything */
- user_auth_required();
+/* Ensure they're logged in as something, anything */
+user_auth_required();
- $user_personal_fields = array(
+$user_personal_fields = array(
'salutation' => array('name' => 'Salutation'),
'firstname' => array('name' => 'First Name'),
'lastname' => array('name' => 'Last Name'),
@@ -62,21 +62,14 @@
);
-/* Sort out who we're editting */
-if($_POST['users_id'])
- $eid = intval($_POST['users_id']); /* From a save form */
-else if(array_key_exists('embed_edit_id', $_SESSION))
- $eid = $_SESSION['embed_edit_id']; /* From the embedded editor */
-else
- $eid = $_SESSION['users_id']; /* Regular entry */
-if($eid != $_SESSION['users_id']) {
- /* Not editing ourself, we had better be
- * a committee member */
+$edit_id = isset($_GET['users_id']) ? intval($_GET['users_id']) : $_SESSION['users_id'];
+if($edit_id != $_SESSION['users_id'])
user_auth_required('admin');
-}
+else
+ user_auth_required();
- $u = user_load($eid);
+ $u = user_load($edit_id);
/* Load the fields the user can edit, and theones that are required */
$fields = array();
$required = array();
@@ -87,6 +80,8 @@ if($eid != $_SESSION['users_id']) {
$required = array_merge($required,
user_personal_required_fields($r));
}
+ /* true/false strings for form validation */
+ $vreq = array();
switch($_GET['action']) {
case 'save':
@@ -172,19 +167,10 @@ case 'save':
}
-
- //send the header
- if($_SESSION['embed'] == true) {
- echo "
";
- display_messages();
- echo "