示例#1
0
/**
 * Print the entire form for attaching a tag to a bug.
 * @param integer Bug ID
 * @param string Default contents of the input box
 */
function print_tag_attach_form($p_bug_id, $p_string = '')
{
    ?>
		<small><?php 
    echo sprintf(lang_get('tag_separate_by'), config_get('tag_separator'));
    ?>
</small>
		<form method="post" action="tag_attach.php">
		<?php 
    echo form_security_field('tag_attach');
    ?>
		<input type="hidden" name="bug_id" value="<?php 
    echo $p_bug_id;
    ?>
" />
		<?php 
    print_tag_input($p_bug_id, $p_string);
    ?>
		<input type="submit" value="<?php 
    echo lang_get('tag_attach');
    ?>
" class="button" />
		</form>
		<?php 
    return true;
}
/**
 * Prints the table and form for the Attach Tags group action page.
 */
function action_attach_tags_print_fields()
{
    echo '<tr ', helper_alternate_class(), '><td class="category">', lang_get('tag_attach_long'), '</td><td>';
    print_tag_input();
    echo '<input type="submit" class="button" value="' . lang_get('tag_attach') . ' " /></td></tr>';
}
示例#3
0
				</span>
				<span class="label-style"></span>
			</div>
<?php 
}
# Display tags fields
if ($t_show_tags) {
    ?>
		<div class="field-container">
			<label><span><?php 
    echo lang_get('tag_attach_long');
    ?>
</span></label>
			<span class="input">
				<label><?php 
    print_tag_input('');
    ?>
</label>
				</span>
			<span class="label-style"></span>
		</div>

<?php 
}
$t_custom_fields_found = false;
$t_related_custom_field_ids = custom_field_get_linked_ids($t_project_id);
foreach ($t_related_custom_field_ids as $t_id) {
    $t_def = custom_field_get_definition($t_id);
    if (($t_def['display_report'] || $t_def['require_report']) && custom_field_has_write_access_to_project($t_id, $t_project_id)) {
        $t_custom_fields_found = true;
        $t_required_class = $t_def['require_report'] ? 'class="required" ' : '';
示例#4
0
        }
        $t_tag_string .= $t_tag_row['name'];
    }
    ?>
	<tr class="spacer"><td colspan="2"></td></tr>
	<tr <?php 
    echo helper_alternate_class();
    ?>
>
	<td class="category"><?php 
    echo lang_get('tag_attach_long');
    ?>
</td>
	<td>
<?php 
    print_tag_input($f_bug_id, $t_tag_string);
    ?>
	
	</td>
	</tr>
</table>
<?php 
    html_page_bottom1(__FILE__);
} else {
    foreach ($t_tags_create as $t_tag_row) {
        $t_tag_row['id'] = tag_create($t_tag_row['name'], $t_user_id);
        $t_tags_attach[] = $t_tag_row;
    }
    foreach ($t_tags_attach as $t_tag_row) {
        if (!tag_bug_is_attached($t_tag_row['id'], $f_bug_id)) {
            tag_bug_attach($t_tag_row['id'], $f_bug_id, $t_user_id);
    <?php 
if ($tpl_can_attach_tag) {
    ?>
        <tr <?php 
    echo helper_alternate_class();
    ?>
>
          <td class="category">
            <?php 
    echo lang_get('tags');
    ?>
          </td>
          <td>
            <?php 
    print_tag_input($p_bug_id, $p_string);
    ?>
          </td>
        </tr>
    <?php 
}
?>

    <?php 
if ($tpl_show_additional_info) {
    ?>
      <tr <?php 
    echo helper_alternate_class();
    ?>
>
        <td class="category">