/
manage_proj_custom_field_edit_page.php
145 lines (137 loc) · 4.25 KB
/
manage_proj_custom_field_edit_page.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<?php
# Mantis - a php based bugtracking system
# Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
# Copyright (C) 2002 Mantis Team - mantisbt-dev@lists.sourceforge.net
# This program is distributed under the terms and conditions of the GPL
# See the README and LICENSE files for details
?>
<?php require_once( 'core.php' ) ?>
<?php login_cookie_check() ?>
<?php
check_access( MANAGER );
$f_field_id = gpc_get_int( 'f_field_id' );
$f_project_id = gpc_get_int( 'f_project_id' );
?>
<?php print_page_top1() ?>
<?php print_page_top2() ?>
<?php
print_manage_menu( 'manage_proj_custom_field_edit_page.php' );
custom_field_ensure_exists( $f_field_id );
$t_definition = custom_field_get_definition( $f_field_id )
?>
<br />
<div align="center">
<form method="post" action="manage_proj_custom_field_update.php">
<input type="hidden" name="f_project_id" value="<?php echo $f_project_id ?>" />
<input type="hidden" name="f_field_id" value="<?php echo $f_field_id ?>" />
<table class="width50" cellspacing="1">
<tr>
<td class="form-title" colspan="2">
<?php echo lang_get( 'edit_custom_field_title' ) ?>
</td>
</tr>
<tr <?php echo helper_alternate_class() ?>>
<td class="category">
<?php echo lang_get( 'custom_field_name' ) ?>
</td>
<td>
<input type="text" name="f_name" size="32" maxlength="64" value="<?php echo $t_definition['name'] ?>" />
</td>
</tr>
<tr <?php echo helper_alternate_class() ?>>
<td class="category">
<?php echo lang_get( 'custom_field_type' ) ?>
</td>
<td>
<select name="f_type">
<?php print_enum_string_option_list( 'custom_field_type', $t_definition['type'] ) ?>
</select>
</td>
</tr>
<tr <?php echo helper_alternate_class() ?>>
<td class="category">
<?php echo lang_get( 'custom_field_possible_values' ) ?>
</td>
<td>
<input type="text" name="f_possible_values" size="32" maxlength="255" value="<?php echo $t_definition['possible_values'] ?>" />
</td>
</tr>
<tr <?php echo helper_alternate_class() ?>>
<td class="category">
<?php echo lang_get( 'custom_field_default_value' ) ?>
</td>
<td>
<input type="text" name="f_default_value" size="32" maxlength="255" value="<?php echo $t_definition['default_value'] ?>" />
</td>
</tr>
<tr <?php echo helper_alternate_class() ?>>
<td class="category">
<?php echo lang_get( 'custom_field_valid_regexp' ) ?>
</td>
<td>
<input type="text" name="f_valid_regexp" size="32" maxlength="255" value="<?php echo $t_definition['valid_regexp'] ?>" />
</td>
</tr>
<tr <?php echo helper_alternate_class() ?>>
<td class="category">
<?php echo lang_get( 'custom_field_access_level_r' ) ?>
</td>
<td>
<select name="f_access_level_r">
<?php print_enum_string_option_list( 'access_levels', $t_definition['access_level_r'] ) ?>
</select>
</td>
</tr>
<tr <?php echo helper_alternate_class() ?>>
<td class="category">
<?php echo lang_get( 'custom_field_access_level_rw' ) ?>
</td>
<td>
<select name="f_access_level_rw">
<?php print_enum_string_option_list( 'access_levels', $t_definition['access_level_rw'] ) ?>
</select>
</td>
</tr>
<tr <?php echo helper_alternate_class() ?>>
<td class="category">
<?php echo lang_get( 'custom_field_length_min' ) ?>
</td>
<td>
<input type="text" name="f_length_min" size="32" maxlength="64" value="<?php echo $t_definition['length_min'] ?>" />
</td>
</tr>
<tr <?php echo helper_alternate_class() ?>>
<td class="category">
<?php echo lang_get( 'custom_field_length_max' ) ?>
</td>
<td>
<input type="text" name="f_length_max" size="32" maxlength="64" value="<?php echo $t_definition['length_max'] ?>" />
</td>
</tr>
<tr <?php echo helper_alternate_class() ?>>
<td class="category">
<?php echo lang_get( 'custom_field_advanced' ) ?>
</td>
<td>
<input type="checkbox" name="f_advanced" value="1" <?php if($t_definition['advanced']) echo 'checked'; ?>>
</td>
</tr>
<tr>
<td>
</td>
<td>
<input type="submit" value="<?php echo lang_get( 'update_custom_field_button' ) ?>" />
</td>
</tr>
</table>
</form>
</div>
<br />
<div class="border-center">
<form method="post" action="manage_proj_custom_field_delete.php">
<input type="hidden" name="f_field_id" value="<?php echo $f_field_id ?>" />
<input type="submit" value="<?php echo lang_get( 'delete_custom_field_button' ) ?>" />
</form>
</div>
<?php print_page_bot1( __FILE__ ) ?>