2 # MantisBT - A PHP based bugtracking system
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.
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.
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/>.
19 * @copyright Copyright (C) 2002 - 2010 MantisBT Team - mantisbt-dev@lists.sourceforge.net
20 * @link http://www.mantisbt.org
23 * @uses access_api.php
25 * @uses authentication_api.php
26 * @uses compress_api.php
27 * @uses config_api.php
28 * @uses constant_inc.php
31 * @uses helper_api.php
34 * @uses prepare_api.php
36 * @uses string_api.php
41 require_once( 'core.php' );
42 require_api( 'access_api.php' );
43 require_api( 'ajax_api.php' );
44 require_api( 'authentication_api.php' );
45 require_api( 'compress_api.php' );
46 require_api( 'config_api.php' );
47 require_api( 'constant_inc.php' );
48 require_api( 'form_api.php' );
49 require_api( 'gpc_api.php' );
50 require_api( 'helper_api.php' );
51 require_api( 'html_api.php' );
52 require_api( 'lang_api.php' );
53 require_api( 'prepare_api.php' );
54 require_api( 'print_api.php' );
55 require_api( 'string_api.php' );
56 require_api( 'tag_api.php' );
57 require_api( 'user_api.php' );
61 $f_tag_id = gpc_get_int( 'tag_id' );
62 $t_tag_row = tag_get( $f_tag_id );
64 $t_name = string_display_line( $t_tag_row['name'] );
65 $t_description = string_display( $t_tag_row['description'] );
67 if ( !( access_has_global_level( config_get( 'tag_edit_threshold' ) )
68 ||
( auth_get_current_user_id() == $t_tag_row['user_id'] )
69 && access_has_global_level( config_get( 'tag_edit_own_threshold' ) ) ) )
74 html_page_top( sprintf( lang_get( 'tag_update' ), $t_name ) );
78 <form method
="post" action
="tag_update.php">
79 <?php
echo form_security_field( 'tag_update' ) ?
>
80 <table
class="width100" cellspacing
="1">
84 <td
class="form-title" colspan
="2">
85 <?php
echo sprintf( lang_get( 'tag_update' ), $t_name ) ?
>
86 <input type
="hidden" name
="tag_id" value
="<?php echo $f_tag_id ?>"/>
88 <td
class="right" colspan
="3">
89 <?php
print_bracket_link( 'tag_view_page.php?tag_id='.$f_tag_id, lang_get( 'tag_update_return' ) ); ?
>
94 <tr
class="row-category">
95 <td width
="15%"><?php
echo lang_get( 'tag_id' ) ?
></td
>
96 <td width
="25%"><?php
echo lang_get( 'tag_name' ) ?
></td
>
97 <td width
="20%"><?php
echo lang_get( 'tag_creator' ) ?
></td
>
98 <td width
="20%"><?php
echo lang_get( 'tag_created' ) ?
></td
>
99 <td width
="20%"><?php
echo lang_get( 'tag_updated' ) ?
></td
>
102 <tr
<?php
echo helper_alternate_class() ?
>>
103 <td
><?php
echo $t_tag_row['id'] ?
></td
>
104 <td
><input type
="text" <?php
echo helper_get_tab_index() ?
> name
="name" value
="<?php echo $t_name ?>"/></td
>
106 if ( access_has_global_level( config_get( 'tag_edit_threshold' ) ) ) {
107 if ( ON
== config_get( 'use_javascript' ) ) {
108 $t_username = prepare_user_name( $t_tag_row['user_id'] );
109 echo ajax_click_to_edit( $t_username, 'user_id', 'entrypoint=user_combobox&user_id=' . $t_tag_row['user_id'] . '&access_level=' . config_get( 'tag_create_threshold' ) );
111 echo '<select ', helper_get_tab_index(), ' name="user_id">';
112 print_user_option_list( $t_tag_row['user_id'], ALL_PROJECTS
, config_get( 'tag_create_threshold' ) );
116 echo string_display_line( user_get_name($t_tag_row['user_id']) );
119 <td
><?php
echo date( config_get( 'normal_date_format' ), $t_tag_row['date_created'] ) ?
> </td
>
120 <td
><?php
echo date( config_get( 'normal_date_format' ), $t_tag_row['date_updated'] ) ?
> </td
>
125 <td colspan
="5"></td
>
129 <tr
<?php
echo helper_alternate_class() ?
>>
130 <td
class="category"><?php
echo lang_get( 'tag_description' ) ?
></td
>
132 <textarea name
="description" <?php
echo helper_get_tab_index() ?
> cols
="80" rows
="6"><?php
echo string_textarea( $t_description ) ?
></textarea
>
136 <!-- Submit Button
-->
138 <td
class="center" colspan
="6">
139 <input
<?php
echo helper_get_tab_index() ?
> type
="submit" class="button" value
="<?php echo lang_get( 'tag_update_button' ) ?>" />