Skip to content

Commit

Permalink
Manage project page, safe copy from/to forms
Browse files Browse the repository at this point in the history
In manage project edit page, make the forms in each section for copying
items to/from other projects to not have an initial project as selected,
and make the selection as required.
This avoid to accidentally use this actions, without having made an
explicit selection in them.

Fixes: #25368
  • Loading branch information
cproensa authored and dregad committed Mar 3, 2019
1 parent e504944 commit f37dffa
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions manage_proj_edit_page.php
Expand Up @@ -390,7 +390,8 @@
<fieldset>
<?php echo form_security_field( 'manage_proj_cat_copy' ) ?>
<input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" />
<select name="other_project_id" class="input-sm">
<select name="other_project_id" class="input-sm" required>
<option selected disabled value=""><?php echo '[', lang_get( 'select_project_button' ), ']' ?></option>
<?php print_project_option_list( null, false, $f_project_id ); ?>
</select>
<input type="submit" name="copy_from" class="btn btn-sm btn-primary btn-white btn-round" value="<?php echo lang_get( 'copy_categories_from' ) ?>" />
Expand Down Expand Up @@ -479,7 +480,8 @@
<fieldset>
<?php echo form_security_field( 'manage_proj_ver_copy' ) ?>
<input type="hidden" class="form-control input-sm" name="project_id" value="<?php echo $f_project_id ?>" />
<select name="other_project_id" class="input-sm">
<select name="other_project_id" class="input-sm" required>
<option selected disabled value=""><?php echo '[', lang_get( 'select_project_button' ), ']' ?></option>
<?php print_project_option_list( null, false, $f_project_id ); ?>
</select>
<input type="submit" name="copy_from" class="btn btn-sm btn-primary btn-white btn-round" value="<?php echo lang_get( 'copy_versions_from' ) ?>" />
Expand Down Expand Up @@ -585,7 +587,8 @@
<fieldset>
<?php echo form_security_field( 'manage_proj_custom_field_copy' ) ?>
<input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" />
<select name="other_project_id" class="input-sm">
<select name="other_project_id" class="input-sm" required>
<option selected disabled value=""><?php echo '[', lang_get( 'select_project_button' ), ']' ?></option>
<?php print_project_option_list( null, false, $f_project_id ); ?>
</select>
<input type="submit" name="copy_from" class="btn btn-sm btn-primary btn-white btn-round" value="<?php echo lang_get( 'copy_from' ) ?>" />
Expand Down Expand Up @@ -705,7 +708,8 @@
<fieldset>
<?php echo form_security_field( 'manage_proj_user_copy' ) ?>
<input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" />
<select name="other_project_id" class="input-sm">
<select name="other_project_id" class="input-sm" required>
<option selected disabled value=""><?php echo '[', lang_get( 'select_project_button' ), ']' ?></option>
<?php print_project_option_list( null, false, $f_project_id ); ?>
</select>
<span class=form-inline">
Expand Down Expand Up @@ -743,9 +747,9 @@
<label><?php echo lang_get( 'show' ) ?>
<input id="input-per-page" type="text" min="5" size="2" class="input-sm" value="<?php echo config_get( 'default_limit_view' ) ?>"/>
</label>
<span>
<label>
&nbsp;(<?php echo lang_get( 'total' ), ': ', $t_users_count, ' ', lang_get( 'users_link' ) ?>)
</span>
</label>
</div>
<div class="btn-group pull-right">
<ul class="pagination small no-margin"></ul>
Expand Down

0 comments on commit f37dffa

Please sign in to comment.