Skip to content

Commit

Permalink
CSS class renamed from 'has-required' to 'required'
Browse files Browse the repository at this point in the history
There was an inconsistency in the class name used to flag mandatory
fields. The fields use 'required' class to display a red asterisk next
to the label, while the parent fieldset relied on 'has-required' to
display the '* required' legend at the bottom of the form.

This caused password fields in account_page.php (which are only required
in specific contexts, e.g.  when changing a new account's password after
verification) not to be flagged with the red asterisk.

We now consistently use 'required'.

Fixes #20395
  • Loading branch information
dregad committed Jan 1, 2016
1 parent f3f7572 commit 892d350
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion account_page.php
Expand Up @@ -132,7 +132,7 @@

$t_force_pw_reset_html = '';
if( $t_force_pw_reset ) {
$t_force_pw_reset_html = ' class="has-required"';
$t_force_pw_reset_html = ' class="required"';
}
?>

Expand Down
2 changes: 1 addition & 1 deletion account_prof_menu_page.php
Expand Up @@ -86,7 +86,7 @@
?>
<div id="account-profile-div" class="form-container">
<form id="account-profile-form" method="post" action="account_prof_update.php">
<fieldset class="has-required">
<fieldset class="required">
<legend><span><?php echo lang_get( 'add_profile_title' ) ?></span></legend>
<?php echo form_security_field( 'profile_update' )?>
<input type="hidden" name="action" value="add" />
Expand Down
2 changes: 1 addition & 1 deletion bug_report_page.php
Expand Up @@ -232,7 +232,7 @@
?>
<div id="report-bug-div" class="form-container">
<form id="report-bug-form" method="post" <?php echo $t_form_encoding; ?> action="bug_report.php?posted=1">
<fieldset class="has-required">
<fieldset class="required">
<legend><span><?php echo lang_get( 'enter_report_details_title' ) ?></span></legend>
<?php echo form_security_field( 'bug_report' ) ?>
<input type="hidden" name="m_id" value="<?php echo $f_master_bug_id ?>" />
Expand Down
2 changes: 1 addition & 1 deletion css/common_config.php
Expand Up @@ -56,7 +56,7 @@
* should only be known internally to the server.
*/
?>
div.form-container fieldset.has-required:after {
div.form-container fieldset.required:after {
position: absolute;
margin: -1.75em 0em 0em .5em;
font-size: 8pt;
Expand Down
2 changes: 1 addition & 1 deletion manage_columns_inc.php
Expand Up @@ -80,7 +80,7 @@

<div id="manage-columns-div" class="form-container">
<form id="manage-columns-form" method="post" action="manage_config_columns_set.php">
<fieldset class="has-required">
<fieldset class="required">
<legend><span><?php echo lang_get( 'manage_columns_config' ) ?></span></legend>
<?php
if( $t_account_page ) {
Expand Down
2 changes: 1 addition & 1 deletion manage_proj_create_page.php
Expand Up @@ -69,7 +69,7 @@

<div id="manage-project-create-div" class="form-container">
<form method="post" id="manage-project-create-form" action="manage_proj_create.php">
<fieldset class="has-required"><?php
<fieldset class="required"><?php
echo form_security_field( 'manage_proj_create' );
if( null !== $f_parent_id ) {
$f_parent_id = (int)$f_parent_id; ?>
Expand Down
2 changes: 1 addition & 1 deletion manage_tags_page.php
Expand Up @@ -164,7 +164,7 @@
<div id="manage-tags-create-div" class="form-container">
<a name="tagcreate" />
<form id="manage-tags-create-form" method="post" action="tag_create.php">
<fieldset class="has-required">
<fieldset class="required">
<legend><span><?php echo lang_get( 'tag_create' ) ?></span></legend>
<?php echo form_security_field( 'tag_create' ); ?>
<div class="field-container">
Expand Down
2 changes: 1 addition & 1 deletion news_edit_page.php
Expand Up @@ -93,7 +93,7 @@

<div id="news-update-div" class="form-container">
<form id="news-update-form" method="post" action="news_update.php">
<fieldset class="has-required">
<fieldset class="required">
<legend><span><?php echo lang_get( 'headline' ) ?></span></legend>
<div class="section-link"><?php print_bracket_link( 'news_menu_page.php', lang_get( 'go_back' ) ) ?></div>
<?php echo form_security_field( 'news_update' ); ?>
Expand Down
2 changes: 1 addition & 1 deletion news_menu_page.php
Expand Up @@ -54,7 +54,7 @@

<div id="news-add-div" class="form-container">
<form id="news-add-form" method="post" action="news_add.php">
<fieldset class="has-required">
<fieldset class="required">
<legend><span><?php echo lang_get( 'add_news_title' ) ?></span></legend>
<?php echo form_security_field( 'news_add' ); ?>
<div class="field-container">
Expand Down

0 comments on commit 892d350

Please sign in to comment.