| [ Index ] |
PHP Cross Reference of MantisBT |
[Summary view] [Print] [Text view]
1 <?php 2 # MantisBT - A PHP based bugtracking system 3 4 # MantisBT is free software: you can redistribute it and/or modify 5 # it under the terms of the GNU General Public License as published by 6 # the Free Software Foundation, either version 2 of the License, or 7 # (at your option) any later version. 8 # 9 # MantisBT is distributed in the hope that it will be useful, 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 # GNU General Public License for more details. 13 # 14 # You should have received a copy of the GNU General Public License 15 # along with MantisBT. If not, see <http://www.gnu.org/licenses/>. 16 17 /** 18 * @package MantisBT 19 * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org 20 * @copyright Copyright (C) 2002 - 2011 MantisBT Team - mantisbt-dev@lists.sourceforge.net 21 * @link http://www.mantisbt.org 22 * 23 * @uses core.php 24 * @uses access_api.php 25 * @uses authentication_api.php 26 * @uses config_api.php 27 * @uses custom_field_api.php 28 * @uses form_api.php 29 * @uses gpc_api.php 30 * @uses helper_api.php 31 * @uses html_api.php 32 * @uses lang_api.php 33 * @uses print_api.php 34 * @uses string_api.php 35 */ 36 37 /** 38 * MantisBT Core API's 39 */ 40 require_once ( 'core.php' ); 41 require_api( 'access_api.php' ); 42 require_api( 'authentication_api.php' ); 43 require_api( 'config_api.php' ); 44 require_api( 'custom_field_api.php' ); 45 require_api( 'form_api.php' ); 46 require_api( 'gpc_api.php' ); 47 require_api( 'helper_api.php' ); 48 require_api( 'html_api.php' ); 49 require_api( 'lang_api.php' ); 50 require_api( 'print_api.php' ); 51 require_api( 'string_api.php' ); 52 53 auth_reauthenticate(); 54 55 access_ensure_global_level( config_get( 'manage_custom_fields_threshold' ) ); 56 57 $f_field_id = gpc_get_int( 'field_id' ); 58 $f_return = strip_tags( gpc_get_string( 'return', 'manage_custom_field_page.php' ) ); 59 60 custom_field_ensure_exists( $f_field_id ); 61 62 html_page_top(); 63 64 print_manage_menu( 'manage_custom_field_edit_page.php' ); 65 66 $t_definition = custom_field_get_definition( $f_field_id ); 67 ?> 68 69 <div id="manage-custom-field-update-div" class="form-container"> 70 <form id="manage-custom-field-update-form" method="post" action="manage_custom_field_update.php"> 71 <fieldset> 72 <legend><span><?php echo lang_get( 'edit_custom_field_title' ) ?></span></legend> 73 <?php echo form_security_field( 'manage_custom_field_update' ); ?> 74 <input type="hidden" name="field_id" value="<?php echo $f_field_id ?>" /> 75 <input type="hidden" name="return" value="<?php echo $f_return ?>" /> 76 <div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>"> 77 <label for="custom-field-name"><span><?php echo lang_get( 'custom_field_name' ) ?></span></label> 78 <span class="input"><input type="text" id="custom-field-name" name="name" size="32" maxlength="64" value="<?php echo string_attribute( $t_definition['name'] ) ?>" /></span> 79 <span class="label-style"></span> 80 </div> 81 <div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>"> 82 <label for="custom-field-type"><span><?php echo lang_get( 'custom_field_type' ) ?></span></label> 83 <span class="select"> 84 <select id="custom-field-type" name="type"> 85 <?php print_enum_string_option_list( 'custom_field_type', $t_definition['type'] ) ?> 86 </select> 87 </span> 88 <span class="label-style"></span> 89 </div> 90 <div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>"> 91 <label for="custom-field-possible-values"><span><?php echo lang_get( 'custom_field_possible_values' ) ?></span></label> 92 <span class="input"><input type="text" id="custom-field-possible-values" name="possible_values" size="32" value="<?php echo string_attribute( $t_definition['possible_values'] ) ?>" /></span> 93 <span class="label-style"></span> 94 </div> 95 <div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>"> 96 <label for="custom-field-default-value"><span><?php echo lang_get( 'custom_field_default_value' ) ?></span></label> 97 <span class="input"><input type="text" id="custom-field-default-value" name="default_value" size="32" maxlength="255" value="<?php echo string_attribute( $t_definition['default_value'] ) ?>" /></span> 98 <span class="label-style"></span> 99 </div> 100 <div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>"> 101 <label for="custom-field-valid-regexp"><span><?php echo lang_get( 'custom_field_valid_regexp' ) ?></span></label> 102 <span class="input"><input type="text" id="custom-field-valid-regexp" name="valid_regexp" size="32" maxlength="255" value="<?php echo string_attribute( $t_definition['valid_regexp'] ) ?>" /></span> 103 <span class="label-style"></span> 104 </div> 105 <div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>"> 106 <label for="custom-field-access-level-r"><span><?php echo lang_get( 'custom_field_access_level_r' ) ?></span></label> 107 <span class="select"> 108 <select id="custom-field-access-level-r" name="access_level_r"> 109 <?php print_enum_string_option_list( 'access_levels', $t_definition['access_level_r'] ) ?> 110 </select> 111 </span> 112 <span class="label-style"></span> 113 </div> 114 <div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>"> 115 <label for="custom-field-access-level-rw"><span><?php echo lang_get( 'custom_field_access_level_rw' ) ?></span></label> 116 <span class="select"> 117 <select id="custom-field-access-level-rw" name="access_level_rw"> 118 <?php print_enum_string_option_list( 'access_levels', $t_definition['access_level_rw'] ) ?> 119 </select> 120 </span> 121 <span class="label-style"></span> 122 </div> 123 <div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>"> 124 <label for="custom-field-length-min"><span><?php echo lang_get( 'custom_field_length_min' ) ?></span></label> 125 <span class="input"><input type="text" id="custom-field-length-min" name="length_min" size="32" maxlength="64" value="<?php echo $t_definition['length_min'] ?>" /></span> 126 <span class="label-style"></span> 127 </div> 128 <div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>"> 129 <label for="custom-field-length-max"><span><?php echo lang_get( 'custom_field_length_max' ) ?></span></label> 130 <span class="input"><input type="text" id="custom-field-length-max" name="length_max" size="32" maxlength="64" value="<?php echo $t_definition['length_max'] ?>" /></span> 131 <span class="label-style"></span> 132 </div> 133 <div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>"> 134 <label for="custom-field-filter-by"><span><?php echo lang_get( 'custom_field_filter_by' ) ?></span></label> 135 <span class="checkbox"><input type="checkbox" id="custom-field-filter-by" name="filter_by" <?php if ( $t_definition['filter_by'] ) { ?>checked="checked"<?php } ?> /></span> 136 <span class="label-style"></span> 137 </div> 138 <div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>"> 139 <label for="custom-field-display-report"><span><?php echo lang_get( 'custom_field_display_report' ) ?></span></label> 140 <span class="checkbox"><input type="checkbox" id="custom-field-display-report" name="display_report" value="1" <?php check_checked( $t_definition['display_report'] ) ?> /></span> 141 <span class="label-style"></span> 142 </div> 143 <div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>"> 144 <label for="custom-field-display-update"><span><?php echo lang_get( 'custom_field_display_update' ) ?></span></label> 145 <span class="checkbox"><input type="checkbox" id="custom-field-display-update" name="display_update" value="1" <?php check_checked( $t_definition['display_update'] ) ?> /></span> 146 <span class="label-style"></span> 147 </div> 148 <div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>"> 149 <label for="custom-field-display-resolved"><span><?php echo lang_get( 'custom_field_display_resolved' ) ?></span></label> 150 <span class="checkbox"><input type="checkbox" id="custom-field-display-resolved" name="display_resolved" value="1" <?php check_checked( $t_definition['display_resolved'] ) ?> /></span> 151 <span class="label-style"></span> 152 </div> 153 <div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>"> 154 <label for="custom-field-display-closed"><span><?php echo lang_get( 'custom_field_display_closed' ) ?></span></label> 155 <span class="checkbox"><input type="checkbox" id="custom-field-display-closed" name="display_closed" value="1" <?php check_checked( $t_definition['display_closed'] ) ?> /></span> 156 <span class="label-style"></span> 157 </div> 158 <div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>"> 159 <label for="custom-field-require-report"><span><?php echo lang_get( 'custom_field_require_report' ) ?></span></label> 160 <span class="checkbox"><input type="checkbox" id="custom-field-require-report" name="require_report" value="1" <?php check_checked( $t_definition['require_report'] ) ?> /></span> 161 <span class="label-style"></span> 162 </div> 163 <div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>"> 164 <label for="custom-field-require-update"><span><?php echo lang_get( 'custom_field_require_update' ) ?></span></label> 165 <span class="checkbox"><input type="checkbox" id="custom-field-require-update" name="require_update" value="1" <?php check_checked( $t_definition['require_update'] ) ?> /></span> 166 <span class="label-style"></span> 167 </div> 168 <div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>"> 169 <label for="custom-field-require-resolved"><span><?php echo lang_get( 'custom_field_require_resolved' ) ?></span></label> 170 <span class="checkbox"><input type="checkbox" id="custom-field-require-resolved" name="require_resolved" value="1" <?php check_checked( $t_definition['require_resolved'] ) ?> /></span> 171 <span class="label-style"></span> 172 </div> 173 <div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>"> 174 <label for="custom-field-require-closed"><span><?php echo lang_get( 'custom_field_require_closed' ) ?></span></label> 175 <span class="checkbox"><input type="checkbox" id="custom-field-require-closed" name="require_closed" value="1" <?php check_checked( $t_definition['require_closed'] ) ?> /></span> 176 <span class="label-style"></span> 177 </div> 178 <span class="submit-button"><input type="submit" class="button" value="<?php echo lang_get( 'update_custom_field_button' ) ?>" /></span> 179 </fieldset> 180 </form> 181 </div> 182 183 <br /> 184 185 <div class="form-container"> 186 <form method="post" action="manage_custom_field_delete.php" class="action-button"> 187 <fieldset> 188 <?php echo form_security_field( 'manage_custom_field_delete' ); ?> 189 <input type="hidden" name="field_id" value="<?php echo $f_field_id ?>" /> 190 <input type="hidden" name="return" value="<?php echo string_attribute( $f_return ) ?>" /> 191 <input type="submit" class="button" value="<?php echo lang_get( 'delete_custom_field_button' ) ?>" /> 192 </fieldset> 193 </form> 194 </div> 195 196 <?php /** @todo There is access checking in the ADD action page and at the top of this file. 197 * We may need to add extra checks to exclude projects from the list that the user 198 * can't link/unlink fields from/to. */ 199 ?> 200 <div class="form-container"> 201 <div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>"> 202 <span class="display-label"><span><?php echo lang_get( 'link_custom_field_to_project_title' ) ?></span></span> 203 <div class="display-value"> 204 <?php print_custom_field_projects_list( $f_field_id ) ?> 205 </div> 206 <span class="label-style"></span> 207 </div> 208 <form method="post" action="manage_custom_field_proj_add.php"> 209 <fieldset> 210 <input type="hidden" name="field_id" value="<?php echo $f_field_id ?>" /> 211 <?php echo form_security_field( 'manage_custom_field_proj_add' ); ?> 212 <div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>"> 213 <label for="custom-field-project-id"><span><?php echo lang_get( 'projects_title_label' ) ?></span></label> 214 <span class="select"> 215 <select id="custom-field-project-id" name="project_id[]" multiple="multiple" size="5"> 216 <?php print_project_option_list( null, false ); ?> 217 </select> 218 </span> 219 <span class="label-style"></span> 220 </div> 221 <div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>"> 222 <label for="custom-field-sequence"><span><?php echo lang_get( 'custom_field_sequence_label' ) ?></span></label> 223 <span class="input"><input type="text" id="custom-field-sequence" name="sequence" value="0" /></span> 224 <span class="label-style"></span> 225 </div> 226 <span class="submit-button"><input type="submit" class="button" value="<?php echo lang_get( 'link_custom_field_to_project_button' ) ?>" /></span> 227 </fieldset> 228 </form> 229 </div><?php 230 231 html_page_bottom();
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Jul 28 15:48:31 2011 | Cross-referenced by PHPXref 0.7 |