From de52f85ec3cabd4c04aaf0614f86a886262058a3 Mon Sep 17 00:00:00 2001 From: dave Date: Sun, 8 Aug 2010 17:15:17 +0000 Subject: [PATCH] Use a second list for "other things to do". Things like the account info and role info don't need to be complete/incomplete --- user_account.php | 11 +-------- user_edit.php | 61 +++++++++++++++++++++++++++++++++++++----------- user_roles.php | 7 +----- 3 files changed, 50 insertions(+), 29 deletions(-) diff --git a/user_account.php b/user_account.php index 19afcb1..ffe438a 100644 --- a/user_account.php +++ b/user_account.php @@ -143,13 +143,6 @@ case 'save': - - -

-

+


@@ -330,8 +323,6 @@ $(document).ready(function() { } }); - user_update_tab_status('account'); - /* Code to disable the username box, only included if the password hasn't expired */ diff --git a/user_edit.php b/user_edit.php index 7793848..7fbad50 100644 --- a/user_edit.php +++ b/user_edit.php @@ -42,13 +42,6 @@ $tabs = array( 'fairinfo' => array( 'types' => array('fair'), 'file' => 'fair_stats_select.php', ), - 'account' => array( - 'label' => 'Account/Login', - 'name' => 'Account/Login/Password', - 'types' => array('student','judge','committee','volunteer','sponsor','fair'), - 'file' => 'user_account.php', - 'status_func' => 'user_account_status', - ), 'personal' => array( 'label' => 'Personal', 'name' => 'Personal Information', @@ -63,41 +56,55 @@ $tabs = array( 'fairinfo' => array( 'file' => 'user_organization.php', 'status_func' => 'user_organization_status', ), - 'roles' => array( - 'label' => 'Roles', - 'types' => array('student','judge','committee','volunteer','sponsor','fair'), - 'file' => 'user_roles.php', - 'status_func' => 'user_roles_status', - ), 'judgeother' => array( 'label' => 'Judge Other', 'types' => array('judge'), 'file' => 'judge_other.php', + 'disabled' => true, ), 'judgeexpertise' => array( 'label' => 'Expertise', 'types' => array('judge'), 'file' => 'judge_expertise.php', + 'disabled' => true, ), 'judgeavailability' => array( 'label' => 'Time Avail.', 'types' => array('judge'), 'file' => 'judge_availability.php', + 'disabled' => true, ), 'judgesa' => array( 'label' => 'Special Awards', 'types' => array('judge'), 'file' => 'judge_special_awards.php', + 'disabled' => true, ), 'volunteerpos' => array( 'label' => 'Volunteer Positions', 'types' => array('volunteer'), 'file' => 'volunteer_position.php', + 'disabled' => true, ), 'fairstats' => array( 'label' => 'Fair Statistics and Information', 'types' => array('fair'), 'file' => 'fair_stats.php', + 'disabled' => true, + ), + 'account' => array( + 'label' => 'Account/Login', + 'name' => 'Change Username/Email/Password', + 'types' => array('student','judge','committee','volunteer','sponsor','fair'), + 'file' => 'user_account.php', + 'status_func' => false, + ), + 'roles' => array( + 'label' => 'Roles', + 'name' => 'Add/Remove Roles', + 'types' => array('student','judge','committee','volunteer','sponsor','fair'), + 'file' => 'user_roles.php', + 'status_func' => false, ), ); @@ -174,6 +181,11 @@ foreach($tabs as $k=>$t) { /* Enabled has been modified now for this user */ if($t['disabled'] == true) continue; + if($t['status_func'] == false) { + /* No status func, skip in the "todo list" */ + continue; + } + /* Get the status */ if(is_callable($t['status_func'])) { $s = call_user_func($t['status_func'], $u); @@ -198,6 +210,29 @@ foreach($tabs as $k=>$t) { +
+
+Other Options and Things To Do:
+ + + diff --git a/user_roles.php b/user_roles.php index 56a586c..ff904f9 100644 --- a/user_roles.php +++ b/user_roles.php @@ -101,7 +101,7 @@ case 'remove': ?> -

-

+

'; @@ -138,11 +138,6 @@ function remove(role) } } -$(document).ready(function() { - user_update_tab_status('roles'); -}); - -