From da7be28cff45f6534bb1aec8ec39a704a90a63c8 Mon Sep 17 00:00:00 2001 From: Daryn Warriner Date: Wed, 9 Feb 2011 00:15:45 -0600 Subject: [PATCH] Fix problem where some localised labels are not visible. Improve html/css. --- account_page.php | 54 ++++--- account_prefs_inc.php | 299 +++++++++++++++++------------------ account_prof_menu_page.php | 64 ++++---- core/authentication_api.php | 12 +- core/helper_api.php | 22 +++ core/html_api.php | 8 +- css/account-prefs.css | 49 ------ css/default.css | 219 ++++++++++++++++---------- css/login.css | 27 +--- login_page.php | 30 ++-- login_select_proj_page.php | 20 +-- lost_pwd_page.php | 16 +- manage_columns_inc.php | 54 +++---- manage_user_edit_page.php | 306 +++++++++++++++--------------------- manage_user_page.php | 230 ++++++++++++--------------- signup_page.php | 23 +-- 16 files changed, 687 insertions(+), 746 deletions(-) delete mode 100644 css/account-prefs.css diff --git a/account_page.php b/account_page.php index 8da3a511a8..0a35a53a1d 100644 --- a/account_page.php +++ b/account_page.php @@ -119,39 +119,44 @@
class="has-required"> - + ?> -
- +
+ +
-
- +
+ +
-
- +
+ +
-
- +
+ +
-
- +
+ +
-
- +
+ +
-
">' . lang_get( 'realname' ) . ''; + echo '' . lang_get( 'realname' ) . ''; echo ''; echo ''; echo string_display_line( ldap_realname_from_username( $u_username ) ); @@ -175,25 +181,28 @@ } else { # Without LDAP $t_show_update_button = true; - echo ''; + echo ''; echo ''; echo ''; echo ''; } ?> +
-
- +
+ +
-
- +
+ +
0 ) { - echo '
'; - echo '' . lang_get( 'assigned_projects' ) . ''; + echo '
'; + echo '' . lang_get( 'assigned_projects' ) . ''; echo '
'; echo '
    '; foreach( $t_projects AS $t_project_id=>$t_project ) { @@ -207,6 +216,7 @@ } echo '
'; echo '
'; + echo ''; echo '
'; } ?> diff --git a/account_prefs_inc.php b/account_prefs_inc.php index 8bcb3edef0..85b87c0814 100644 --- a/account_prefs_inc.php +++ b/account_prefs_inc.php @@ -50,7 +50,6 @@ require_api( 'user_api.php' ); require_api( 'user_pref_api.php' ); require_api( 'utility_api.php' ); -require_css( 'account-prefs.css' ); function edit_account_prefs($p_user_id = null, $p_error_if_protected = true, $p_accounts_menu = true, $p_redirect_url = '') { if ( null === $p_user_id ) { @@ -80,7 +79,7 @@ function edit_account_prefs($p_user_id = null, $p_error_if_protected = true, $p_
- + @@ -89,161 +88,155 @@ function edit_account_prefs($p_user_id = null, $p_error_if_protected = true, $p_ print_account_menu( 'account_prefs_page.php' ); } ?> -
- - +
+ + +
-
- +
+ +
-
- +
+ +
-
-
- - bugnote_order, 'ASC' ); ?> /> - - bugnote_order, 'DESC' ); ?> /> - -
-
+
+ + bugnote_order, 'DESC' ); ?> /> + + bugnote_order, 'ASC' ); ?> /> + + +
-
-
- - email_on_new, ON ); ?> /> - - - - -
-
-
-
- - email_on_assigned, ON ); ?> /> - - - - -
-
-
-
- - email_on_feedback, ON ); ?> /> - - - - -
-
-
-
- - email_on_resolved, ON ); ?> /> - - - - -
-
-
-
- - email_on_closed, ON ); ?> /> - - - - -
-
-
-
- - email_on_reopened, ON ); ?> /> - - - - -
-
-
-
- - email_on_bugnote, ON ); ?> /> - - - - -
-
-
-
- - email_on_status, ON ); ?> /> - - - - -
-
-
-
- - email_on_priority , ON); ?> /> - - - - -
-
-
- +
+ + email_on_new, ON ); ?> /> + + + +
+
+ + email_on_assigned, ON ); ?> /> + + + +
+
+ + email_on_feedback, ON ); ?> /> + + + +
+
+ + email_on_resolved, ON ); ?> /> + + + +
+
+ + email_on_closed, ON ); ?> /> + + + +
+
+ + email_on_reopened, ON ); ?> /> + + + +
+
+ + email_on_bugnote, ON ); ?> /> + + + +
+
+ + email_on_status, ON ); ?> /> + + + +
+
+ + email_on_priority , ON); ?> /> + + + +
+
+ +
@@ -266,21 +259,23 @@ function edit_account_prefs($p_user_id = null, $p_error_if_protected = true, $p_ -
- - +
+ + +
-
- - +
+ + +
diff --git a/account_prof_menu_page.php b/account_prof_menu_page.php index 6b76fc77ea..fab5ffd297 100644 --- a/account_prof_menu_page.php +++ b/account_prof_menu_page.php @@ -90,7 +90,7 @@
- + @@ -99,21 +99,25 @@ print_account_menu( 'account_prof_menu_page.php' ); } ?> -
- +
+ +
-
- +
+ +
-
- - +
+ + +
-
- - +
+ + +
@@ -130,28 +134,34 @@
- + -
- - - - - - - - - - -
- - +
+ + + +
+
+ + + + + +
+
+ + + +
+
+ - + +
diff --git a/core/authentication_api.php b/core/authentication_api.php index 631fb0c18a..3f767855a5 100644 --- a/core/authentication_api.php +++ b/core/authentication_api.php @@ -698,7 +698,7 @@ function auth_reauthenticate_page( $p_user_id, $p_username ) {
- + -
- +
+ +
-
- +
+ +
diff --git a/core/helper_api.php b/core/helper_api.php index 62aa7f1e55..b3404cee38 100644 --- a/core/helper_api.php +++ b/core/helper_api.php @@ -98,6 +98,28 @@ function helper_alternate_class( $p_index = null, $p_odd_class = 'row-1', $p_eve } } +/** + * return alternate classes for rows, no attribute + * If no index is given, continue alternating based on the last index given + * @param int $p_index + * @param string $p_odd_class default: odd + * @param string $p_even_class default: even + * @return string + */ +function helper_alternate_class_no_attribute( $p_index = null, $p_odd_class = 'odd', $p_even_class = 'even' ) { + static $t_index = 1; + + if( null !== $p_index ) { + $t_index = $p_index; + } + + if( 1 == $t_index++ % 2 ) { + return $p_odd_class; + } else { + return $p_even_class; + } +} + /** * get the color string for the given status * @param int $p_status diff --git a/core/html_api.php b/core/html_api.php index bcedc09bcb..e36b28012b 100644 --- a/core/html_api.php +++ b/core/html_api.php @@ -1356,7 +1356,8 @@ function html_button( $p_action, $p_button_text, $p_fields = null, $p_method = ' $t_method = 'post'; } - echo "\n"; + echo "\n"; + echo "\t
"; # Add a CSRF token only when the form is being sent via the POST method if ( $t_method == 'post' ) { echo form_security_field( $t_form_name[0] ); @@ -1366,10 +1367,11 @@ function html_button( $p_action, $p_button_text, $p_fields = null, $p_method = ' $key = string_attribute( $key ); $val = string_attribute( $val ); - echo " \n"; + echo "\t\t\n"; } - echo " \n"; + echo "\t\t\n"; + echo "\t
"; echo "
\n"; } diff --git a/css/account-prefs.css b/css/account-prefs.css deleted file mode 100644 index 7ab903ec7c..0000000000 --- a/css/account-prefs.css +++ /dev/null @@ -1,49 +0,0 @@ -div#account-prefs-update-div { - width: 85%; - min-width: 56em; -} -div#account-prefs-update-div fieldset .field-container { - position: relative; - margin-bottom: 1px; -} -div#account-prefs-update-div fieldset .field-container fieldset { - width: auto; - padding-left: 33%; -} -div#account-prefs-update-div fieldset fieldset legend { - position: absolute; - top: 0em; - left: 0em; - width: 30%; - min-width: 18em; - padding: 0em; - margin: 0em; - display: block; - background-color: #c8c8e8; - border-right: 1px solid #fff; - text-indent: 0em; -} -div#account-prefs-update-div fieldset fieldset legend label { -} - -div#account-prefs-update-div fieldset .label { - min-width: 18em; -} -div#account-prefs-update-div fieldset .radio-label { - /*min-width: 10em;*/ -} -div#account-prefs-update-div fieldset fieldset .label, -div#account-prefs-update-div fieldset fieldset .radio-label { - position: relative; - float: left; - font-weight: normal; - border: none; - background-color: transparent; - width: auto; - text-align: left; -} -div#account-prefs-update-div fieldset fieldset .input { - float: left; - width: auto; - margin-right: 0em; -} diff --git a/css/default.css b/css/default.css index 6284362a34..1d10cf36f6 100644 --- a/css/default.css +++ b/css/default.css @@ -39,7 +39,8 @@ span.dependency_met { color: green; } span.dependency_unmet { color: red; } span.dependency_upgrade { color: orange; } -table { } +table { border: none; } +table td, table th { border: none; border-spacing: none; } table.hide { width: 100%; border: solid 0px #ffffff; } table.width100 { width: 100%; border: solid 1px #000000; } table.width90 { width: 90%; border: solid 1px #000000; } @@ -332,139 +333,175 @@ div.error-info { text-align: center; margin: 1em; } #manage-overview-div, #account-update-div { width: 75%; margin: 1em auto; } #manage-overview-table { width: 100%; border: 1px solid #000; } #manage-overview-table th { width: 30%; } -div.form-container { + +div.form-container, +div.table-container { clear: both; position: relative; margin: 2em auto 0em auto; padding: 1px; - width: 65%; - min-width: 40em; + min-width: 50em; border: 1px solid #000; + width: 85%; /* default width */ } -div.form-container fieldset { +#manage-user-div { + min-width: 57em; +} +div.form-container h2, +div.table-container h2 { + float: left; + background-color: #fff; + color: #000; + font-size: 1em; + font-weight: bold; + text-align: left; + padding: .5em; + margin: 0em; +} +div.form-container table, +div.table-container table { width: 100%; +} +div.form-container table th, +div.table-container table th { + text-align: center; +} +div#reauth-div, +div#login-div, +div#lost-password-div, +div#signup-div, +div#select-project-div, +div#account-profile-div, +div#account-profile-update-div { + width: 65%; +} +fieldset { border: none; margin: 0em; padding: 0em; } +.action-button fieldset { + display: inline; +} +div.form-container fieldset { + clear: both; + margin: 0em; + padding: 0em; + border: none; +} +div#form-container fieldset fieldset { + margin: 0em 0em 1px 0em; +} div.form-container fieldset legend { + float: left; margin: 0em; padding: .5em .15em; text-indent: .5em; border: none; font-weight: bold; } -div.form-container .field-container { - position: relative; - display:block; - float: left; - width: 100%; - margin: 0em 0em 1px 0em; - padding: 0em; - line-height: 1em; -} -div.form-container fieldset label, -div.form-container fieldset .label span { - display: block; - line-height: 1.5em; - padding: .5em; -} div.form-container fieldset label.required:before { font-size: 8pt; content: '* '; color: red; } +.pager-links { + font-size: 8pt; + font-weight: normal; + text-align: right; +} +div.table-container .section-link, +div.form-container .section-link { + padding: .5em; + float: right; +} div.form-container .odd { background-color: #d8d8d8; } div.form-container .even { background-color: #e8e8e8; } - -div.form-container .label { - position: absolute; - display: block; +div.form-container .field-container { + position: relative; + display:block; + width: 100%; float: left; + margin: 0em 0em 1px 0em; padding: 0em; +} +div.form-container .field-container>.display-label, +div.form-container .field-container>label, +div.form-container fieldset fieldset legend { + position: relative; + float: left; margin: 0em; - border-right: 1px solid #fff; + padding: .5em; font-weight: bold; - background-color: #c8c8e8; - height: 100%; - width: 30%; /* default width */ - min-width: 12.5em; /* default width */ + text-indent: 0em; + white-space: normal; + z-index: 9999; } -div.form-container .input { - position: relative; - display: block; - float: right; - margin-right: 1em; - padding: .25em; - width: 65%; /* default width */ +div#account-prefs-update-div fieldset fieldset>label { + width: auto; + font-weight: normal; } -div.form-container .input span.field-value { - display:block; - line-height: 1.8em; +div#manage-user-actions-div { + text-align: center; +} +fieldset fieldset legend label { + z-index: 9999; } -div.form-container .input textarea, div.form-container .input input { +div.form-container .radio, +div.form-container .checkbox, +div.form-container .select, +div.form-container .textarea, +div.form-container .input, +div.form-container .display-value { + position: relative; + float: left; + padding: .25em; + margin: 0em .5em; + z-index: 9999; +} +div.form-container .radio input, +div.form-container .checkbox input, +div.form-container .select select, +div.form-container .textarea textarea, +div.form-container .input input, +div.form-container .display-value span { max-width: 98%; } - +.label-style { + position: absolute; + top: 0em; + left: 0em; + padding: 0em; + margin: 0em; + background-color: #c8c8e8; + height: 100%; + border-right: 1px solid #fff; + z-index: 0; +} div.form-container .submit-button { clear: both; display: block; padding: .5em; text-align: center; } -#account-profile-div, #account-profile-update-div { - width: 75%; -} -#reauth-div { width: 50%; } -div.form-container #account-menu { - position: absolute; - float: right; - padding: .25em; - right: .5em; +/* 30% label width - these are the defaults */ +div.form-container .label-style { + width: 31%; } -div#manage-columns-div { min-width: 51.5em; } -#account-profile-form .label, #account-profile-update-form .label, #select-project-form .label { +div.form-container label, +div.form-container .display-label, +#account-prefs-update-div legend { width: 30%; } -#account-profile-form .input, #account-profile-update-form .input, #select-project-form .input { +div.form-container .textarea, +div.form-container .input, +div.form-container .display-value { width: 65%; } -#account-profile-update-form fieldset fieldset .label, -#account-profile-update-form fieldset fieldset .input { - position: relative; - float: left; -} -#account-profile-update-form fieldset fieldset .field-container span { - left: 15%; -} -#account-profile-update-form fieldset fieldset .label { - float: left; - background-color: transparent; - margin: 0em 2em 0em 0em; - border: none; - width: auto; -} -#account-profile-update-form fieldset fieldset .input { - float: left; - margin: .25em 0em 0em 0em; - width: 1em; -} -#manage-columns-copy-div div.field-container { float: left; width: auto; } -#manage-columns-copy-div span.input { float: left; width: auto; } -#manage-columns-copy-div span.submit-button { clear: none; padding: .25em; text-align: left; } -div#manage-user-edit-div { border: none; margin: 0em; } -div#manage-user-edit-div .field-container { width: auto; float: left; } -div#manage-user-edit-div .label { position: relative; min-width: 5em; width: auto; background-color: transparent; } -div#manage-user-edit-div .input { width: auto; } -div#manage-user-edit-div .submit-button { clear: none; float: left; padding: .25em; } -#manage-user-filter fieldset, form.action-button fieldset { border: none; padding: 0em; margin: 0em; display:inline; } -#manage-user-filter-menu { clear: both; margin-top: .5em; } -#manage-user-filter-menu .current-filter { font-weight: bold; } - div.important-msg { display: block; width: 60%; @@ -473,7 +510,7 @@ div.important-msg { border: 1px solid red; background-color: #fceded; } -div.important-msg ul { +div.important-msg ul, .success-msg { margin: 0em; padding: 2em 2em 2em 4em; } @@ -481,6 +518,16 @@ div.important-msg ul li { margin-left: 2em; background-color: #fceded; } +div.success-msg { + display: block; + width: 60%; + margin: 1em auto; +} +.continue-link { + clear: both; + display: block; + text-align: center; +} ul.project-list { list-style: none; margin: .5em 0em 2em 0em; padding: 0em .5em; } ul.project-list li { margin: 0em; line-height: 1.25em; clear: both; min-width: 30em; } ul.project-list li span.access-level:before { content: ' ['; } diff --git a/css/login.css b/css/login.css index ab71a93f81..01e9e18af8 100644 --- a/css/login.css +++ b/css/login.css @@ -1,19 +1,7 @@ -div#login-div { min-width: 45em; } -#login-form .label, #signup-form .label, #lost-password-form .label { - width: 40%; -} -#login-form .input, #signup-form .input, #lost-password-form .input { - width: 55%; -} - #secure-session-label span.input { - float: left; - margin: 0em; width: 57%; - padding: .5em 0em 0em .25em; } #secure-session-label span.input input { - float: left; margin-right: .25em; } span#session-msg { @@ -21,20 +9,15 @@ span#session-msg { line-height: 1em; font-size: .8em; } -span#captcha-input { - display: block; - width: 6em; - line-height: 3.5em; - padding: 0em; +#captcha-field { + float: left; } span.captcha-image { position: relative; display: block; - float: right; - width: 10em; - margin: 0em 0em 0em -10em; - padding: 1em 0em 0em 3em; - border-left: 1px solid #fff; + float: left; + margin: 0em 0em 0em 1em; + padding: 0em; } span#no-password-msg, #signup-info, #lost-password-msg { clear: both; diff --git a/login_page.php b/login_page.php index d220c6d216..4949ed6ecb 100644 --- a/login_page.php +++ b/login_page.php @@ -135,7 +135,7 @@
- + '; @@ -162,26 +162,30 @@ } ?> - - +
+ - - - + +
+
+ - - - + +
+
+ /> - + +
- - +
+ /> - + +
diff --git a/login_select_proj_page.php b/login_select_proj_page.php index 859faa1ae7..d7aa6cb5c3 100644 --- a/login_select_proj_page.php +++ b/login_select_proj_page.php @@ -68,20 +68,22 @@
- + - - - +
+ + - - - - - + +
+
+ + + +
diff --git a/lost_pwd_page.php b/lost_pwd_page.php index 2c68ab2d69..8ae9940780 100644 --- a/lost_pwd_page.php +++ b/lost_pwd_page.php @@ -61,7 +61,7 @@
- +
diff --git a/manage_user_edit_page.php b/manage_user_edit_page.php index 7c473f004d..9d1875c99e 100644 --- a/manage_user_edit_page.php +++ b/manage_user_edit_page.php @@ -85,150 +85,117 @@ print_manage_menu(); ?> -
- -
-
- - - - - - - - -> - - - - - -> - - - - - -> - - - - - -> - - - - - -> - - - - - -> - - - - - - - - -
- - -
- - - -
- - - + +
+ + + + + + +
+ + + +
+ + +
' . lang_get( 'realname_label' ) . ''; + echo ''; echo string_display_line( user_get_realname( $t_user_id ) ); + echo ''; + } else { + # Without LDAP ?> + + - - -
- - - + + +
' . lang_get( 'email_label' ) . ''; + echo '' . string_display_line( user_get_email( $t_user_id ) ) . ''; + } else { + # Without LDAP + echo ''; + echo ''; print_email_input( 'email', $t_user['email'] ); - } - ?> -
- - - -
- - - /> -
- - - /> -
- - - - -
-
+ echo ''; + } ?> + +
+ +
+ + + + + +
+ +
+ + /> + +
+ +
+ + /> + +
'; + echo ''; + echo ''; + echo ''; + echo '
'; + } ?> + + +
+
-
- - -
- - +
-
- + +
+ - + +
-
- - - - + +
+ + + +
-
+ -
+
- -
-
- - - - - - - -> - - - - - - - - -> - - - - - -> - - - - - - - - - -
- -
- - - -
- - - -
- - - -
- -
-
- +

+
+ +
+ +
+
+
+ + +
+ + + + + +
+
+ + + + + +
+ +
+
+
-
- - - - - - - - - - - - - - - - -> - - - - - - - - - - - - - -
- [] - - - -
-
- - - - - - /> - -
-
-
- - - - - - - - - - - - +
+

[] + + +
+
+ + + + + + /> + +
+
+ + + + + + + + + + + + + > + + + + + + + + + +
+ + + + + + + +
+ + +
+
- -
- - - - - -
- - - -
+
+
>
- - +
+ - + +
diff --git a/signup_page.php b/signup_page.php index 5421f63385..4318e3f05a 100644 --- a/signup_page.php +++ b/signup_page.php @@ -64,7 +64,7 @@
- + - - +
+ - - - + +
+
+ - + +
0 && ( true == $t_allow_passwd ) ) { # captcha image requires GD library and related option to ON - echo ''; - echo ''; + echo '
'; + echo ''; echo ''; print_captcha_input( 'captcha', '' ); echo 'visual captcha'; echo ''; echo ''; - echo ''; + echo ''; + echo '
'; } if( false == $t_allow_passwd ) { echo '';