Skip to content

Commit

Permalink
Issue #12545: Remove deprecated <center> tag, align and valign attrs
Browse files Browse the repository at this point in the history
The following features of old school HTML are deprecated:
* <center></center>
* align="center"
* valign="top"

This commit removes those deprecated HTML tags and attributes and
replaces them with equivalent CSS in some parts. This commit does break
the layout in many places (things no longer center align) so some follow
up will be needed when we start to remove table based layouts.
  • Loading branch information
davidhicks committed Dec 26, 2010
1 parent 9f6433e commit 90cc5cc
Show file tree
Hide file tree
Showing 125 changed files with 357 additions and 369 deletions.
2 changes: 1 addition & 1 deletion account_delete.php
Expand Up @@ -103,7 +103,7 @@
?>

<br />
<div align="center">
<div>
<?php
echo lang_get( 'account_removed_msg' ) . '<br />';
print_bracket_link( config_get( 'logout_redirect_page' ), lang_get( 'proceed' ) );
Expand Down
10 changes: 5 additions & 5 deletions account_page.php
Expand Up @@ -108,17 +108,17 @@
<!-- # Edit Account Form BEGIN -->
<br />
<?php if ( $t_force_pw_reset ) { ?>
<center><div style="color:red; width:75%">
<div class="center" style="color:red; width:75%">
<?php
echo lang_get( 'verify_warning' );
if ( helper_call_custom_function( 'auth_can_change_password', array() ) ) {
echo '<br />' . lang_get( 'verify_change_password' );
}
?>
</div></center>
</div>
<br />
<?php } ?>
<div align="center">
<div>
<form method="post" action="account_update.php">
<?php echo form_security_field( 'account_update' ); ?>
<table class="width75" cellspacing="1">
Expand Down Expand Up @@ -223,7 +223,7 @@
</tr>

<!-- Realname -->
<tr <?php echo helper_alternate_class() ?> valign="top">
<tr <?php echo helper_alternate_class() ?>>
<th class="category">
<?php echo lang_get( 'realname' ) ?>
</th>
Expand Down Expand Up @@ -265,7 +265,7 @@
</tr>

<!-- Assigned project list -->
<tr <?php echo helper_alternate_class() ?> valign="top">
<tr <?php echo helper_alternate_class() ?>>
<th class="category">
<?php echo lang_get( 'assigned_projects' ) ?>
</th>
Expand Down
2 changes: 1 addition & 1 deletion account_prefs_inc.php
Expand Up @@ -76,7 +76,7 @@ function edit_account_prefs($p_user_id = null, $p_error_if_protected = true, $p_
# Account Preferences Form BEGIN
?>
<br />
<div align="center">
<div>
<form method="post" action="account_prefs_update.php">
<?php echo form_security_field( 'account_prefs_update' ) ?>
<input type="hidden" name="user_id" value="<?php echo $p_user_id ?>" />
Expand Down
2 changes: 1 addition & 1 deletion account_prefs_update.php
Expand Up @@ -134,7 +134,7 @@

html_page_top( null, $f_redirect_url );

echo '<br /><div align="center">';
echo '<br /><div>';

echo lang_get( 'operation_successful' );

Expand Down
2 changes: 1 addition & 1 deletion account_prof_edit_page.php
Expand Up @@ -82,7 +82,7 @@

<?php # Edit Profile Form BEGIN ?>
<br />
<div align="center">
<div>
<form method="post" action="account_prof_update.php">
<?php echo form_security_field( 'profile_update' )?>
<input type="hidden" name="action" value="update" />
Expand Down
4 changes: 2 additions & 2 deletions account_prof_menu_page.php
Expand Up @@ -88,7 +88,7 @@
# Add Profile Form BEGIN
?>
<br />
<div align="center">
<div>
<form method="post" action="account_prof_update.php">
<?php echo form_security_field( 'profile_update' )?>
<input type="hidden" name="action" value="add" />
Expand Down Expand Up @@ -157,7 +157,7 @@
if( $t_profiles ) {
?>
<br />
<div align="center">
<div>
<form method="post" action="account_prof_update.php">
<?php echo form_security_field( 'profile_update' )?>
<table class="width75" cellspacing="1">
Expand Down
6 changes: 3 additions & 3 deletions account_sponsor_page.php
Expand Up @@ -133,7 +133,7 @@

<!-- # Edit own sponsorship Form BEGIN -->
<br />
<div align="center">
<div>
<table class="width100" cellspacing="1">

<!-- Headings -->
Expand Down Expand Up @@ -240,7 +240,7 @@

<!-- # Edit sponsorship Form BEGIN -->
<br />
<div align="center">
<div>
<form method="post" action="account_sponsor_update.php">
<?php echo form_security_field( 'account_sponsor_update' ) ?>
<table class="width100" cellspacing="1">
Expand Down Expand Up @@ -340,7 +340,7 @@
<?php } # end sponsored issues ?>

<br />
<div align="center">
<div>
<?php
html_button ( 'account_sponsor_page.php',
lang_get( ( $t_show_all ? 'sponsor_hide' : 'sponsor_show' ) ),
Expand Down
2 changes: 1 addition & 1 deletion account_sponsor_update.php
Expand Up @@ -85,7 +85,7 @@
$t_redirect = 'account_sponsor_page.php';
html_page_top( null, $t_redirect );

echo '<br /><div align="center">';
echo '<br /><div>';

echo lang_get( 'payment_updated' ) . '<br />';

Expand Down
2 changes: 1 addition & 1 deletion account_update.php
Expand Up @@ -123,7 +123,7 @@

html_page_top( null, $t_redirect );

echo '<br /><div align="center">';
echo '<br /><div>';

if ( $t_email_updated ) {
echo lang_get( 'email_updated' ) . '<br />';
Expand Down
14 changes: 7 additions & 7 deletions adm_config_report.php
Expand Up @@ -124,7 +124,7 @@ function print_config_value_as_string( $p_type, $p_value ) {
$result = db_query_bound( $query );
?>
<br />
<div align="center">
<div>
<table class="width100" cellspacing="1">

<!-- Title -->
Expand Down Expand Up @@ -164,7 +164,7 @@ function print_config_value_as_string( $p_type, $p_value ) {

?>
<!-- Repeated Info Rows -->
<tr <?php echo helper_alternate_class() ?> valign="top">
<tr <?php echo helper_alternate_class() ?>>
<td class="center">
<?php echo ($v_user_id == 0) ? lang_get( 'all_users' ) : string_display_line( user_get_name( $v_user_id ) ) ?>
</td>
Expand Down Expand Up @@ -214,7 +214,7 @@ function print_config_value_as_string( $p_type, $p_value ) {
<?php echo lang_get( 'set_configuration_option' ) ?>
</td>
</tr>
<tr <?php echo helper_alternate_class() ?> valign="top">
<tr <?php echo helper_alternate_class() ?>>
<td>
<?php echo lang_get( 'username' ) ?>
</td>
Expand All @@ -225,7 +225,7 @@ function print_config_value_as_string( $p_type, $p_value ) {
</select>
</td>
</tr>
<tr <?php echo helper_alternate_class() ?> valign="top">
<tr <?php echo helper_alternate_class() ?>>
<td>
<?php echo lang_get( 'project_name' ) ?>
</td>
Expand All @@ -236,15 +236,15 @@ function print_config_value_as_string( $p_type, $p_value ) {
</select>
</td>
</tr>
<tr <?php echo helper_alternate_class() ?> valign="top">
<tr <?php echo helper_alternate_class() ?>>
<td>
<?php echo lang_get( 'configuration_option' ) ?>
</td>
<td>
<input type="text" name="config_option" value="" size="64" maxlength="64" />
</td>
</tr>
<tr <?php echo helper_alternate_class() ?> valign="top">
<tr <?php echo helper_alternate_class() ?>>
<td>
<?php echo lang_get( 'configuration_option_type' ) ?>
</td>
Expand All @@ -257,7 +257,7 @@ function print_config_value_as_string( $p_type, $p_value ) {
</select>
</td>
</tr>
<tr <?php echo helper_alternate_class() ?> valign="top">
<tr <?php echo helper_alternate_class() ?>>
<td>
<?php echo lang_get( 'configuration_option_value' ) ?>
</td>
Expand Down
4 changes: 2 additions & 2 deletions admin/index.php
Expand Up @@ -39,7 +39,7 @@ function print_info_row( $p_description, $p_value ) {
?>
<br />

<div align="center">
<div>
<p>[ <a href="check/index.php">Check your installation</a> ]</p>
<?php if ( count($upgrade) - 1 != config_get( 'database_version' ) ) { ?>
<p>[ <a href="upgrade_warning.php"><strong>Upgrade your installation</strong></a> ]</p>
Expand All @@ -51,7 +51,7 @@ function print_info_row( $p_description, $p_value ) {
<p>[ <a href="email_queue.php">Email Queue</a> ]</p>
</div>

<table class="width75" align="center" cellspacing="1">
<table class="width75" cellspacing="1">
<tr>
<td class="form-title" width="30%" colspan="2"><?php echo lang_get( 'install_information' ) ?></td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion admin/install.php
Expand Up @@ -880,7 +880,7 @@ function InsertData( $p_table, $p_data ) {
</tr>
<?php
if( true == $t_write_failed ) {
echo '<tr><table width="50%" border="0" cellpadding="10" cellspacing="1" align="center">';
echo '<tr><table width="50%" border="0" cellpadding="10" cellspacing="1">';
echo '<tr><td>Please add the following lines to ' . $g_absolute_path . 'config_inc.php before continuing to the database upgrade check:</td></tr>';
echo '<tr><td><pre>' . htmlentities( $t_config ) . '</pre></td></tr></table></tr>';
}
Expand Down
16 changes: 8 additions & 8 deletions admin/system_utils.php
Expand Up @@ -51,17 +51,17 @@

<!-- each row links to an upgrade
move database bug attachments to disk -->
<tr bgcolor="#ffffff"><td>Move attachments stored in database schema to disk files.</td><td><center>
<tr bgcolor="#ffffff"><td>Move attachments stored in database schema to disk files.</td><td class="center">
<?php html_button( 'move_db2disk.php', 'Move Attachments to Disk', array( 'doc' => 'attachment' ) );?>
</center></td></tr>
</td></tr>

<!-- move database project files to disk -->
<tr bgcolor="#ffffff"><td>Move project files stored in database schema to disk.</td><td><center>
<tr bgcolor="#ffffff"><td>Move project files stored in database schema to disk.</td><td class="center">
<?php html_button( 'move_db2disk.php', 'Move Project Files to Disk', array( 'doc' => 'project' ) );?>
</center></td></tr>
</td></tr>

<!-- move custom field content to standard field -->
<tr bgcolor="#ffffff"><td>Copy Custom Field to Standard Field.</td><td><center>
<tr bgcolor="#ffffff"><td>Copy Custom Field to Standard Field.</td><td class="center">
<form method="post" action="copy_field.php">
From
<SELECT name="source_id">
Expand All @@ -86,12 +86,12 @@
</SELECT>
<input type="submit" class="button" value="Copy" />
</form>
</center></td></tr>
</td></tr>

<!-- Database Statistics -->
<tr bgcolor="#ffffff"><td>Show database statistics.</td><td><center>
<tr bgcolor="#ffffff"><td>Show database statistics.</td><td class="center">
<?php html_button( 'db_stats.php', 'Display', array() );?>
</center></td></tr>
</td></tr>

</table>
<?php
Expand Down
6 changes: 3 additions & 3 deletions admin/upgrade_warning.php
Expand Up @@ -63,18 +63,18 @@

<p>Upgrades may take several minutes depending on the size of your database.</p>

<div align="center">
<div>
<table width="80%" bgcolor="#222222" border="0" cellpadding="10" cellspacing="1">
<tr bgcolor="#ffffff">
<?php
# check to see if the new installer was used
if( -1 != config_get( 'database_version', -1 ) ) {
?>
<td align="center" nowrap="nowrap"><p>When you have backed up your database click the link below to continue</p>[ <a href="install.php">Upgrade Now</a> ]</td>
<td nowrap="nowrap"><p>When you have backed up your database click the link below to continue</p>[ <a href="install.php">Upgrade Now</a> ]</td>
<?php
}
else {?>
<td align="center" nowrap="nowrap"><p>You aware to be running an old (pre 1.1.0) release of MantisBT. To update to this release of mantis, you must first update your installation to 1.1</td>
<td nowrap="nowrap"><p>You aware to be running an old (pre 1.1.0) release of MantisBT. To update to this release of mantis, you must first update your installation to 1.1</td>
<?php
}?>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion bug_actiongroup.php
Expand Up @@ -337,7 +337,7 @@
if ( count( $t_failed_ids ) > 0 ) {
html_page_top();

echo '<div align="center"><br />';
echo '<div><br />';
echo '<table class="width75">';
$separator = lang_get( 'word_separator' );
foreach( $t_failed_ids as $t_id => $t_reason ) {
Expand Down
4 changes: 2 additions & 2 deletions bug_actiongroup_add_note_inc.php
Expand Up @@ -64,7 +64,7 @@ function action_add_note_print_title() {
* A row has two columns.
*/
function action_add_note_print_fields() {
echo '<tr class="row-1" valign="top"><th class="category">', lang_get( 'add_bugnote_title' ), '</th><td><textarea name="bugnote_text" cols="80" rows="10"></textarea></td></tr>';
echo '<tr class="row-1"><th class="category">', lang_get( 'add_bugnote_title' ), '</th><td><textarea name="bugnote_text" cols="80" rows="10"></textarea></td></tr>';
?>
<!-- View Status -->
<tr class="row-2">
Expand All @@ -87,7 +87,7 @@ function action_add_note_print_fields() {
</td>
</tr>
<?php
echo '<tr><td colspan="2"><center><input type="submit" class="button" value="' . lang_get( 'add_bugnote_button' ) . ' " /></center></td></tr>';
echo '<tr><td colspan="2" class="center"><input type="submit" class="button" value="' . lang_get( 'add_bugnote_button' ) . ' " /></td></tr>';
}

/**
Expand Down
2 changes: 1 addition & 1 deletion bug_actiongroup_ext.php
Expand Up @@ -102,7 +102,7 @@
if ( count( $t_failed_ids ) > 0 ) {
html_page_top();

echo '<div align="center">';
echo '<div>';

$t_word_separator = lang_get( 'word_separator' );
foreach( $t_failed_ids as $t_id => $t_reason ) {
Expand Down
2 changes: 1 addition & 1 deletion bug_actiongroup_ext_page.php
Expand Up @@ -68,7 +68,7 @@

<br />

<div align="center">
<div>
<form method="post" action="bug_actiongroup_ext.php">
<?php echo form_security_field( $t_form_name ); ?>
<input type="hidden" name="action" value="<?php echo string_attribute( $t_external_action ) ?>" />
Expand Down
2 changes: 1 addition & 1 deletion bug_actiongroup_page.php
Expand Up @@ -233,7 +233,7 @@

<br />

<div align="center">
<div>
<form method="post" action="bug_actiongroup.php">
<?php echo form_security_field( $t_form_name ); ?>
<input type="hidden" name="action" value="<?php echo string_attribute( $f_action ) ?>" />
Expand Down
4 changes: 2 additions & 2 deletions bug_actiongroup_update_product_build_inc.php
Expand Up @@ -54,8 +54,8 @@ function action_update_product_build_print_title() {
* A row has two columns.
*/
function action_update_product_build_print_fields() {
echo '<tr class="row-1" valign="top"><th class="category">', lang_get( 'product_build' ), '</th><td><input type="text" name="build" size="32" maxlength="32" /></td></tr>';
echo '<tr><td colspan="2"><center><input type="submit" class="button" value="' . lang_get( 'actiongroup_menu_update_product_build' ) . ' " /></center></td></tr>';
echo '<tr class="row-1"><th class="category">', lang_get( 'product_build' ), '</th><td><input type="text" name="build" size="32" maxlength="32" /></td></tr>';
echo '<tr><td colspan="2" class="center"><input type="submit" class="button" value="' . lang_get( 'actiongroup_menu_update_product_build' ) . ' " /></td></tr>';
}

/**
Expand Down
4 changes: 2 additions & 2 deletions bug_actiongroup_update_severity_inc.php
Expand Up @@ -56,12 +56,12 @@ function action_update_severity_print_title() {
* A row has two columns.
*/
function action_update_severity_print_fields() {
echo '<tr class="row-1" valign="top"><th class="category">';
echo '<tr class="row-1"><th class="category">';
echo lang_get( 'update_severity_msg' );
echo '</th><td><select name="severity">';
print_enum_string_option_list( 'severity' );
echo '</select></td></tr>';
echo '<tr><td colspan="2"><center><input type="submit" class="button" value="' . lang_get( 'update_severity_button' ) . ' " /></center></td></tr>';
echo '<tr><td colspan="2" class="center"><input type="submit" class="button" value="' . lang_get( 'update_severity_button' ) . ' " /></td></tr>';
}

/**
Expand Down
2 changes: 1 addition & 1 deletion bug_change_status_page.php
Expand Up @@ -137,7 +137,7 @@
?>

<br />
<div align="center">
<div>
<form id="bug-change-status-form" name="bug_change_status_form" method="post" action="bug_update.php">
<?php echo form_security_field( 'bug_update' ) ?>
<table class="width75" cellspacing="1">
Expand Down
2 changes: 1 addition & 1 deletion bug_file_add.php
Expand Up @@ -87,7 +87,7 @@
html_page_top( null, $t_redirect_url );
?>
<br />
<div align="center">
<div>
<?php
echo lang_get( 'operation_successful' ) . '<br />';
print_bracket_link( $t_redirect_url, lang_get( 'proceed' ) );
Expand Down
2 changes: 1 addition & 1 deletion bug_reminder.php
Expand Up @@ -110,7 +110,7 @@
html_page_top( null, string_get_bug_view_url( $f_bug_id ) );
?>
<br />
<div align="center">
<div>
<?php
echo lang_get( 'operation_successful' ).'<br />';
print_bracket_link( string_get_bug_view_url( $f_bug_id ), lang_get( 'proceed' ) );
Expand Down

0 comments on commit 90cc5cc

Please sign in to comment.