Skip to content

Commit

Permalink
Make Manage Project Create and Edit pages consistent
Browse files Browse the repository at this point in the history
The following changes were made:

 - Display the fields in the same order
 - Make the fields identical length
 - Display the "required" star next to project name
 - Use identical variable names

Fixes #14725
  • Loading branch information
dregad committed Sep 21, 2012
1 parent 33dfba5 commit e90ef63
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 37 deletions.
46 changes: 24 additions & 22 deletions manage_proj_create_page.php
Expand Up @@ -74,9 +74,9 @@
echo lang_get( 'add_project_title' );
} ?></span></legend>

<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
<div class="field-container <?php echo helper_alternate_class_no_attribute() ?>">
<label for="project-name" class="required"><span><?php echo lang_get( 'project_name' )?></span></label>
<span class="input"><input type="text" id="project-name" name="name" size="64" maxlength="128" /></span>
<span class="input"><input type="text" id="project-name" name="name" size="60" maxlength="128" /></span>
<span class="label-style"></span>
</div>
<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
Expand All @@ -88,15 +88,6 @@
</span>
<span class="label-style"></span>
</div>
<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
<label for="project-view-state"><span><?php echo lang_get( 'view_status' ) ?></span></label>
<span class="select">
<select id="project-view-state" name="view_state">
<?php print_enum_string_option_list( 'view_state' ) ?>
</select>
</span>
<span class="label-style"></span>
</div>
<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
<label for="project-inherit-global"><span><?php echo lang_get( 'inherit_global' ) ?></span></label>
<span class="checkbox"><input type="checkbox" id="project-inherit-global" name="inherit_global" checked="checked" /></span>
Expand All @@ -108,25 +99,36 @@
<span class="checkbox"><input type="checkbox" id="project-inherit-parent" name="inherit_parent" checked="checked" /></span>
<span class="label-style"></span>
</div><?php
}
} ?>

<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
<label for="project-view-state"><span><?php echo lang_get( 'view_status' ) ?></span></label>
<span class="select">
<select id="project-view-state" name="view_state">
<?php print_enum_string_option_list( 'view_state' ) ?>
</select>
</span>
<span class="label-style"></span>
</div>
<?php

$g_project_override = ALL_PROJECTS;
if ( file_is_uploading_enabled() && DATABASE !== config_get( 'file_upload_method' ) ) {
$t_default_upload_path = '';
if( file_is_uploading_enabled() && DATABASE !== config_get( 'file_upload_method' ) ) {
$t_file_path = '';
# Don't reveal the absolute path to non-administrators for security reasons
if ( current_user_is_administrator() ) {
$t_default_upload_path = config_get( 'absolute_path_default_upload_folder' );
$t_file_path = config_get( 'absolute_path_default_upload_folder' );
}
?>
<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
<label for="project-file-path"><span><?php echo lang_get( 'upload_file_path' ) ?></span></label>
<span class="input"><input type="text" id="project-file-path" name="file_path" size="70" maxlength="250" value="<?php echo $t_default_upload_path ?>" /></span>
<span class="label-style"></span>
</div><?php
?>
<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
<label for="project-file-path"><span><?php echo lang_get( 'upload_file_path' ) ?></span></label>
<span class="input"><input type="text" id="project-file-path" name="file_path" size="60" maxlength="250" value="<?php echo $t_file_path ?>" /></span>
<span class="label-style"></span>
</div><?php
} ?>
<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
<label for="project-description"><span><?php echo lang_get( 'description' ) ?></span></label>
<span class="textarea"><textarea id="project-description" name="description" cols="60" rows="5"></textarea></span>
<span class="textarea"><textarea id="project-description" name="description" cols="70" rows="5"></textarea></span>
<span class="label-style"></span>
</div>

Expand Down
29 changes: 14 additions & 15 deletions manage_proj_edit_page.php
Expand Up @@ -98,8 +98,8 @@
<?php echo form_security_field( 'manage_proj_update' ) ?>
<input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" />
<div class="field-container <?php echo helper_alternate_class_no_attribute() ?>">
<label for="project-name"><span><?php echo lang_get( 'project_name' ) ?></span></label>
<span class="input"><input type="text" id="project-name" name="name" size="50" maxlength="128" value="<?php echo string_attribute( $row['name'] ) ?>" /></span>
<label for="project-name" class="required"><span><?php echo lang_get( 'project_name' ) ?></span></label>
<span class="input"><input type="text" id="project-name" name="name" size="60" maxlength="128" value="<?php echo string_attribute( $row['name'] ) ?>" /></span>
<span class="label-style"></span>
</div>
<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
Expand Down Expand Up @@ -132,23 +132,22 @@
</div>
<?php
$g_project_override = $f_project_id;
if( file_is_uploading_enabled() && DATABASE !== config_get( 'file_upload_method' ) ) { ?>
<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
<label for="project-file-path"><span><?php echo lang_get( 'upload_file_path' ) ?></span></label>
<?php
$t_file_path = $row['file_path'];
# Don't reveal the absolute path to non-administrators for security reasons
if ( is_blank( $t_file_path ) && current_user_is_administrator() ) {
$t_file_path = config_get( 'absolute_path_default_upload_folder' );
}
if( file_is_uploading_enabled() && DATABASE !== config_get( 'file_upload_method' ) ) {
$t_file_path = $row['file_path'];
# Don't reveal the absolute path to non-administrators for security reasons
if ( is_blank( $t_file_path ) && current_user_is_administrator() ) {
$t_file_path = config_get( 'absolute_path_default_upload_folder' );
}
?>
<span class="input"><input type="text" id="project-file-path" name="file_path" size="50" maxlength="250" value="<?php echo string_attribute( $t_file_path ) ?>" /></span>
<span class="label-style"></span>
</div><?php
<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
<label for="project-file-path"><span><?php echo lang_get( 'upload_file_path' ) ?></span></label>
<span class="input"><input type="text" id="project-file-path" name="file_path" size="60" maxlength="250" value="<?php echo string_attribute( $t_file_path ) ?>" /></span>
<span class="label-style"></span>
</div><?php
} ?>
<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
<label for="project-description"><span><?php echo lang_get( 'description' ) ?></span></label>
<span class="textarea"><textarea id="project-description" name="description" cols="60" rows="5"><?php echo string_textarea( $row['description'] ) ?></textarea></span>
<span class="textarea"><textarea id="project-description" name="description" cols="70" rows="5"><?php echo string_textarea( $row['description'] ) ?></textarea></span>
<span class="label-style"></span>
</div>

Expand Down

0 comments on commit e90ef63

Please sign in to comment.