示例#1
0
    function reportBugFormTop($p_event, $p_project_id)
    {
        # allow to change reporter_id (if access level is higher than defined)
        $t_user_id = auth_get_current_user_id();
        $t_access_level = user_get_access_level($t_user_id, $p_project_id);
        if ($t_access_level >= plugin_config_get('select_threshold')) {
            ?>
		    
			<tr <?php 
            echo helper_alternate_class();
            ?>
>
				<td class="category" width="30%">
					<?php 
            echo lang_get('reporter');
            ?>
				</td>
				<td width="70%">
					<select <?php 
            echo helper_get_tab_index();
            ?>
 name="reporter_id">
						<?php 
            print_reporter_option_list($t_user_id, $p_project_id);
            ?>
					</select>
				</td>
			</tr>
<?php 
        }
    }
function print_status_option_list_plugin($p_select_label, $p_current_value = 0, $p_allow_close = false, $p_project_id = ALL_PROJECTS)
{
    $t_current_auth = access_get_project_level($p_project_id);
    #Changement de la fonction de récupération des statuts
    $t_enum_list = get_status_option_list_plugin($t_current_auth, $p_current_value, true, $p_allow_close, $p_project_id);
    if (count($t_enum_list) > 1) {
        # resort the list into ascending order
        ksort($t_enum_list);
        reset($t_enum_list);
        echo '<select ', helper_get_tab_index(), ' name="' . $p_select_label . '">';
        foreach ($t_enum_list as $key => $val) {
            #On ne veut pas afficher la valeur @0@
            if ($val == '@0@') {
                continue;
            }
            echo '<option value="' . $key . '"';
            check_selected($key, $p_current_value, false);
            #fix 1.3.0
            echo '>' . $val . '</option>';
        }
        echo '</select>';
    } else {
        if (count($t_enum_list) == 1) {
            echo array_pop($t_enum_list);
        } else {
            echo MantisEnum::getLabel(lang_get('status_enum_string'), $p_current_value);
        }
    }
}
示例#3
0
 function bugnote_add_form($event, $bug_id)
 {
     if ($_SERVER['PHP_SELF'] !== '/bug_update_page.php') {
         return;
     }
     echo '<tr><td class="center" colspan="6">';
     echo '<input ', helper_get_tab_index(), ' name="slack_skip" type="checkbox" >' . plugin_lang_get('skip') . '</input>';
     echo '</td></tr>';
 }
	}

	echo '</td></tr>';
}

# Time Tracking (if permitted)
if ( config_get('time_tracking_enabled') ) {
	if ( access_has_bug_level( config_get( 'time_tracking_edit_threshold' ), $tpl_bug_id ) ) {
		echo '<tr ', helper_alternate_class(), '>';
		echo '<th class="category"><label for="time_tracking">' . lang_get( 'time_tracking' ) . '</label></th>';
		echo '<td colspan="5"><input type="text" id="time_tracking" name="time_tracking" size="5" placeholder="hh:mm" /></td></tr>';
	}
}

event_signal( 'EVENT_BUGNOTE_ADD_FORM', array( $tpl_bug_id ) );

# Submit Button
if ( $tpl_bottom_buttons_enabled ) {
       echo '<tr><td class="center" colspan="6">';
       echo '<input ', helper_get_tab_index(), ' type="submit" class="button" value="', lang_get( 'update_information_button' ), '" />';
       echo '</td></tr>';
}

echo '</table></form>';

define( 'BUGNOTE_VIEW_INC_ALLOW', true );
include( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'bugnote_view_inc.php' );
html_page_bottom();

last_visited_issue( $tpl_bug_id );
if ($t_can_update_due_date) {
    $t_date_to_display = '';
    if (!date_is_null($t_bug->due_date)) {
        $t_date_to_display = date(config_get('calendar_date_format'), $t_bug->due_date);
    }
    ?>
<!-- Due date -->
			<tr>
				<th class="category">
					<?php 
    print_documentation_link('due_date');
    ?>
				</th>
				<td>
					<?php 
    echo '<input ' . helper_get_tab_index() . ' type="text" id="due_date" name="due_date" class="datetime" size="20" maxlength="16" value="' . $t_date_to_display . '" />';
    ?>
				</td>
			</tr>
<?php 
}
?>

<!-- Custom Fields -->
<?php 
/** @todo thraxisp - I undid part of the change for #5068 for #5527
 * We really need to say what fields are shown in which statusses. For now,
 * this page will show required custom fields in update mode, or
 *  display or required fields on resolve or close
 */
$t_custom_status_label = 'update';
 /**
  * @param $input
  * @param $input_value
  */
 public function printBugUpdateSelectInput($input, $input_value)
 {
     $storyboard_db_api = new storyboard_db_api();
     $values = array();
     $value_rows = $storyboard_db_api->select_all_types();
     foreach ($value_rows as $value_row) {
         $values[] = $value_row[1];
     }
     $this->printRow();
     echo '<td class="category"><label for="' . $input . '">' . plugin_lang_get($input) . '</label></td>';
     echo '<td colspan="5">';
     echo '<span class="select">';
     echo '<select ' . helper_get_tab_index() . ' id="' . $input . '" name="' . $input . '">';
     echo '<option value=""></option>';
     if (!is_null($values)) {
         foreach ($values as $value) {
             echo '<option value="' . $value . '"';
             if ($value == $input_value) {
                 echo ' selected';
             }
             echo '>' . $value . '</option>';
         }
     }
     echo '</select>&nbsp';
     echo '</td>';
     echo '</tr>';
 }
示例#7
0
function print_status_option_list($p_select_label, $p_current_value = 0, $p_allow_close = false, $p_project_id = ALL_PROJECTS)
{
    $t_current_auth = access_get_project_level($p_project_id);
    $t_enum_list = get_status_option_list($t_current_auth, $p_current_value, true, $p_allow_close, $p_project_id);
    if (count($t_enum_list) > 1) {
        # resort the list into ascending order
        ksort($t_enum_list);
        reset($t_enum_list);
        echo '<select ' . helper_get_tab_index() . ' id="' . $p_select_label . '" name="' . $p_select_label . '">';
        foreach ($t_enum_list as $key => $val) {
            echo '<option value="' . $key . '"';
            check_selected($key, $p_current_value);
            echo '>' . string_html_specialchars($val) . '</option>';
        }
        echo '</select>';
    } else {
        if (count($t_enum_list) == 1) {
            echo array_pop($t_enum_list);
        } else {
            echo MantisEnum::getLabel(lang_get('status_enum_string'), $p_current_value);
        }
    }
}
示例#8
0
/**
 *
 * @param string $p_name
 * @param string $p_format
 * @param int $p_date
 * @param bool $p_default_disable
 * @param bool $p_allow_blank
 * @param int $p_year_start
 * @param int $p_year_end
 * @return null
 * @access public
 */
function print_date_selection_set($p_name, $p_format, $p_date = 0, $p_default_disable = false, $p_allow_blank = false, $p_year_start = 0, $p_year_end = 0)
{
    $t_chars = preg_split('//', $p_format, -1, PREG_SPLIT_NO_EMPTY);
    if ($p_date != 0) {
        $t_date = preg_split('/-/', date('Y-m-d', $p_date), -1, PREG_SPLIT_NO_EMPTY);
    } else {
        $t_date = array(0, 0, 0);
    }
    $t_disable = '';
    if ($p_default_disable == true) {
        $t_disable = ' disabled="disabled"';
    }
    $t_blank_line = '';
    if ($p_allow_blank == true) {
        $t_blank_line = "<option value=\"0\"></option>";
    }
    foreach ($t_chars as $t_char) {
        if (strcmp($t_char, "M") == 0) {
            echo "<select ", helper_get_tab_index(), " name=\"" . $p_name . "_month\"{$t_disable}>";
            echo $t_blank_line;
            print_month_option_list($t_date[1]);
            echo "</select>\n";
        }
        if (strcmp($t_char, "m") == 0) {
            echo "<select ", helper_get_tab_index(), " name=\"" . $p_name . "_month\"{$t_disable}>";
            echo $t_blank_line;
            print_numeric_month_option_list($t_date[1]);
            echo "</select>\n";
        }
        if (strcasecmp($t_char, "D") == 0) {
            echo "<select ", helper_get_tab_index(), " name=\"" . $p_name . "_day\"{$t_disable}>";
            echo $t_blank_line;
            print_day_option_list($t_date[2]);
            echo "</select>\n";
        }
        if (strcasecmp($t_char, "Y") == 0) {
            echo "<select ", helper_get_tab_index(), " name=\"" . $p_name . "_year\"{$t_disable}>";
            echo $t_blank_line;
            print_year_range_option_list($t_date[0], $p_year_start, $p_year_end);
            echo "</select>\n";
        }
    }
}
function cfdef_input_textbox($p_field_def, $t_custom_field_value)
{
    echo '<input ', helper_get_tab_index(), ' type="text" name="custom_field_' . $p_field_def['id'] . '" size="80"';
    if (0 < $p_field_def['length_max']) {
        echo ' maxlength="' . $p_field_def['length_max'] . '"';
    } else {
        echo ' maxlength="255"';
    }
    echo ' value="' . string_attribute($t_custom_field_value) . '"></input>';
}
示例#10
0
function print_filter_tag_string()
{
    if (!access_has_global_level(config_get('tag_view_threshold'))) {
        return;
    }
    global $t_filter;
    $t_tag_string = $t_filter['tag_string'];
    if ($t_filter['tag_select'] != 0) {
        $t_tag_string .= is_blank($t_tag_string) ? '' : config_get('tag_separator');
        $t_tag_string .= tag_get_field($t_filter['tag_select'], 'name');
    }
    ?>
		<input type="hidden" id="tag_separator" value="<?php 
    echo config_get('tag_separator');
    ?>
" />
		<input type="text" name="tag_string" id="tag_string" size="40" value="<?php 
    echo $t_tag_string;
    ?>
" />
		<select <?php 
    echo helper_get_tab_index();
    ?>
 name="tag_select" id="tag_select">
			<?php 
    print_tag_option_list();
    ?>
		</select>
		<?php 
}
示例#11
0
function cfdef_input_textarea($p_field_def, $t_custom_field_value)
{
    echo '<textarea ', helper_get_tab_index(), ' name="custom_field_' . $p_field_def['id'] . '"';
    if (0 < $p_field_def['length_max']) {
        echo ' maxlength="' . $p_field_def['length_max'] . '"';
    } else {
        echo ' maxlength="255"';
    }
    echo 'cols="70" rows="8">' . $t_custom_field_value . '</textarea>';
}
示例#12
0
/**
 * Print <select> tag for selecting a date
 * @param string  $p_name            Name for html select field attribute.
 * @param string  $p_format          Date format e.g. YmD.
 * @param integer $p_date            Integer timestamp representing date.
 * @param boolean $p_default_disable Whether date selector is disabled.
 * @param boolean $p_allow_blank     Whether blank/null date is allowed.
 * @param integer $p_year_start      First year to display in drop down.
 * @param integer $p_year_end        Last year to display in drop down.
 * @return void
 * @access public
 */
function print_date_selection_set($p_name, $p_format, $p_date = 0, $p_default_disable = false, $p_allow_blank = false, $p_year_start = 0, $p_year_end = 0)
{
    $t_chars = preg_split('//', $p_format, -1, PREG_SPLIT_NO_EMPTY);
    if ($p_date != 0) {
        $t_date = preg_split('/-/', date('Y-m-d', $p_date), -1, PREG_SPLIT_NO_EMPTY);
    } else {
        $t_date = array(0, 0, 0);
    }
    $t_disable = '';
    if ($p_default_disable == true) {
        $t_disable = ' disabled="disabled"';
    }
    $t_blank_line = '';
    if ($p_allow_blank == true) {
        $t_blank_line = '<option value="0"></option>';
    }
    foreach ($t_chars as $t_char) {
        if (strcmp($t_char, 'M') == 0) {
            echo '<select ' . helper_get_tab_index() . ' name="' . $p_name . '_month"' . $t_disable . '>';
            echo $t_blank_line;
            print_month_option_list($t_date[1]);
            echo "</select>\n";
        }
        if (strcmp($t_char, 'm') == 0) {
            echo '<select ' . helper_get_tab_index() . ' name="' . $p_name . '_month"' . $t_disable . '>';
            echo $t_blank_line;
            print_month_option_list($t_date[1]);
            echo '</select>' . "\n";
        }
        if (strcasecmp($t_char, 'D') == 0) {
            echo '<select ' . helper_get_tab_index() . ' name="' . $p_name . '_day"' . $t_disable . '>';
            echo $t_blank_line;
            print_day_option_list($t_date[2]);
            echo '</select>' . "\n";
        }
        if (strcasecmp($t_char, 'Y') == 0) {
            echo '<select ' . helper_get_tab_index() . ' name="' . $p_name . '_year"' . $t_disable . '>';
            echo $t_blank_line;
            print_year_range_option_list($t_date[0], $p_year_start, $p_year_end);
            echo '</select>' . "\n";
        }
    }
}
示例#13
0
				<span class="label-style"></span>
			</div>

			<div class="field-container">
				<label><span><?php echo lang_get( 'copy_from_parent' ) ?></span></label>
				<span class="input">
					<label><input <?php echo helper_get_tab_index() ?> type="checkbox" id="copy_notes_from_parent" name="copy_notes_from_parent" <?php check_checked( $f_copy_notes_from_parent ) ?> /> <?php echo lang_get( 'copy_notes_from_parent' ) ?></label>
					<label><input <?php echo helper_get_tab_index() ?> type="checkbox" id="copy_attachments_from_parent" name="copy_attachments_from_parent" <?php check_checked( $f_copy_attachments_from_parent ) ?> /> <?php echo lang_get( 'copy_attachments_from_parent' ) ?></label>
				</span>
				<span class="label-style"></span>
			</div>
<?php
	}
?>
			<div class="field-container">
				<label><span><?php print_documentation_link( 'report_stay' ) ?></span></label>
				<span class="input">
					<label><input <?php echo helper_get_tab_index() ?> type="checkbox" id="report_stay" name="report_stay" <?php check_checked( $f_report_stay ) ?> /> <?php echo lang_get( 'check_report_more_bugs' ) ?></label>
				</span>
				<span class="label-style"></span>
			</div>

			<span class="submit-button">
				<input <?php echo helper_get_tab_index() ?> type="submit" class="button" value="<?php echo lang_get( 'submit_report_button' ) ?>" />
			</span>
		</fieldset>
	</form>
</div>
<?php
html_page_bottom();
示例#14
0
						print_user_option_list( $t_tag_row['user_id'], ALL_PROJECTS, config_get( 'tag_create_threshold' ) );
						echo '</select></span>';
					} else { ?>
						<span class="display-label"><span><?php echo lang_get( 'tag_creator' ); ?></span></span>
						<span class="display-value"><span><?php echo string_display_line( user_get_name($t_tag_row['user_id']) ); ?></span></span><?php
					} ?>
				<span class="label-style"></span>
			</div>
			<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
				<span class="display-label"><span><?php echo lang_get( 'tag_created' ) ?></span></span>
				<span class="display-value"><span><?php echo date( config_get( 'normal_date_format' ), $t_tag_row['date_created'] ) ?></span></span>
				<span class="label-style"></span>
			</div>
			<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
				<span class="display-label"><span><?php echo lang_get( 'tag_updated' ) ?></span></span>
				<span class="display-value"><span><?php echo date( config_get( 'normal_date_format' ), $t_tag_row['date_updated'] ) ?></span></span>
				<span class="label-style"></span>
			</div>
			<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
				<label for="tag-description"><span><?php echo lang_get( 'tag_description' ) ?></span></label>
				<span class="textarea"><textarea id="tag-description" name="description" <?php echo helper_get_tab_index() ?> cols="80" rows="6"><?php echo string_textarea( $t_description ) ?></textarea></span>
				<span class="label-style"></span>
			</div>
			<span class="submit-button"><input <?php echo helper_get_tab_index() ?> type="submit" class="button" value="<?php echo lang_get( 'tag_update_button' ) ?>" /></span>
		</fieldset>
	</form>
</div>

<?php
html_page_bottom();
示例#15
0
    if (!date_is_null($t_bug->due_date)) {
        $t_date_to_display = date(config_get('calendar_date_format'), $t_bug->due_date);
    }
    ?>
<tr <?php 
    echo helper_alternate_class();
    ?>
>
	<th class="category">
		<?php 
    print_documentation_link('due_date');
    ?>
	</th>
	<td>
		<?php 
    echo "<input " . helper_get_tab_index() . " type=\"text\" id=\"due_date\" name=\"due_date\" class=\"datetime\" size=\"20\" maxlength=\"10\" value=\"" . $t_date_to_display . "\" />";
    ?>
	</td>
</tr>
<?php 
}
?>

<!-- Custom Fields -->
<?php 
/** @todo thraxisp - I undid part of the change for #5068 for #5527
 * We really need to say what fields are shown in which statusses. For now,
 * this page will show required custom fields in update mode, or
 *  display or required fields on resolve or close
 */
$t_custom_status_label = "update";
function print_type($edit_page, $current_type, $version)
{
    $specmanagement_database_api = new specmanagement_database_api();
    echo '<td>';
    if ($edit_page) {
        $types = array();
        $types_rows = $specmanagement_database_api->get_full_types();
        foreach ($types_rows as $types_row) {
            $types[] = $types_row[1];
        }
        echo '<span class="select">';
        echo '<select ' . helper_get_tab_index() . ' id="proj-version-type" name="type[]">';
        echo '<option value=""></option>';
        foreach ($types as $type) {
            echo '<option value="' . $type . '"';
            check_selected(string_attribute($current_type), $type);
            echo '>' . $type . '</option>';
        }
        echo '</select>';
    } else {
        $type_id = $specmanagement_database_api->get_type_by_version($version['id']);
        $type_string = $specmanagement_database_api->get_type_string($type_id);
        echo string_display($type_string);
    }
    echo '</td>';
}
示例#17
0
function print_status_option_list($p_select_label, $p_current_value = 0, $p_allow_close = false, $p_project_id = null)
{
    $t_current_auth = access_get_project_level($p_project_id);
    $t_enum_list = get_status_option_list($t_current_auth, $p_current_value, true, $p_allow_close);
    if (count($t_enum_list) > 0) {
        # resort the list into ascending order
        ksort($t_enum_list);
        reset($t_enum_list);
        echo '<select ', helper_get_tab_index(), ' name="' . $p_select_label . '">';
        foreach ($t_enum_list as $key => $val) {
            echo "<option value=\"{$key}\"";
            check_selected($key, $p_current_value);
            echo ">{$val}</option>";
        }
        echo '</select>';
    } else {
        echo get_enum_to_string('status_enum_string', $p_current_value);
    }
}
$storyboard_config_api->printFormCategory(1, 'config_typeadd', false);
$type = gpc_get_string('type', '');
echo '<td colspan="1">';
echo '<input type="text" id="type" name="type" size="15" maxlength="128" value="', $type, '">&nbsp';
echo '<input type="submit" name="addtype" class="button" value="' . plugin_lang_get('config_add') . '">';
echo '</td>';
echo '</tr>';
$storyboard_config_api->printTableRowHead();
$storyboard_config_api->printFormCategory(1, 'config_types', false);
echo '<td colspan="1">';
$type_rows = $storyboard_db_api->select_all_types();
foreach ($type_rows as $type_row) {
    $types[] = $type_row[1];
}
echo '<span class="select">';
echo '<select ' . helper_get_tab_index() . ' id="types" name="types">';
if (!is_null($types)) {
    foreach ($types as $type) {
        echo '<option value="' . $type . '">' . $type . '</option>';
    }
}
echo '</select>&nbsp';
$new_type = gpc_get_string('newtype', '');
echo '<input type="submit" name="deletetype" class="button" value="' . plugin_lang_get('config_del') . '">&nbsp';
echo '<input type="text" id="newtype" name="newtype" size="15" maxlength="128" value="', $new_type, '">&nbsp';
echo '<input type="submit" name="changetype" class="button" value="' . plugin_lang_get('config_change') . '">';
echo '</td>';
echo '</tr>';
$storyboard_config_api->printTableRowHead();
$storyboard_config_api->printFormCategory(1, 'config_status_cols', false);
echo '<td valign="top" width="100px">';
 /**
  * Prints the specific plugin fields in the bug-report user interface
  */
 public function printBugReportFields()
 {
     echo '<link rel="stylesheet" href="' . SPECMANAGEMENT_PLUGIN_URL . 'files/specmanagement_tooltip.css">';
     $specmanagement_database_api = new specmanagement_database_api();
     $work_packages = $specmanagement_database_api->get_project_spec_workpackages();
     if (substr(MANTIS_VERSION, 0, 4) == '1.2.') {
         $this->printRow();
         echo '<td class="category">';
         echo '<label><span>';
         echo plugin_lang_get('bug_view_specification_wpg') . '<br />';
         $this->print_workpackage_description_field();
         echo '</span></label>';
         echo '</td>';
         echo '<td>';
         echo '<span class="input">';
         echo '<input type="text" id="work_package" name="work_package" list="work_packages" style="min-width:650px;"/>';
         echo '<button type="button" onClick="document.getElementById(\'work_package\').value=\'\';">X</button>';
         echo '<datalist id="work_packages">';
         if (!empty($work_packages)) {
             foreach ($work_packages as $existing_work_package) {
                 echo '<option value="' . $existing_work_package . '">';
             }
         }
         echo '</datalist>';
         echo '</span>';
         echo '</td>';
         echo '</tr>';
         $this->printRow();
         echo '<td class="category" > ';
         echo '<label ><span > ' . plugin_lang_get('bug_view_planned_time') . ' ( ' . plugin_lang_get('editor_duration_unit') . ')' . ' </span ></label > ';
         echo '</td > ';
         echo '<td > ';
         echo '<span class="input" > ';
         echo '<input ' . helper_get_tab_index() . ' type = "text" id = "ptime" name = "ptime" size = "50" maxlength = "50" value = "" />';
         echo '</span > ';
         echo '<span class="label-style" ></span > ';
         echo '</td > ';
         echo '</tr > ';
     } else {
         echo '<div class="field-container" > ';
         echo '<label><span >';
         echo plugin_lang_get('bug_view_specification_wpg') . '<br />';
         $this->print_workpackage_description_field();
         echo ' </span ></label > ';
         echo '<span class="input" > ';
         echo '<input type = "text" id = "work_package" name = "work_package" list = "work_packages" />';
         echo '<button type = "button" onClick = "document.getElementById(\'work_package\').value=\'\';" > X</button > ';
         echo '<datalist id = "work_packages" > ';
         if (!empty($work_packages)) {
             foreach ($work_packages as $existing_work_package) {
                 echo '<option value = "' . $existing_work_package . '" > ';
             }
         }
         echo '</datalist > ';
         echo '</span > ';
         echo '<span class="label-style" ></span > ';
         echo '</div > ';
         echo '<div class="field-container" > ';
         echo '<label ><span > ' . plugin_lang_get('bug_view_planned_time') . ' ( ' . plugin_lang_get('editor_duration_unit') . ')' . ' </span ></label > ';
         echo '<span class="input" > ';
         echo '<input ' . helper_get_tab_index() . ' type = "text" id = "ptime" name = "ptime" size = "50" maxlength = "50" value = "" />';
         echo '</span > ';
         echo '<span class="label-style" ></span > ';
         echo '</div > ';
     }
 }
示例#20
0
/**
 * print tag fields
 * @return void
 */
function print_filter_tag_string()
{
    if (!access_has_global_level(config_get('tag_view_threshold'))) {
        return;
    }
    global $g_filter;
    $t_tag_string = $g_filter[FILTER_PROPERTY_TAG_STRING];
    if ($g_filter[FILTER_PROPERTY_TAG_SELECT] != 0 && tag_exists($g_filter[FILTER_PROPERTY_TAG_SELECT])) {
        $t_tag_string .= is_blank($t_tag_string) ? '' : config_get('tag_separator');
        $t_tag_string .= tag_get_field($g_filter[FILTER_PROPERTY_TAG_SELECT], 'name');
    }
    ?>
		<input type="hidden" id="tag_separator" value="<?php 
    echo config_get('tag_separator');
    ?>
" />
		<input type="text" name="<?php 
    echo FILTER_PROPERTY_TAG_STRING;
    ?>
" id="<?php 
    echo FILTER_PROPERTY_TAG_STRING;
    ?>
" size="40" value="<?php 
    echo string_attribute($t_tag_string);
    ?>
" />
		<select <?php 
    echo helper_get_tab_index();
    ?>
 name="<?php 
    echo FILTER_PROPERTY_TAG_SELECT;
    ?>
" id="<?php 
    echo FILTER_PROPERTY_TAG_SELECT;
    ?>
">
			<?php 
    print_tag_option_list();
    ?>
		</select>
		<?php 
}
示例#21
0
function print_custom_field_input($p_field_def, $p_bug_id = null)
{
    $t_id = $p_field_def['id'];
    if (null === $p_bug_id) {
        $t_custom_field_value = $p_field_def['default_value'];
    } else {
        $t_custom_field_value = custom_field_get_value($t_id, $p_bug_id);
    }
    $t_custom_field_value = string_attribute($t_custom_field_value);
    switch ($p_field_def['type']) {
        case CUSTOM_FIELD_TYPE_ENUM:
        case CUSTOM_FIELD_TYPE_LIST:
        case CUSTOM_FIELD_TYPE_MULTILIST:
            $t_values = explode('|', custom_field_prepare_possible_values($p_field_def['possible_values']));
            $t_list_size = $t_possible_values_count = count($t_values);
            if ($t_possible_values_count > 5) {
                $t_list_size = 5;
            }
            if ($p_field_def['type'] == CUSTOM_FIELD_TYPE_ENUM) {
                $t_list_size = 0;
                # for enums the size is 0
            }
            if ($p_field_def['type'] == CUSTOM_FIELD_TYPE_MULTILIST) {
                echo '<select ', helper_get_tab_index(), ' name="custom_field_' . $t_id . '[]" size="' . $t_list_size . '" multiple="multiple">';
            } else {
                echo '<select ', helper_get_tab_index(), ' name="custom_field_' . $t_id . '" size="' . $t_list_size . '">';
            }
            $t_selected_values = explode('|', $t_custom_field_value);
            foreach ($t_values as $t_option) {
                if (in_array($t_option, $t_selected_values, true)) {
                    echo '<option value="' . $t_option . '" selected="selected"> ' . $t_option . '</option>';
                } else {
                    echo '<option value="' . $t_option . '">' . $t_option . '</option>';
                }
            }
            echo '</select>';
            break;
        case CUSTOM_FIELD_TYPE_CHECKBOX:
            $t_values = explode('|', custom_field_prepare_possible_values($p_field_def['possible_values']));
            $t_checked_values = explode('|', $t_custom_field_value);
            foreach ($t_values as $t_option) {
                echo '<input ', helper_get_tab_index(), ' type="checkbox" name="custom_field_' . $t_id . '[]"';
                if (in_array($t_option, $t_checked_values, true)) {
                    echo ' value="' . $t_option . '" checked="checked">&nbsp;' . $t_option . '&nbsp;&nbsp;';
                } else {
                    echo ' value="' . $t_option . '">&nbsp;' . $t_option . '&nbsp;&nbsp;';
                }
            }
            break;
        case CUSTOM_FIELD_TYPE_NUMERIC:
        case CUSTOM_FIELD_TYPE_FLOAT:
        case CUSTOM_FIELD_TYPE_EMAIL:
        case CUSTOM_FIELD_TYPE_STRING:
            echo '<input ', helper_get_tab_index(), ' type="text" name="custom_field_' . $t_id . '" size="80"';
            if (0 < $p_field_def['length_max']) {
                echo ' maxlength="' . $p_field_def['length_max'] . '"';
            } else {
                echo ' maxlength="255"';
            }
            echo ' value="' . $t_custom_field_value . '"></input>';
            break;
        case CUSTOM_FIELD_TYPE_DATE:
            print_date_selection_set("custom_field_" . $t_id, config_get('short_date_format'), $t_custom_field_value, false, true);
            break;
    }
}
示例#22
0
 type="checkbox" id="report_stay" name="report_stay" <?php 
check_checked($f_report_stay);
?>
 /> <?php 
echo lang_get('check_report_more_bugs');
?>
</label>
		</td>
	</tr>
	<tr>
		<td class="left">
			<span class="required"> * <?php 
echo lang_get('required');
?>
</span>
		</td>
		<td class="center">
			<input <?php 
echo helper_get_tab_index();
?>
 type="submit" class="button" value="<?php 
echo lang_get('submit_report_button');
?>
" />
		</td>
	</tr>
</table>
</div>
</form>
<?php 
html_page_bottom();
示例#23
0
function ERP_print_action_radio_buttons($p_input_name, $p_sel_value, $p_variable_array, $p_actions_list)
{
    foreach ($p_actions_list as $t_action_key => $t_actions) {
        if (is_array($p_variable_array) && count($p_variable_array) >= $t_action_key) {
            foreach ($t_actions as $t_action) {
                echo '<label><input ' . helper_get_tab_index() . ' type="radio" name="' . $p_input_name . '" value="' . string_attribute($t_action) . '"';
                check_checked($p_sel_value, $t_action);
                echo '/>' . plugin_lang_get($t_action . '_action') . '</label>';
            }
        }
    }
}
示例#24
0
function cfdef_input_textarea($p_field_def, $t_custom_field_value)
{
    echo '<textarea ' . helper_get_tab_index() . ' id="custom_field_' . $p_field_def['id'] . '" name="custom_field_' . $p_field_def['id'] . '"';
    echo ' cols="70" rows="8">' . $t_custom_field_value . '</textarea>';
}
示例#25
0
				<label for="excel-columns" class="required"><span><?php echo lang_get( 'excel_columns_title' )?></span></label>
				<span class="textarea"><textarea id="excel-columns" <?php echo helper_get_tab_index() ?> name="excel_columns" cols="80" rows="5"><?php echo $t_excel ?></textarea></span>
				<span class="label-style"></span>
			</div>
			<?php
			if ( $t_account_page ) {
				if ( $t_project_id == ALL_PROJECTS ) { ?>
					<span class="submit-button"><input <?php echo helper_get_tab_index() ?> type="submit" class="button" name="update_columns_as_my_default" value="<?php echo lang_get( 'update_columns_as_my_default' ) ?>" /></span><?php
				} else { ?>
					<span class="submit-button"><input <?php echo helper_get_tab_index() ?> type="submit" class="button" name="update_columns_for_current_project" value="<?php echo lang_get( 'update_columns_for_current_project' ) ?>" /></span><?php

			}
		}

		if ( $t_manage_page && current_user_is_administrator() ) { ?>
			<span class="submit-button"><input <?php echo helper_get_tab_index() ?> type="submit" class="button" name="update_columns_as_global_default" value="<?php echo lang_get( 'update_columns_as_global_default' ) ?>" /></span><?php
		} ?>
		</fieldset>
	</form>
</div>

<div id="manage-columns-copy-div" class="form-container">
	<form id="manage-columns-copy-form" method="post" action="manage_columns_copy.php">
		<fieldset>
			<?php echo form_security_field( 'manage_columns_copy' ) ?>
			<input type="hidden" name="project_id" value="<?php echo $t_project_id ?>" />
			<input type="hidden" name="manage_page" value="<?php echo $t_manage_page ?>" />

			<select name="other_project_id">
				<?php print_project_option_list( /* project_id */ null, /* include_all_projects */ true, /* filter_project_id */ $t_project_id ); ?>
			</select>