[ Index ]
 

Code source de Mantis 1.1.0rc3

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/ -> manage_custom_field_edit_page.php (source)

   1  <?php
   2  # Mantis - a php based bugtracking system
   3  
   4  # Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
   5  # Copyright (C) 2002 - 2007  Mantis Team   - mantisbt-dev@lists.sourceforge.net
   6  
   7  # Mantis is free software: you can redistribute it and/or modify
   8  # it under the terms of the GNU General Public License as published by
   9  # the Free Software Foundation, either version 2 of the License, or
  10  # (at your option) any later version.
  11  #
  12  # Mantis is distributed in the hope that it will be useful,
  13  # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15  # GNU General Public License for more details.
  16  #
  17  # You should have received a copy of the GNU General Public License
  18  # along with Mantis.  If not, see <http://www.gnu.org/licenses/>.
  19  
  20      # --------------------------------------------------------
  21      # $Id: manage_custom_field_edit_page.php,v 1.26.2.1 2007-10-13 22:33:28 giallu Exp $
  22      # --------------------------------------------------------
  23  
  24      require_once ( 'core.php' );
  25  
  26      $t_core_path = config_get( 'core_path' );
  27  
  28      require_once( $t_core_path.'custom_field_api.php' );
  29  
  30      auth_reauthenticate();
  31  
  32      access_ensure_global_level( config_get( 'manage_custom_fields_threshold' ) );
  33  
  34      $f_field_id    = gpc_get_int( 'field_id' );
  35      $f_return    = strip_tags( gpc_get_string( 'return', 'manage_custom_field_page.php' ) );
  36  
  37      custom_field_ensure_exists( $f_field_id );
  38  
  39      html_page_top1();
  40      html_page_top2();
  41  
  42      print_manage_menu( 'manage_custom_field_edit_page.php' );
  43  
  44      $t_definition = custom_field_get_definition( $f_field_id );
  45  ?>
  46  <br />
  47  <div align="center">
  48  <form method="post" action="manage_custom_field_update.php">
  49      <input type="hidden" name="field_id" value="<?php echo $f_field_id ?>" />
  50      <input type="hidden" name="return" value="<?php echo $f_return ?>" />
  51  
  52      <table class="width50" cellspacing="1">
  53          <tr>
  54              <td class="form-title" colspan="2">
  55                  <?php echo lang_get( 'edit_custom_field_title' ) ?>
  56              </td>
  57          </tr>
  58          <tr <?php echo helper_alternate_class() ?>>
  59              <td class="category">
  60                  <?php echo lang_get( 'custom_field_name' ) ?>
  61              </td>
  62              <td>
  63                  <input type="text" name="name" size="32" maxlength="64" value="<?php echo string_attribute( $t_definition['name'] ) ?>" />
  64              </td>
  65          </tr>
  66          <tr <?php echo helper_alternate_class() ?>>
  67              <td class="category">
  68                  <?php echo lang_get( 'custom_field_type' ) ?>
  69              </td>
  70              <td>
  71                  <select name="type">
  72                      <?php print_enum_string_option_list( 'custom_field_type', $t_definition['type'] ) ?>
  73                  </select>
  74              </td>
  75          </tr>
  76          <tr <?php echo helper_alternate_class() ?>>
  77              <td class="category">
  78                  <?php echo lang_get( 'custom_field_possible_values' ) ?>
  79              </td>
  80              <td>
  81                  <input type="text" name="possible_values" size="32" maxlength="255" value="<?php echo string_attribute( $t_definition['possible_values'] ) ?>" />
  82              </td>
  83          </tr>
  84          <tr <?php echo helper_alternate_class() ?>>
  85              <td class="category">
  86                  <?php echo lang_get( 'custom_field_default_value' ) ?>
  87              </td>
  88              <td>
  89                  <input type="text" name="default_value" size="32" maxlength="255" value="<?php echo string_attribute( $t_definition['default_value'] ) ?>" />
  90              </td>
  91          </tr>
  92          <tr <?php echo helper_alternate_class() ?>>
  93              <td class="category">
  94                  <?php echo lang_get( 'custom_field_valid_regexp' ) ?>
  95              </td>
  96              <td>
  97                  <input type="text" name="valid_regexp" size="32" maxlength="255" value="<?php echo string_attribute( $t_definition['valid_regexp'] ) ?>" />
  98              </td>
  99          </tr>
 100          <tr <?php echo helper_alternate_class() ?>>
 101              <td class="category">
 102                  <?php echo lang_get( 'custom_field_access_level_r' ) ?>
 103              </td>
 104              <td>
 105                  <select name="access_level_r">
 106                      <?php print_enum_string_option_list( 'access_levels', $t_definition['access_level_r'] ) ?>
 107                  </select>
 108              </td>
 109          </tr>
 110          <tr <?php echo helper_alternate_class() ?>>
 111              <td class="category">
 112                  <?php echo lang_get( 'custom_field_access_level_rw' ) ?>
 113              </td>
 114              <td>
 115                  <select name="access_level_rw">
 116                      <?php print_enum_string_option_list( 'access_levels', $t_definition['access_level_rw'] ) ?>
 117                  </select>
 118              </td>
 119          </tr>
 120          <tr <?php echo helper_alternate_class() ?>>
 121              <td class="category">
 122                  <?php echo lang_get( 'custom_field_length_min' ) ?>
 123              </td>
 124              <td>
 125                  <input type="text" name="length_min" size="32" maxlength="64" value="<?php echo $t_definition['length_min'] ?>" />
 126              </td>
 127          </tr>
 128          <tr <?php echo helper_alternate_class() ?>>
 129              <td class="category">
 130                  <?php echo lang_get( 'custom_field_length_max' ) ?>
 131              </td>
 132              <td>
 133                  <input type="text" name="length_max" size="32" maxlength="64" value="<?php echo $t_definition['length_max'] ?>" />
 134              </td>
 135          </tr>
 136          <tr <?php echo helper_alternate_class() ?>>
 137              <td class="category">
 138                  <?php echo lang_get( 'custom_field_advanced' ) ?>
 139              </td>
 140              <td>
 141                  <input type="checkbox" name="advanced" value="1" <?php check_checked( $t_definition['advanced'] ) ?> />
 142              </td>
 143          </tr>
 144          <tr <?php echo helper_alternate_class() ?>>
 145              <td class="category">
 146                  <?php echo lang_get( 'custom_field_display_report' ) ?>
 147              </td>
 148              <td>
 149                  <input type="checkbox" name="display_report" value="1" <?php check_checked( $t_definition['display_report'] ) ?> />
 150              </td>
 151          </tr>
 152          <tr <?php echo helper_alternate_class() ?>>
 153              <td class="category">
 154                  <?php echo lang_get( 'custom_field_display_update' ) ?>
 155              </td>
 156              <td>
 157                  <input type="checkbox" name="display_update" value="1" <?php check_checked( $t_definition['display_update'] ) ?> />
 158              </td>
 159          </tr>
 160          <tr <?php echo helper_alternate_class() ?>>
 161              <td class="category">
 162                  <?php echo lang_get( 'custom_field_display_resolved' ) ?>
 163              </td>
 164              <td>
 165                  <input type="checkbox" name="display_resolved" value="1" <?php check_checked( $t_definition['display_resolved'] ) ?> />
 166              </td>
 167          </tr>
 168          <tr <?php echo helper_alternate_class() ?>>
 169              <td class="category">
 170                  <?php echo lang_get( 'custom_field_display_closed' ) ?>
 171              </td>
 172              <td>
 173                  <input type="checkbox" name="display_closed" value="1" <?php check_checked( $t_definition['display_closed'] ) ?> />
 174              </td>
 175          </tr>
 176          <tr <?php echo helper_alternate_class() ?>>
 177              <td class="category">
 178                  <?php echo lang_get( 'custom_field_require_report' ) ?>
 179              </td>
 180              <td>
 181                  <input type="checkbox" name="require_report" value="1" <?php check_checked( $t_definition['require_report'] ) ?> />
 182              </td>
 183          </tr>
 184          <tr <?php echo helper_alternate_class() ?>>
 185              <td class="category">
 186                  <?php echo lang_get( 'custom_field_require_update' ) ?>
 187              </td>
 188              <td>
 189                  <input type="checkbox" name="require_update" value="1" <?php check_checked( $t_definition['require_update'] ) ?> />
 190              </td>
 191          </tr>
 192          <tr <?php echo helper_alternate_class() ?>>
 193              <td class="category">
 194                  <?php echo lang_get( 'custom_field_require_resolved' ) ?>
 195              </td>
 196              <td>
 197                  <input type="checkbox" name="require_resolved" value="1" <?php check_checked( $t_definition['require_resolved'] ) ?> />
 198              </td>
 199          </tr>
 200          <tr <?php echo helper_alternate_class() ?>>
 201              <td class="category">
 202                  <?php echo lang_get( 'custom_field_require_closed' ) ?>
 203              </td>
 204              <td>
 205                  <input type="checkbox" name="require_closed" value="1" <?php check_checked( $t_definition['require_closed'] ) ?> />
 206              </td>
 207          </tr>
 208          <tr>
 209              <td>&nbsp;</td>
 210              <td>
 211                  <input type="submit" class="button" value="<?php echo lang_get( 'update_custom_field_button' ) ?>" />
 212              </td>
 213          </tr>
 214      </table>
 215  </form>
 216  </div>
 217  
 218  <br />
 219  
 220  <div class="border-center">
 221      <form method="post" action="manage_custom_field_delete.php">
 222          <input type="hidden" name="field_id" value="<?php echo $f_field_id ?>" />
 223          <input type="hidden" name="return" value="<?php echo string_attribute( $f_return ) ?>" />
 224          <input type="submit" class="button" value="<?php echo lang_get( 'delete_custom_field_button' ) ?>" />
 225      </form>
 226  </div>
 227  
 228  <!-- @@@ There is access checking in the ADD action page and at the top of this file.
 229           We may need to add extra checks to exclude projects from the list that the user
 230           can't link/unlink fields from/to. -->
 231  <br />
 232  <div align="center">
 233  <form method="post" action="manage_custom_field_proj_add.php">
 234  <table class="width75" cellspacing="1">
 235  <!-- Title -->
 236  <tr>
 237      <td class="form-title" colspan="2">
 238          <input type="hidden" name="field_id" value="<?php echo $f_field_id ?>" />
 239          <?php echo lang_get( 'link_custom_field_to_project_title' ) ?>
 240      </td>
 241  </tr>
 242  
 243  <!-- Assigned Projects -->
 244  <tr <?php echo helper_alternate_class( 1 ) ?> valign="top">
 245      <td class="category" width="30%">
 246          <?php echo lang_get( 'linked_projects' ) ?>:
 247      </td>
 248      <td width="70%">
 249          <?php print_custom_field_projects_list( $f_field_id ) ?>
 250      </td>
 251  </tr>
 252  
 253  <!-- Unassigend Project Selection -->
 254  <tr <?php echo helper_alternate_class() ?> valign="top">
 255      <td class="category">
 256          <?php echo lang_get( 'projects_title' ) ?>:
 257      </td>
 258      <td>
 259          <select name="project_id[]" multiple="multiple" size="5">
 260              <?php print_project_option_list( null, false ); ?>
 261          </select>
 262      </td>
 263  </tr>
 264  
 265  <!-- Sequence Number -->
 266  <tr <?php echo helper_alternate_class() ?> valign="top">
 267      <td class="category">
 268          <?php echo lang_get( 'custom_field_sequence' ) ?>:
 269      </td>
 270      <td>
 271          <input type="text" name="sequence" value="0" />
 272      </td>
 273  </tr>
 274  
 275  <!-- Submit Buttom -->
 276  <tr>
 277      <td class="center" colspan="2">
 278          <input type="submit" class="button" value="<?php echo lang_get( 'link_custom_field_to_project_button' ) ?>" />
 279      </td>
 280  </tr>
 281  </table>
 282  </form>
 283  </div>
 284  
 285  <?php html_page_bottom1( __FILE__ ) ?>


Généré le : Thu Nov 29 09:42:17 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics