/**
 * Prints the field within the custom action form.  This has an entry for
 * every field the user need to supply + the submit button.  The fields are
 * added as rows in a table that is already created by the calling code.
 * A row has two columns.
 * @return void
 */
function action_update_severity_print_fields()
{
    ?>
	<tbody>
	</tbody>
		<tr>
			<th class="category">
				<?php 
    echo lang_get('update_severity_msg');
    ?>
			</th>
			<td>
				<select name="severity">';
					<?php 
    print_enum_string_option_list('severity');
    ?>
				</select>
			</td>
		</tr>
	</tbody>
	<tfoot>
		<tr>
			<td colspan="2" class="center">
				<input type="submit" class="button" value="<?php 
    echo lang_get('update_severity_button');
    ?>
" />
			</td>
		</tr>
	</tfoot>
<?php 
}
/**
 * Prints the field within the custom action form.  This has an entry for
 * every field the user need to supply + the submit button.  The fields are
 * added as rows in a table that is already created by the calling code.
 * A row has two columns.
 */
function action_add_note_print_fields()
{
    echo '<tr class="row-1" valign="top"><td class="category">', lang_get('add_bugnote_title'), '</td><td><textarea name="bugnote_text" cols="80" rows="10"></textarea></td></tr>';
    ?>
	<!-- View Status -->
	<tr class="row-2">
	<td class="category">
		<?php 
    echo lang_get('view_status');
    ?>
	</td>
	<td>
<?php 
    $t_default_state = config_get('default_bugnote_view_status');
    if (access_has_project_level(config_get('set_view_status_threshold'))) {
        ?>
			<select name="view_state">
				<?php 
        print_enum_string_option_list('view_state', $t_default_state);
        ?>
			</select>
<?php 
    } else {
        echo get_enum_element('view_state', $t_default_state);
        echo '<input type="hidden" name="view_state" value="', $t_default_state, '" />';
    }
    ?>
	</td>
	</tr>
	<?php 
    echo '<tr><td colspan="2"><center><input type="submit" class="button" value="' . lang_get('add_bugnote_button') . ' " /></center></td></tr>';
}
/**
 * Prints the field within the custom action form.  This has an entry for
 * every field the user need to supply + the submit button.  The fields are
 * added as rows in a table that is already created by the calling code.
 * A row has two columns.
 */
function action_update_severity_print_fields() {
	echo '<tr class="row-1"><th class="category">';
	echo lang_get( 'update_severity_msg' );
	echo '</th><td><select name="severity">';
	print_enum_string_option_list( 'severity' );
	echo '</select></td></tr>';
	echo '<tr><td colspan="2" class="center"><input type="submit" class="button" value="' . lang_get( 'update_severity_button' ) . ' " /></td></tr>';
}
						<?php 
print_enum_string_option_list('access_levels', (int) $t_definition['access_level_r']);
?>
					</select>
				</span>
				<span class="label-style"></span>
			</div>
			<div class="field-container">
				<label for="custom-field-access-level-rw"><span><?php 
echo lang_get('custom_field_access_level_rw');
?>
</span></label>
				<span class="select">
					<select id="custom-field-access-level-rw" name="access_level_rw">
						<?php 
print_enum_string_option_list('access_levels', (int) $t_definition['access_level_rw']);
?>
					</select>
				</span>
				<span class="label-style"></span>
			</div>
			<div class="field-container">
				<label for="custom-field-length-min"><span><?php 
echo lang_get('custom_field_length_min');
?>
</span></label>
				<span class="input"><input type="text" id="custom-field-length-min" name="length_min" size="32" maxlength="64" value="<?php 
echo $t_definition['length_min'];
?>
" /></span>
				<span class="label-style"></span>
/**
 * access section end
 * @return void
 */
function access_end()
{
    global $g_access;
    echo '</tbody></table>' . "\n";
    echo '<div class="footer">' . "\n";
    if ($g_access >= config_get_access('set_status_threshold')) {
        echo lang_get('access_change_access_label') . "&nbsp;\n";
        echo '<select name="status_access">' . "\n\t\t";
        print_enum_string_option_list('access_levels', config_get_access('set_status_threshold'));
        echo "\n" . '</select>' . "\n";
    }
    echo '</div>' . "\n";
    echo '</div>' . "\n";
    echo '<br />' . "\n\n";
}
Example #6
0
        echo '<td>' . string_display_line(project_get_field($t_bug->project_id, 'name')) . '&#160;</td>';
        echo '<td class="right">' . $t_released_label . '&#160;</td>';
        echo '<td><a title="' . $t_resolution . '"><span class="underline">' . $t_status . '</span>&#160;</a></td>';
        # summary
        echo '<td>' . string_display_line($t_bug->summary);
        if (VS_PRIVATE == $t_bug->view_state) {
            printf(' <img src="%s" alt="(%s)" title="%s" />', $t_icon_path . 'protected.gif', lang_get('private'), lang_get('private'));
        }
        echo '</td>';
        # describe sponsorship amount
        echo '<td>';
        print_user($t_sponsor->user_id);
        echo '</td>';
        echo '<td class="right">' . sponsorship_format_amount($t_sponsor->amount) . '</td>';
        echo '<td><select name="sponsor_' . $t_row['bug'] . '_' . $t_sponsor->id . '">';
        print_enum_string_option_list('sponsorship', $t_sponsor->paid);
        echo '</select></td>';
        echo '</tr>';
        if (SPONSORSHIP_PAID == $t_sponsor->paid) {
            $t_total_paid += $t_sponsor->amount;
        } else {
            $t_total_owing += $t_sponsor->amount;
        }
    }
    $t_hidden_bug_list = implode(',', $t_buglist);
    ?>
<!-- Totals -->
<tr>
	<td colspan="5"></td>
	<td><?php 
    echo lang_get('total_owing');
Example #7
0
		<?php 
    echo lang_get('resolution');
    ?>
	</th>
	<td>
		<select name="resolution">
			<?php 
    $t_resolution = $t_bug_is_open ? config_get('bug_resolution_fixed_threshold') : $t_current_resolution;
    $t_relationships = relationship_get_all_src($f_bug_id);
    foreach ($t_relationships as $t_relationship) {
        if ($t_relationship->type == BUG_DUPLICATE) {
            $t_resolution = config_get('bug_duplicate_resolution');
            break;
        }
    }
    print_enum_string_option_list('resolution', $t_resolution);
    ?>
		</select>
	</td>
</tr>
<?php 
}
?>

<?php 
if ($f_new_status >= $t_resolved && $f_new_status < $t_closed && $t_resolution != config_get('bug_duplicate_resolution')) {
    ?>
<!-- Duplicate ID -->
<tr <?php 
    echo helper_alternate_class();
    ?>
>
	<td class="category">
		<?php 
    echo lang_get('priority');
    ?>
 <?php 
    print_documentation_link('priority');
    ?>
	</td>
	<td>
		<select <?php 
    echo helper_get_tab_index();
    ?>
 name="priority">
			<?php 
    print_enum_string_option_list('priority', $f_priority);
    ?>
		</select>
	</td>
</tr>
<?php 
}
?>


<!-- spacer -->
<tr class="spacer">
	<td colspan="2"></td>
</tr>

<?php 
Example #9
0
/**
 * print priority field
 * @return void
 */
function print_filter_show_priority()
{
    global $g_select_modifier, $g_filter;
    ?>
<!-- Priority -->
	<select<?php 
    echo $g_select_modifier;
    ?>
 name="<?php 
    echo FILTER_PROPERTY_PRIORITY;
    ?>
[]">
			<option value="<?php 
    echo META_FILTER_ANY;
    ?>
"<?php 
    check_selected($g_filter[FILTER_PROPERTY_PRIORITY], META_FILTER_ANY);
    ?>
>[<?php 
    echo lang_get('any');
    ?>
]</option>
			<?php 
    print_enum_string_option_list('priority', $g_filter[FILTER_PROPERTY_PRIORITY]);
    ?>
	</select>
		<?php 
}
Example #10
0
</span></label>
				<span class="checkbox"><input type="checkbox" id="project-inherit-parent" name="inherit_parent" checked="checked" /></span>
				<span class="label-style"></span>
			</div><?php 
}
?>

			<div class="field-container">
				<label for="project-view-state"><span><?php 
echo lang_get('view_status');
?>
</span></label>
				<span class="select">
					<select id="project-view-state" name="view_state">
						<?php 
print_enum_string_option_list('view_state', config_get('default_project_view_status', null, ALL_USERS, ALL_PROJECTS));
?>
					</select>
				</span>
				<span class="label-style"></span>
			</div>
			<?php 
$g_project_override = ALL_PROJECTS;
if (file_is_uploading_enabled() && DATABASE !== config_get('file_upload_method')) {
    $t_file_path = '';
    # Don't reveal the absolute path to non-administrators for security reasons
    if (current_user_is_administrator()) {
        $t_file_path = config_get('absolute_path_default_upload_folder');
    }
    ?>
				<div class="field-container">
Example #11
0
function print_filter_show_priority()
{
    global $t_select_modifier, $t_filter;
    ?>
<!-- Priority -->
    <select <?php 
    print $t_select_modifier;
    ?>
 name="show_priority[]">
			<option value="<?php 
    echo META_FILTER_ANY;
    ?>
" <?php 
    check_selected($t_filter['show_priority'], META_FILTER_ANY);
    ?>
>[<?php 
    echo lang_get('any');
    ?>
]</option>
			<?php 
    print_enum_string_option_list('priority', $t_filter['show_priority']);
    ?>
    </select>
		<?php 
}
</tr>

<!-- Unit/depatment -->
<tr <?php 
echo helper_alternate_class();
?>
>
	<td class="category">
		<?php 
echo lang_get('unit_department');
?>
	</td>
	<td>
		<select name="unit_department">
		<?php 
print_enum_string_option_list('btl_units_departments', $t_user['unit_department']);
?>
		</select>
	</td>
</tr>

<!-- Enabled Checkbox -->
<tr <?php 
echo helper_alternate_class();
?>
>
	<td class="category">
		<?php 
echo lang_get('enabled');
?>
	</td>
Example #13
0
		</select>
	</td>

	<!-- Resolution -->
	<td class="category">
		<?php 
echo lang_get('resolution');
?>
	</td>
	<td>
		<select <?php 
echo helper_get_tab_index();
?>
 name="resolution">
			<?php 
print_enum_string_option_list("resolution", $t_bug->resolution);
?>
		</select>
	</td>

	<!-- spacer -->
	<td colspan="2">&nbsp;</td>

</tr>


<tr <?php 
echo helper_alternate_class();
?>
>
/**
 * access row
 */
function access_row()
{
    global $t_access, $t_can_change_flags;
    $t_enum_status = MantisEnum::getAssocArrayIndexedByValues(config_get('status_enum_string'));
    $t_file_new = config_get_global('report_bug_threshold');
    $t_global_new = config_get('report_bug_threshold', null, null, ALL_PROJECTS);
    $t_project_new = config_get('report_bug_threshold');
    $t_file_set = config_get_global('set_status_threshold');
    $t_global_set = config_get('set_status_threshold', null, null, ALL_PROJECTS);
    $t_project_set = config_get('set_status_threshold');
    $t_submit_status = config_get('bug_submit_status');
    # Print the table rows
    foreach ($t_enum_status as $t_status => $t_status_label) {
        echo "\t\t" . '<tr><td class="width30">' . string_no_break(MantisEnum::getLabel(lang_get('status_enum_string'), $t_status)) . '</td>' . "\n";
        if ($t_status == $t_submit_status) {
            # 'NEW' status
            $t_level_project = $t_project_new;
            $t_can_change = $t_access >= config_get_access('report_bug_threshold');
            $t_colour = set_colour_override($t_file_new, $t_global_new, $t_project_new);
            if ($t_can_change && $t_colour != '') {
                set_overrides('report_bug_threshold');
            }
        } else {
            # Other statuses
            # File level: fallback if set_status_threshold is not defined
            if (isset($t_file_set[$t_status])) {
                $t_level_file = $t_file_set[$t_status];
            } else {
                $t_level_file = config_get_global('update_bug_status_threshold');
            }
            $t_level_global = isset($t_global_set[$t_status]) ? $t_global_set[$t_status] : $t_level_file;
            $t_level_project = isset($t_project_set[$t_status]) ? $t_project_set[$t_status] : $t_level_global;
            $t_can_change = $t_access >= config_get_access('set_status_threshold');
            $t_colour = set_colour_override($t_level_file, $t_level_global, $t_level_project);
            if ($t_can_change && $t_colour != '') {
                set_overrides('set_status_threshold');
            }
        }
        if ($t_can_change) {
            echo '<td' . $t_colour . '><select name="access_change_' . $t_status . '">' . "\n";
            print_enum_string_option_list('access_levels', $t_level_project);
            echo '</select> </td>' . "\n";
            $t_can_change_flags = true;
        } else {
            echo '<td class="center"' . $t_colour . '>' . MantisEnum::getLabel(lang_get('access_levels_enum_string'), $t_level_project) . '</td>' . "\n";
        }
        echo '</tr>' . "\n";
    }
}
Example #15
0
                print_assign_to_option_list(0, $t_project_id);
                break;
            case 'RESOLVE':
                print_enum_string_option_list('resolution', config_get('bug_resolution_fixed_threshold'));
                break;
            case 'UP_PRIOR':
                print_enum_string_option_list('priority', config_get('default_bug_priority'));
                break;
            case 'UP_STATUS':
                print_enum_string_option_list('status', config_get('bug_submit_status'));
                break;
            case 'UP_CATEGORY':
                print_category_option_list();
                break;
            case 'VIEW_STATUS':
                print_enum_string_option_list('view_state', config_get('default_bug_view_status'));
                break;
            case 'UP_TARGET_VERSION':
                print_version_option_list('', $t_project_id, VERSION_FUTURE, true, true);
                break;
            case 'UP_FIXED_IN_VERSION':
                print_version_option_list('', $t_project_id, VERSION_ALL, true, true);
                break;
        }
        echo '</select>';
    }
    ?>
	</td>
</tr>
	<?php 
    if (isset($t_question_title2)) {
Example #16
0
</span>
	</td>
	<td>
		<input type="checkbox" name="announcement" />
	</td>
</tr>
<tr class="row-2">
	<th class="category" width="25%">
		<?php 
echo lang_get('view_status');
?>
	</th>
	<td width="75%">
		<select name="view_state">
			<?php 
print_enum_string_option_list('view_state');
?>
		</select>
	</td>
</tr>
<tr>
	<td>
		<span class="required">* <?php 
echo lang_get('required');
?>
</span>
	</td>
	<td class="center">
		<input type="submit" class="button" value="<?php 
echo lang_get('post_news_button');
?>
Example #17
0
    echo '<tr>';
    $t_spacer = 2;
    if ($t_show_projection) {
        # Projection
        echo '<th class="category"><label for="projection">' . lang_get('projection') . '</label></th>';
        echo '<td><select ' . helper_get_tab_index() . ' id="projection" name="projection">';
        print_enum_string_option_list('projection', $t_bug->projection);
        echo '</select></td>';
    } else {
        $t_spacer += 2;
    }
    # ETA
    if ($t_show_eta) {
        echo '<th class="category"><label for="eta">' . lang_get('eta') . '</label></th>';
        echo '<td><select ' . helper_get_tab_index() . ' id="eta" name="eta">';
        print_enum_string_option_list('eta', (int) $t_bug->eta);
        echo '</select></td>';
    } else {
        $t_spacer += 2;
    }
    # spacer
    echo '<td colspan="', $t_spacer, '">&#160;</td>';
    echo '</tr>';
}
#
# Platform, OS, OS Version
#
if ($t_show_platform || $t_show_os || $t_show_os_version) {
    echo '<tr>';
    $t_spacer = 0;
    if ($t_show_platform) {
function get_capability_enum($p_caption, $p_threshold, $p_enum, $p_all_projects_only = false)
{
    global $t_user, $t_project_id, $t_show_submit, $t_access_levels, $t_colour_project, $t_colour_global;
    $t_file = config_get_global($p_threshold);
    $t_global = config_get($p_threshold, null, null, ALL_PROJECTS);
    $t_project = config_get($p_threshold);
    $t_can_change = access_has_project_level(config_get_access($p_threshold), $t_project_id, $t_user) && (ALL_PROJECTS == $t_project_id || !$p_all_projects_only);
    $t_colour = '';
    if ($t_global != $t_file) {
        $t_colour = ' bgcolor="' . $t_colour_global . '" ';
        # all projects override
        if ($t_can_change) {
            set_overrides($p_threshold);
        }
    }
    if ($t_project != $t_global) {
        $t_colour = ' bgcolor="' . $t_colour_project . '" ';
        # project overrides
        if ($t_can_change) {
            set_overrides($p_threshold);
        }
    }
    echo '<tr ' . helper_alternate_class() . '><td>' . string_display($p_caption) . '</td>';
    if ($t_can_change) {
        echo '<td class="left" colspan="3"' . $t_colour . '><select name="flag_' . $p_threshold . '">';
        print_enum_string_option_list($p_enum, config_get($p_threshold));
        echo '</select></td><td colspan="' . (count($t_access_levels) - 3) . '"></td>';
        $t_show_submit = true;
    } else {
        $t_value = MantisEnum::getLabel(lang_get($p_enum . '_enum_string'), config_get($p_threshold)) . '&nbsp;';
        echo '<td class="left" colspan="3"' . $t_colour . '>' . $t_value . '</td><td colspan="' . (count($t_access_levels) - 3) . '"></td>';
    }
    if ($t_can_change) {
        echo '<td><select name="access_' . $p_threshold . '">';
        print_enum_string_option_list('access_levels', config_get_access($p_threshold));
        echo '</select> </td>';
    } else {
        echo '<td>' . MantisEnum::getLabel(lang_get('access_levels_enum_string'), config_get_access($p_threshold)) . '&nbsp;</td>';
    }
    echo '</tr>' . "\n";
}
 get_capability_row_for_email(lang_get('email_on_reopened'), 'reopened');
 get_capability_row_for_email(lang_get('email_on_deleted'), 'deleted');
 get_capability_row_for_email(lang_get('email_on_bugnote_added'), 'bugnote');
 if (config_get('enable_sponsorship') == ON) {
     get_capability_row_for_email(lang_get('email_on_sponsorship_changed'), 'sponsor');
 }
 get_capability_row_for_email(lang_get('email_on_relationship_changed'), 'relation');
 $t_statuses = MantisEnum::getAssocArrayIndexedByValues(config_get('status_enum_string'));
 foreach ($t_statuses as $t_status => $t_label) {
     get_capability_row_for_email(lang_get('status_changed_to') . ' \'' . get_enum_element('status', $t_status) . '\'', $t_label);
 }
 get_section_end_for_email();
 if ($g_can_change_flags || $g_can_change_defaults) {
     echo '<p>' . lang_get('notify_actions_change_access') . "\n";
     echo '<select name="notify_actions_access">' . "\n";
     print_enum_string_option_list('access_levels', config_get_access('notify_flags'));
     echo "\n</select></p>";
     echo '<input type="submit" class="button" value="' . lang_get('change_configuration') . '" />' . "\n";
     echo "</form>\n";
     echo '<div class="right">' . "\n";
     echo '<form id="mail_config_action" method="post" action="manage_config_revert.php">' . "\n";
     echo form_security_field('manage_config_revert') . "\n";
     echo '<input name="revert" type="hidden" value="notify_flags,default_notify_flags" />' . "\n";
     echo '<input name="project" type="hidden" value="' . $t_project . '" />' . "\n";
     echo '<input name="return" type="hidden" value="' . string_attribute(form_action_self()) . '" />' . "\n";
     echo '<input type="submit" class="button" value="';
     if (ALL_PROJECTS == $t_project) {
         echo lang_get('revert_to_system');
     } else {
         echo lang_get('revert_to_all_project');
     }
"
                 value="<?php 
    echo plugin_config_get('IAGThreshold' . $columnIndex, 30);
    ?>
" min="0"/></label>
   <?php 
    echo '</td>';
    print_config_table_radio_button_col(1, 'CStatIgn' . $columnIndex);
    echo '</tr>';
}
print_config_table_title_row(5, 'config_URIFilter');
print_config_table_row();
print_config_table_category_col(2, 1, 'config_URIThreshold');
echo '<td valign="top" width="100px" colspan="3">';
echo '<select name="URIThreshold[]" multiple="multiple">';
print_enum_string_option_list('status', plugin_config_get('URIThreshold', 50));
echo '</select>';
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td class="center" colspan="5">';
echo '<input type="submit" name="change" class="button" value="' . lang_get('update_prefs_button') . '"/>' . ' ';
echo '<input type="submit" name="reset" class="button" value="' . lang_get('reset_prefs_button') . '"/>';
echo '</td>';
echo '</tr>';
echo '</table>';
if (!userprojectapi::is_mantis_rel()) {
    echo '</div>';
}
echo '</form>';
html_page_bottom1();
Example #21
0
</tr>

<!-- View Status (public/private) -->
<tr <?php 
echo helper_alternate_class();
?>
>
	<th class="category">
		<?php 
echo lang_get('view_status');
?>
	</th>
	<td>
		<select name="view_state">
			<?php 
print_enum_string_option_list('view_state', $row['view_state']);
?>
		</select>
	</td>
</tr>

<!-- File upload path (if uploading is enabled) -->
<?php 
if (file_is_uploading_enabled()) {
    ?>
<tr <?php 
    echo helper_alternate_class();
    ?>
>
	<th class="category">
		<?php 
/**
 * Get enumeration row
 * @param string  $p_caption           Caption.
 * @param string  $p_threshold         Threshold.
 * @param string  $p_enum              Enumeration.
 * @param boolean $p_all_projects_only All projects only.
 * @return void
 */
function get_capability_enum($p_caption, $p_threshold, $p_enum, $p_all_projects_only = false)
{
    global $g_user, $g_project_id, $t_show_submit, $g_access_levels;
    $t_file = config_get_global($p_threshold);
    $t_global = config_get($p_threshold, null, null, ALL_PROJECTS);
    $t_project = config_get($p_threshold);
    $t_can_change = access_has_project_level(config_get_access($p_threshold), $g_project_id, $g_user) && (ALL_PROJECTS == $g_project_id || !$p_all_projects_only);
    echo '<tr>' . "\n";
    echo "\t" . '<td>' . string_display($p_caption) . '</td>' . "\n";
    # Value
    $t_color = set_color($p_threshold, $t_file, $t_global, $t_project, $t_can_change);
    echo "\t" . '<td class="left" colspan="3"' . $t_color . '>';
    if ($t_can_change) {
        echo '<select name="flag_' . $p_threshold . '">';
        print_enum_string_option_list($p_enum, config_get($p_threshold));
        echo '</select>';
        $t_show_submit = true;
    } else {
        $t_value = MantisEnum::getLabel(lang_get($p_enum . '_enum_string'), config_get($p_threshold)) . '&#160;';
        echo $t_value;
    }
    echo '</td>' . "\n\t" . '<td colspan="' . (count($g_access_levels) - 3) . '"></td>' . "\n";
    print_who_can_change($p_threshold, $t_can_change);
    echo '</tr>' . "\n";
}
Example #23
0
/**
 * Display html form to edit account preferences
 *
 * @param integer $p_user_id            A valid user identifier.
 * @param boolean $p_error_if_protected Whether to error if the account is protected.
 * @param boolean $p_accounts_menu      Display account preferences menu.
 * @param string  $p_redirect_url       Redirect URI.
 * @return void
 */
function edit_account_prefs($p_user_id = null, $p_error_if_protected = true, $p_accounts_menu = true, $p_redirect_url = '')
{
    if (null === $p_user_id) {
        $p_user_id = auth_get_current_user_id();
    }
    $t_redirect_url = $p_redirect_url;
    if (is_blank($t_redirect_url)) {
        $t_redirect_url = 'account_prefs_page.php';
    }
    # protected account check
    if (user_is_protected($p_user_id)) {
        if ($p_error_if_protected) {
            trigger_error(ERROR_PROTECTED_ACCOUNT, ERROR);
        } else {
            return;
        }
    }
    $t_pref = user_pref_get($p_user_id);
    # Account Preferences Form BEGIN
    ?>

<div id="account-prefs-update-div" class="form-container">
	<form id="account-prefs-update-form" method="post" action="account_prefs_update.php">
		<fieldset>
			<legend><span><?php 
    echo lang_get('default_account_preferences_title');
    ?>
</span></legend>
			<?php 
    echo form_security_field('account_prefs_update');
    ?>
			<input type="hidden" name="user_id" value="<?php 
    echo $p_user_id;
    ?>
" />
			<input type="hidden" name="redirect_url" value="<?php 
    echo $t_redirect_url;
    ?>
" />
		<?php 
    if ($p_accounts_menu) {
        print_account_menu('account_prefs_page.php');
    }
    ?>
			<div class="field-container">
				<label for="default-project-id"><span><?php 
    echo lang_get('default_project');
    ?>
</span></label>
				<span class="select">
					<select id="default-project-id" name="default_project">
<?php 
    # Count number of available projects
    $t_projects = current_user_get_accessible_projects();
    $t_num_proj = count($t_projects);
    if ($t_num_proj == 1) {
        $t_num_proj += count(current_user_get_accessible_subprojects($t_projects[0]));
    }
    # Don't display "All projects" in selection list if there is only 1
    print_project_option_list((int) $t_pref->default_project, $t_num_proj != 1);
    ?>
					</select>
				</span>
				<span class="label-style"></span>
			</div>
			<div class="field-container">
				<label for="refresh-delay"><span><?php 
    echo lang_get('refresh_delay');
    ?>
</span></label>
				<span class="input"><input id="refresh-delay" type="text" name="refresh_delay" size="4" maxlength="4" value="<?php 
    echo $t_pref->refresh_delay;
    ?>
" /> <?php 
    echo lang_get('minutes');
    ?>
</span>
				<span class="label-style"></span>
			</div>
			<div class="field-container">
				<label for="redirect-delay"><span><?php 
    echo lang_get('redirect_delay');
    ?>
</span></label>
				<span class="input"><input id="redirect-delay" type="text" name="redirect_delay" size="4" maxlength="3" value="<?php 
    echo $t_pref->redirect_delay;
    ?>
" /> <?php 
    echo lang_get('seconds');
    ?>
</span>
				<span class="label-style"></span>
			</div>
			<fieldset class="field-container">
				<legend><span><?php 
    echo lang_get('bugnote_order');
    ?>
</span></legend>
				<span class="radio"><input id="bugnote-order-desc" type="radio" name="bugnote_order" value="DESC" <?php 
    check_checked($t_pref->bugnote_order, 'DESC');
    ?>
 /></span>
				<label for="bugnote-order-desc"><span><?php 
    echo lang_get('bugnote_order_desc');
    ?>
</span></label>
				<span class="radio"><input id="bugnote-order-asc" type="radio" name="bugnote_order" value="ASC" <?php 
    check_checked($t_pref->bugnote_order, 'ASC');
    ?>
 /></span>
				<label for="bugnote-order-asc"><span><?php 
    echo lang_get('bugnote_order_asc');
    ?>
</span></label>
				<span class="label-style"></span>
			</fieldset>
			<?php 
    if (ON == config_get('enable_email_notification')) {
        ?>
			<fieldset class="field-container">
				<legend><label for="email-on-new"><?php 
        echo lang_get('email_on_new');
        ?>
</label></legend>
				<span class="checkbox"><input id="email-on-new" type="checkbox" name="email_on_new" <?php 
        check_checked((int) $t_pref->email_on_new, ON);
        ?>
 /></span>
				<label for="email-on-new-min-severity" class="email-on-severity-label"><span><?php 
        echo lang_get('with_minimum_severity');
        ?>
</span></label>
				<span class="select email-on-severity">
					<select id="email-on-new-min-severity" name="email_on_new_min_severity">
						<option value="<?php 
        echo OFF;
        ?>
"><?php 
        echo lang_get('any');
        ?>
</option>
						<option disabled="disabled">-----</option>
						<?php 
        print_enum_string_option_list('severity', (int) $t_pref->email_on_new_min_severity);
        ?>
					</select>
				</span>
				<span class="label-style"></span>
			</fieldset>
			<fieldset class="field-container">
				<legend><label for="email-on-assigned"><?php 
        echo lang_get('email_on_assigned');
        ?>
</label></legend>
				<span class="checkbox"><input id="email-on-assigned" type="checkbox" name="email_on_assigned" <?php 
        check_checked((int) $t_pref->email_on_assigned, ON);
        ?>
 /></span>
				<label for="email-on-assigned-min-severity" class="email-on-severity-label"><span><?php 
        echo lang_get('with_minimum_severity');
        ?>
</span></label>
				<span class="select email-on-severity">
					<select id="email-on-assigned-min-severity" name="email_on_assigned_min_severity">
						<option value="<?php 
        echo OFF;
        ?>
"><?php 
        echo lang_get('any');
        ?>
</option>
						<option disabled="disabled">-----</option>
						<?php 
        print_enum_string_option_list('severity', (int) $t_pref->email_on_assigned_min_severity);
        ?>
					</select>
				</span>
				<span class="label-style"></span>
			</fieldset>
			<fieldset class="field-container">
				<legend><label for="email-on-feedback"><?php 
        echo lang_get('email_on_feedback');
        ?>
</label></legend>
				<span class="checkbox"><input id="email-on-feedback" type="checkbox" name="email_on_feedback" <?php 
        check_checked((int) $t_pref->email_on_feedback, ON);
        ?>
 /></span>
				<label for="email-on-feedback-min-severity" class="email-on-severity-label"><span><?php 
        echo lang_get('with_minimum_severity');
        ?>
</span></label>
				<span class="select email-on-severity">
					<select id="email-on-feedback-min-severity" name="email_on_feedback_min_severity">
						<option value="<?php 
        echo OFF;
        ?>
"><?php 
        echo lang_get('any');
        ?>
</option>
						<option disabled="disabled">-----</option>
						<?php 
        print_enum_string_option_list('severity', (int) $t_pref->email_on_feedback_min_severity);
        ?>
					</select>
				</span>
				<span class="label-style"></span>
			</fieldset>
			<fieldset class="field-container">
				<legend><label for="email-on-resolved"><?php 
        echo lang_get('email_on_resolved');
        ?>
</label></legend>
				<span class="checkbox"><input id="email-on-resolved" type="checkbox" name="email_on_resolved" <?php 
        check_checked((int) $t_pref->email_on_resolved, ON);
        ?>
 /></span>
				<label for="email-on-resolved-min-severity" class="email-on-severity-label"><span><?php 
        echo lang_get('with_minimum_severity');
        ?>
</span></label>
				<span class="select email-on-severity">
					<select id="email-on-resolved-min-severity" name="email_on_resolved_min_severity">
						<option value="<?php 
        echo OFF;
        ?>
"><?php 
        echo lang_get('any');
        ?>
</option>
						<option disabled="disabled">-----</option>
						<?php 
        print_enum_string_option_list('severity', (int) $t_pref->email_on_resolved_min_severity);
        ?>
					</select>
				</span>
				<span class="label-style"></span>
			</fieldset>
			<fieldset class="field-container">
				<legend><label for="email-on-closed"><?php 
        echo lang_get('email_on_closed');
        ?>
</label></legend>
				<span class="checkbox"><input id="email-on-closed" type="checkbox" name="email_on_closed" <?php 
        check_checked((int) $t_pref->email_on_closed, ON);
        ?>
 /></span>
				<label for="email-on-closed-min-severity" class="email-on-severity-label"><span><?php 
        echo lang_get('with_minimum_severity');
        ?>
</span></label>
				<span class="select email-on-severity">
					<select id="email-on-closed-min-severity" name="email_on_closed_min_severity">
						<option value="<?php 
        echo OFF;
        ?>
"><?php 
        echo lang_get('any');
        ?>
</option>
						<option disabled="disabled">-----</option>
						<?php 
        print_enum_string_option_list('severity', (int) $t_pref->email_on_closed_min_severity);
        ?>
					</select>
				</span>
				<span class="label-style"></span>
			</fieldset>
			<fieldset class="field-container">
				<legend><label for="email-on-reopened"><?php 
        echo lang_get('email_on_reopened');
        ?>
</label></legend>
				<span class="checkbox"><input id="email-on-reopened" type="checkbox" name="email_on_reopened" <?php 
        check_checked((int) $t_pref->email_on_reopened, ON);
        ?>
 /></span>
				<label for="email-on-reopened-min-severity" class="email-on-severity-label"><span><?php 
        echo lang_get('with_minimum_severity');
        ?>
</span></label>
				<span class="select email-on-severity">
					<select id="email-on-reopened-min-severity" name="email_on_reopened_min_severity">
						<option value="<?php 
        echo OFF;
        ?>
"><?php 
        echo lang_get('any');
        ?>
</option>
						<option disabled="disabled">-----</option>
						<?php 
        print_enum_string_option_list('severity', (int) $t_pref->email_on_reopened_min_severity);
        ?>
					</select>
				</span>
				<span class="label-style"></span>
			</fieldset>
			<fieldset class="field-container">
				<legend><label for="email-on-bugnote-added"><?php 
        echo lang_get('email_on_bugnote_added');
        ?>
</label></legend>
				<span class="checkbox"><input id="email-on-bugnote-added" type="checkbox" name="email_on_bugnote" <?php 
        check_checked((int) $t_pref->email_on_bugnote, ON);
        ?>
 /></span>
				<label for="email-on-bugnote-min-severity" class="email-on-severity-label"><span><?php 
        echo lang_get('with_minimum_severity');
        ?>
</span></label>
				<span class="select email-on-severity">
					<select id="email-on-bugnote-min-severity" name="email_on_bugnote_min_severity">
						<option value="<?php 
        echo OFF;
        ?>
"><?php 
        echo lang_get('any');
        ?>
</option>
						<option disabled="disabled">-----</option>
						<?php 
        print_enum_string_option_list('severity', (int) $t_pref->email_on_bugnote_min_severity);
        ?>
					</select>
				</span>
				<span class="label-style"></span>
			</fieldset>
			<fieldset class="field-container">
				<legend><label for="email-on-status"><?php 
        echo lang_get('email_on_status_change');
        ?>
</label></legend>
				<span class="checkbox"><input id="email-on-status" type="checkbox" name="email_on_status" <?php 
        check_checked((int) $t_pref->email_on_status, ON);
        ?>
 /></span>
				<label for="email-on-status-min-severity" class="email-on-severity-label"><span><?php 
        echo lang_get('with_minimum_severity');
        ?>
</span></label>
				<span class="select email-on-severity">
					<select id="email-on-status-min-severity" name="email_on_status_min_severity">
						<option value="<?php 
        echo OFF;
        ?>
"><?php 
        echo lang_get('any');
        ?>
</option>
						<option disabled="disabled">-----</option>
						<?php 
        print_enum_string_option_list('severity', (int) $t_pref->email_on_status_min_severity);
        ?>
					</select>
				</span>
				<span class="label-style"></span>
			</fieldset>
			<fieldset class="field-container">
				<legend><label for="email-on-priority-change"><?php 
        echo lang_get('email_on_priority_change');
        ?>
</label></legend>
				<span class="checkbox"><input id="email-on-priority-change" type="checkbox" name="email_on_priority" <?php 
        check_checked((int) $t_pref->email_on_priority, ON);
        ?>
 /></span>
				<label for="email-on-priority-min-severity" class="email-on-severity-label"><span><?php 
        echo lang_get('with_minimum_severity');
        ?>
</span></label>
				<span class="select email-on-severity">
					<select id="email-on-priority-min-severity" name="email_on_priority_min_severity">
						<option value="<?php 
        echo OFF;
        ?>
"><?php 
        echo lang_get('any');
        ?>
</option>
						<option disabled="disabled">-----</option>
						<?php 
        print_enum_string_option_list('severity', (int) $t_pref->email_on_priority_min_severity);
        ?>
					</select>
				</span>
				<span class="label-style"></span>
			</fieldset>
			<div class="field-container">
				<label for="email-bugnote-limit"><span><?php 
        echo lang_get('email_bugnote_limit');
        ?>
</span></label>
				<span class="input"><input id="email-bugnote-limit" type="text" name="email_bugnote_limit" maxlength="2" size="2" value="<?php 
        echo $t_pref->email_bugnote_limit;
        ?>
" /></span>
				<span class="label-style"></span>
			</div>
<?php 
    } else {
        ?>
			<input type="hidden" name="email_on_new"      value="<?php 
        echo $t_pref->email_on_new;
        ?>
" />
			<input type="hidden" name="email_on_assigned" value="<?php 
        echo $t_pref->email_on_assigned;
        ?>
" />
			<input type="hidden" name="email_on_feedback" value="<?php 
        echo $t_pref->email_on_feedback;
        ?>
" />
			<input type="hidden" name="email_on_resolved" value="<?php 
        echo $t_pref->email_on_resolved;
        ?>
" />
			<input type="hidden" name="email_on_closed"   value="<?php 
        echo $t_pref->email_on_closed;
        ?>
" />
			<input type="hidden" name="email_on_reopened" value="<?php 
        echo $t_pref->email_on_reopened;
        ?>
" />
			<input type="hidden" name="email_on_bugnote"  value="<?php 
        echo $t_pref->email_on_bugnote;
        ?>
" />
			<input type="hidden" name="email_on_status"   value="<?php 
        echo $t_pref->email_on_status;
        ?>
" />
			<input type="hidden" name="email_on_priority" value="<?php 
        echo $t_pref->email_on_priority;
        ?>
" />
			<input type="hidden" name="email_on_new_min_severity"      value="<?php 
        echo $t_pref->email_on_new_min_severity;
        ?>
" />
			<input type="hidden" name="email_on_assigned_min_severity" value="<?php 
        echo $t_pref->email_on_assigned_min_severity;
        ?>
" />
			<input type="hidden" name="email_on_feedback_min_severity" value="<?php 
        echo $t_pref->email_on_feedback_min_severity;
        ?>
" />
			<input type="hidden" name="email_on_resolved_min_severity" value="<?php 
        echo $t_pref->email_on_resolved_min_severity;
        ?>
" />
			<input type="hidden" name="email_on_closed_min_severity"   value="<?php 
        echo $t_pref->email_on_closed_min_severity;
        ?>
" />
			<input type="hidden" name="email_on_reopened_min_severity" value="<?php 
        echo $t_pref->email_on_reopened_min_severity;
        ?>
" />
			<input type="hidden" name="email_on_bugnote_min_severity"  value="<?php 
        echo $t_pref->email_on_bugnote_min_severity;
        ?>
" />
			<input type="hidden" name="email_on_status_min_severity"   value="<?php 
        echo $t_pref->email_on_status_min_severity;
        ?>
" />
			<input type="hidden" name="email_on_priority_min_severity" value="<?php 
        echo $t_pref->email_on_priority_min_severity;
        ?>
" />
			<input type="hidden" name="email_bugnote_limit" value="<?php 
        echo $t_pref->email_bugnote_limit;
        ?>
" />
<?php 
    }
    ?>
			<div class="field-container">
				<label for="timezone"><span><?php 
    echo lang_get('timezone');
    ?>
</span></label>
				<span class="select">
					<select id="timezone" name="timezone">
						<?php 
    print_timezone_option_list($t_pref->timezone ? $t_pref->timezone : config_get_global('default_timezone'));
    ?>
					</select>
				</span>
				<span class="label-style"></span>
			</div>
			<div class="field-container">
				<label for="language"><span><?php 
    echo lang_get('language');
    ?>
</span></label>
				<span class="select">
					<select id="language" name="language">
						<?php 
    print_language_option_list($t_pref->language);
    ?>
					</select>
				</span>
				<span class="label-style"></span>
			</div>

			<?php 
    event_signal('EVENT_ACCOUNT_PREF_UPDATE_FORM', array($p_user_id));
    ?>
			<span class="submit-button"><input type="submit" class="button" value="<?php 
    echo lang_get('update_prefs_button');
    ?>
" /></span>
		</fieldset>
	</form>
</div>

<div id="account-prefs-reset-div" class="form-container">
	<form id="account-prefs-reset-form" method="post" action="account_prefs_reset.php">
		<fieldset>
			<?php 
    echo form_security_field('account_prefs_reset');
    ?>
			<input type="hidden" name="user_id" value="<?php 
    echo $p_user_id;
    ?>
" />
			<input type="hidden" name="redirect_url" value="<?php 
    echo $t_redirect_url;
    ?>
" />
			<span class="submit-button"><input type="submit" class="button" value="<?php 
    echo lang_get('reset_prefs_button');
    ?>
" /></span>
		</fieldset>
	</form>
</div>

<?php 
}
Example #24
0
    ?>

<tr <?php 
    echo helper_alternate_class();
    ?>
>
	<td class="category">
		<?php 
    echo plugin_lang_get('faq_view_threshold');
    ?>
	</td>
	<td >

			<select name="faq_view_threshold">
			<?php 
    print_enum_string_option_list('access_levels', $v_view_access);
    ?>
;
			</select>

	</td>
</tr>
<?php 
}
?>





<tr class="row-1">
Example #25
0
function edit_account_prefs($p_user_id = null, $p_error_if_protected = true, $p_accounts_menu = true, $p_redirect_url = '')
{
    if (null === $p_user_id) {
        $p_user_id = auth_get_current_user_id();
    }
    $t_redirect_url = $p_redirect_url;
    if (is_blank($t_redirect_url)) {
        $t_redirect_url = 'account_prefs_page.php';
    }
    # protected account check
    if (user_is_protected($p_user_id)) {
        if ($p_error_if_protected) {
            trigger_error(ERROR_PROTECTED_ACCOUNT, ERROR);
        } else {
            return;
        }
    }
    if (!user_pref_exists($p_user_id)) {
        user_pref_set_default($p_user_id);
    }
    # prefix data with u_
    $t_pref = user_pref_get($p_user_id);
    # Account Preferences Form BEGIN
    ?>
<br />
<div align="center">
<form method="post" action="account_prefs_update.php">
<input type="hidden" name="user_id" value="<?php 
    echo $p_user_id;
    ?>
" />
<input type="hidden" name="redirect_url" value="<?php 
    echo $t_redirect_url;
    ?>
" />
<table class="width75" cellspacing="1">
<tr>
	<td class="form-title">
		<?php 
    echo lang_get('default_account_preferences_title');
    ?>
	</td>
	<td class="right">
		<?php 
    if ($p_accounts_menu) {
        print_account_menu('account_prefs_page.php');
    }
    ?>
	</td>
</tr>
<tr class="row-1">
	<td class="category" width="50%">
		<?php 
    echo lang_get('default_project');
    ?>
	</td>
	<td width="50%">
		<select name="default_project">
			<?php 
    print_project_option_list($t_pref->default_project);
    ?>
		</select>
	</td>
</tr>
<tr class="row-2">
	<td class="category">
		<?php 
    echo lang_get('advanced_report');
    ?>
	</td>
	<td>
		<input type="checkbox" name="advanced_report" <?php 
    check_checked($t_pref->advanced_report, ON);
    ?>
 />
	</td>
</tr>
<tr class="row-1">
	<td class="category">
		<?php 
    echo lang_get('advanced_view');
    ?>
	</td>
	<td>
		<input type="checkbox" name="advanced_view" <?php 
    check_checked($t_pref->advanced_view, ON);
    ?>
 />
	</td>
</tr>
<tr class="row-2">
	<td class="category">
		<?php 
    echo lang_get('advanced_update');
    ?>
	</td>
	<td>
		<input type="checkbox" name="advanced_update" <?php 
    check_checked($t_pref->advanced_update, ON);
    ?>
 />
	</td>
</tr>
<tr class="row-1">
	<td class="category">
		<?php 
    echo lang_get('refresh_delay');
    ?>
	</td>
	<td>
		<input type="text" name="refresh_delay" size="4" maxlength="4" value="<?php 
    echo $t_pref->refresh_delay;
    ?>
" />
	</td>
</tr>
<tr class="row-2">
	<td class="category">
		<?php 
    echo lang_get('redirect_delay');
    ?>
	</td>
	<td>
		<input type="text" name="redirect_delay" size="1" maxlength="1" value="<?php 
    echo $t_pref->redirect_delay;
    ?>
" />
	</td>
</tr>
<tr class="row-1">
	<td class="category">
		<?php 
    echo lang_get('bugnote_order');
    ?>
	</td>
	<td>
		<input type="radio" name="bugnote_order" value="ASC" <?php 
    check_checked($t_pref->bugnote_order, 'ASC');
    ?>
 /><?php 
    echo lang_get('bugnote_order_asc');
    ?>
		<input type="radio" name="bugnote_order" value="DESC" <?php 
    check_checked($t_pref->bugnote_order, 'DESC');
    ?>
 /><?php 
    echo lang_get('bugnote_order_desc');
    ?>
	</td>
</tr>
<?php 
    if (ON == config_get('enable_email_notification')) {
        ?>
<tr class="row-2">
	<td class="category">
		<?php 
        echo lang_get('email_on_new');
        ?>
	</td>
	<td>
		<input type="checkbox" name="email_on_new" <?php 
        check_checked($t_pref->email_on_new, ON);
        ?>
 />
		<?php 
        echo lang_get('with_minimum_severity');
        ?>
		<select name="email_on_new_min_severity">
			<option value="<?php 
        echo OFF;
        ?>
"><?php 
        echo lang_get('any');
        ?>
</option>
			<option value="<?php 
        echo OFF;
        ?>
"></option>
			<?php 
        print_enum_string_option_list('severity', $t_pref->email_on_new_min_severity);
        ?>
		</select>
	</td>
</tr>
<tr class="row-1">
	<td class="category">
		<?php 
        echo lang_get('email_on_assigned');
        ?>
	</td>
	<td>
		<input type="checkbox" name="email_on_assigned" <?php 
        check_checked($t_pref->email_on_assigned, ON);
        ?>
 />
		<?php 
        echo lang_get('with_minimum_severity');
        ?>
		<select name="email_on_assigned_min_severity">
			<option value="<?php 
        echo OFF;
        ?>
"><?php 
        echo lang_get('any');
        ?>
</option>
			<option value="<?php 
        echo OFF;
        ?>
"></option>
			<?php 
        print_enum_string_option_list('severity', $t_pref->email_on_assigned_min_severity);
        ?>
		</select>
	</td>
</tr>
<tr class="row-2">
	<td class="category">
		<?php 
        echo lang_get('email_on_feedback');
        ?>
	</td>
	<td>
		<input type="checkbox" name="email_on_feedback" <?php 
        check_checked($t_pref->email_on_feedback, ON);
        ?>
 />
		<?php 
        echo lang_get('with_minimum_severity');
        ?>
		<select name="email_on_feedback_min_severity">
			<option value="<?php 
        echo OFF;
        ?>
"><?php 
        echo lang_get('any');
        ?>
</option>
			<option value="<?php 
        echo OFF;
        ?>
"></option>
			<?php 
        print_enum_string_option_list('severity', $t_pref->email_on_feedback_min_severity);
        ?>
		</select>
	</td>
</tr>
<tr class="row-1">
	<td class="category">
		<?php 
        echo lang_get('email_on_resolved');
        ?>
	</td>
	<td>
		<input type="checkbox" name="email_on_resolved" <?php 
        check_checked($t_pref->email_on_resolved, ON);
        ?>
 />
		<?php 
        echo lang_get('with_minimum_severity');
        ?>
		<select name="email_on_resolved_min_severity">
			<option value="<?php 
        echo OFF;
        ?>
"><?php 
        echo lang_get('any');
        ?>
</option>
			<option value="<?php 
        echo OFF;
        ?>
"></option>
			<?php 
        print_enum_string_option_list('severity', $t_pref->email_on_resolved_min_severity);
        ?>
		</select>
	</td>
</tr>
<tr class="row-2">
	<td class="category">
		<?php 
        echo lang_get('email_on_closed');
        ?>
	</td>
	<td>
		<input type="checkbox" name="email_on_closed" <?php 
        check_checked($t_pref->email_on_closed, ON);
        ?>
 />
		<?php 
        echo lang_get('with_minimum_severity');
        ?>
		<select name="email_on_closed_min_severity">
			<option value="<?php 
        echo OFF;
        ?>
"><?php 
        echo lang_get('any');
        ?>
</option>
			<option value="<?php 
        echo OFF;
        ?>
"></option>
			<?php 
        print_enum_string_option_list('severity', $t_pref->email_on_closed_min_severity);
        ?>
		</select>
	</td>
</tr>
<tr class="row-1">
	<td class="category">
		<?php 
        echo lang_get('email_on_reopened');
        ?>
	</td>
	<td>
		<input type="checkbox" name="email_on_reopened" <?php 
        check_checked($t_pref->email_on_reopened, ON);
        ?>
 />
		<?php 
        echo lang_get('with_minimum_severity');
        ?>
		<select name="email_on_reopened_min_severity">
			<option value="<?php 
        echo OFF;
        ?>
"><?php 
        echo lang_get('any');
        ?>
</option>
			<option value="<?php 
        echo OFF;
        ?>
"></option>
			<?php 
        print_enum_string_option_list('severity', $t_pref->email_on_reopened_min_severity);
        ?>
		</select>
	</td>
</tr>
<tr class="row-2">
	<td class="category">
		<?php 
        echo lang_get('email_on_bugnote_added');
        ?>
	</td>
	<td>
		<input type="checkbox" name="email_on_bugnote" <?php 
        check_checked($t_pref->email_on_bugnote, ON);
        ?>
 />
		<?php 
        echo lang_get('with_minimum_severity');
        ?>
		<select name="email_on_bugnote_min_severity">
			<option value="<?php 
        echo OFF;
        ?>
"><?php 
        echo lang_get('any');
        ?>
</option>
			<option value="<?php 
        echo OFF;
        ?>
"></option>
			<?php 
        print_enum_string_option_list('severity', $t_pref->email_on_bugnote_min_severity);
        ?>
		</select>
	</td>
</tr>
<tr class="row-1">
	<td class="category">
		<?php 
        echo lang_get('email_on_status_change');
        ?>
	</td>
	<td>
		<input type="checkbox" name="email_on_status" <?php 
        check_checked($t_pref->email_on_status, ON);
        ?>
 />
		<?php 
        echo lang_get('with_minimum_severity');
        ?>
		<select name="email_on_status_min_severity">
			<option value="<?php 
        echo OFF;
        ?>
"><?php 
        echo lang_get('any');
        ?>
</option>
			<option value="<?php 
        echo OFF;
        ?>
"></option>
			<?php 
        print_enum_string_option_list('severity', $t_pref->email_on_status_min_severity);
        ?>
		</select>
	</td>
</tr>
<tr class="row-2">
	<td class="category">
		<?php 
        echo lang_get('email_on_priority_change');
        ?>
	</td>
	<td>
		<input type="checkbox" name="email_on_priority" <?php 
        check_checked($t_pref->email_on_priority, ON);
        ?>
 />
		<?php 
        echo lang_get('with_minimum_severity');
        ?>
		<select name="email_on_priority_min_severity">
			<option value="<?php 
        echo OFF;
        ?>
"><?php 
        echo lang_get('any');
        ?>
</option>
			<option value="<?php 
        echo OFF;
        ?>
"></option>
			<?php 
        print_enum_string_option_list('severity', $t_pref->email_on_priority_min_severity);
        ?>
		</select>
	</td>
</tr>
<tr class="row-1">
	<td class="category">
		<?php 
        echo lang_get('email_bugnote_limit');
        ?>
	</td>
	<td>
		<input type="text" name="email_bugnote_limit" maxlength="2" size="2" value="<?php 
        echo $t_pref->email_bugnote_limit;
        ?>
">
	</td>
</tr>
<?php 
    } else {
        ?>
		<input type="hidden" name="email_on_new"      value="<?php 
        echo $t_pref->email_on_new;
        ?>
" />
		<input type="hidden" name="email_on_assigned" value="<?php 
        echo $t_pref->email_on_assigned;
        ?>
" />
		<input type="hidden" name="email_on_feedback" value="<?php 
        echo $t_pref->email_on_feedback;
        ?>
" />
		<input type="hidden" name="email_on_resolved" value="<?php 
        echo $t_pref->email_on_resolved;
        ?>
" />
		<input type="hidden" name="email_on_closed"   value="<?php 
        echo $t_pref->email_on_closed;
        ?>
" />
		<input type="hidden" name="email_on_reopened" value="<?php 
        echo $t_pref->email_on_reopened;
        ?>
" />
		<input type="hidden" name="email_on_bugnote"  value="<?php 
        echo $t_pref->email_on_bugnote;
        ?>
" />
		<input type="hidden" name="email_on_status"   value="<?php 
        echo $t_pref->email_on_status;
        ?>
" />
		<input type="hidden" name="email_on_priority" value="<?php 
        echo $t_pref->email_on_priority;
        ?>
" />
		<input type="hidden" name="email_on_new_min_severity"      value="<?php 
        echo $t_pref->email_on_new_min_severity;
        ?>
" />
		<input type="hidden" name="email_on_assigned_min_severity" value="<?php 
        echo $t_pref->email_on_assigned_min_severity;
        ?>
" />
		<input type="hidden" name="email_on_feedback_min_severity" value="<?php 
        echo $t_pref->email_on_feedback_min_severity;
        ?>
" />
		<input type="hidden" name="email_on_resolved_min_severity" value="<?php 
        echo $t_pref->email_on_resolved_min_severity;
        ?>
" />
		<input type="hidden" name="email_on_closed_min_severity"   value="<?php 
        echo $t_pref->email_on_closed_min_severity;
        ?>
" />
		<input type="hidden" name="email_on_reopened_min_severity" value="<?php 
        echo $t_pref->email_on_reopened_min_severity;
        ?>
" />
		<input type="hidden" name="email_on_bugnote_min_severity"  value="<?php 
        echo $t_pref->email_on_bugnote_min_severity;
        ?>
" />
		<input type="hidden" name="email_on_status_min_severity"   value="<?php 
        echo $t_pref->email_on_status_min_severity;
        ?>
" />
		<input type="hidden" name="email_on_priority_min_severity" value="<?php 
        echo $t_pref->email_on_priority_min_severity;
        ?>
" />
		<input type="hidden" name="email_bugnote_limit" value="<?php 
        echo $t_pref->email_bugnote_limit;
        ?>
" />
<?php 
    }
    ?>
<tr class="row-2">
	<td class="category">
		<?php 
    echo lang_get('language');
    ?>
	</td>
	<td>
		<select name="language">
			<?php 
    print_language_option_list($t_pref->language);
    ?>
		</select>
	</td>
</tr>
<tr>
	<td colspan="2" class="center">
		<input type="submit" class="button" value="<?php 
    echo lang_get('update_prefs_button');
    ?>
" />
	</td>
</tr>
</table>
</form>
</div>

<br />

<div class="border-center">
	<form method="post" action="account_prefs_reset.php">
	<input type="hidden" name="user_id" value="<?php 
    echo $p_user_id;
    ?>
" />
	<input type="hidden" name="redirect_url" value="<?php 
    echo $t_redirect_url;
    ?>
" />
	<input type="submit" class="button" value="<?php 
    echo lang_get('reset_prefs_button');
    ?>
" />
	</form>
</div>

<?php 
}
function access_row()
{
    global $t_access, $t_can_change_flags, $t_colour_project, $t_colour_global;
    $t_enum_status = get_enum_to_array(config_get('status_enum_string'));
    $t_file_new = config_get_global('report_bug_threshold');
    $t_global_new = config_get('report_bug_threshold', null, null, ALL_PROJECTS);
    $t_project_new = config_get('report_bug_threshold');
    $t_file_set = config_get_global('set_status_threshold');
    foreach ($t_enum_status as $t_status => $t_status_label) {
        if (!isset($t_file_set[$t_status])) {
            $t_file_set[$t_status] = config_get_global('update_bug_status_threshold');
        }
    }
    $t_global_set = config_get('set_status_threshold', null, null, ALL_PROJECTS);
    foreach ($t_enum_status as $t_status => $t_status_label) {
        if (!isset($t_file_set[$t_status])) {
            $t_file_set[$t_status] = config_get('update_bug_status_threshold', null, null, ALL_PROJECTS);
        }
    }
    $t_project_set = config_get('set_status_threshold');
    foreach ($t_enum_status as $t_status => $t_status_label) {
        if (!isset($t_file_set[$t_status])) {
            $t_file_set[$t_status] = config_get('update_bug_status_threshold');
        }
    }
    foreach ($t_enum_status as $t_status => $t_status_label) {
        echo '<tr ' . helper_alternate_class() . '><td width="30%">' . string_no_break(get_enum_to_string(lang_get('status_enum_string'), $t_status)) . '</td>';
        if (NEW_ == $t_status) {
            $t_level = $t_project_new;
            $t_can_change = $t_access >= config_get_access('report_bug_threshold');
            $t_colour = '';
            if ($t_global_new != $t_file_new) {
                $t_colour = ' bgcolor="' . $t_colour_global . '" ';
                # all projects override
                if ($t_can_change) {
                    set_overrides('report_bug_threshold');
                }
            }
            if ($t_project_new != $t_global_new) {
                $t_colour = ' bgcolor="' . $t_colour_project . '" ';
                # project overrides
                if ($t_can_change) {
                    set_overrides('report_bug_threshold');
                }
            }
        } else {
            $t_level = isset($t_project_set[$t_status]) ? $t_project_set[$t_status] : false;
            $t_level_global = isset($t_global_set[$t_status]) ? $t_global_set[$t_status] : false;
            $t_level_file = isset($t_file_set[$t_status]) ? $t_file_set[$t_status] : false;
            $t_can_change = $t_access >= config_get_access('set_status_threshold');
            $t_colour = '';
            if ($t_level_global != $t_level_file) {
                $t_colour = ' bgcolor="' . $t_colour_global . '" ';
                # all projects override
                if ($t_can_change) {
                    set_overrides('set_status_threshold');
                }
            }
            if ($t_level != $t_level_global) {
                $t_colour = ' bgcolor="' . $t_colour_project . '" ';
                # project overrides
                if ($t_can_change) {
                    set_overrides('set_status_threshold');
                }
            }
        }
        if ($t_can_change) {
            echo '<td' . $t_colour . '><select name="access_change_' . $t_status . '">';
            print_enum_string_option_list('access_levels', $t_level);
            echo '</select> </td>';
            $t_can_change_flags = true;
        } else {
            echo '<td class="center"' . $t_colour . '>' . get_enum_to_string(config_get('access_levels_enum_string'), $t_level) . '</td>';
        }
        echo '</tr>' . "\n";
    }
}
		<input type="checkbox" name="announcement" <?php 
check_checked($v_announcement, 1);
?>
 />
	</td>
</tr>
<tr class="row-1">
	<td class="category" width="25%">
		<?php 
echo lang_get('view_status');
?>
	</td>
	<td width="75%">
		<select name="view_state">
			<?php 
print_enum_string_option_list('view_state', $v_view_state);
?>
		</select>
	</td>
</tr>
<tr>
	<td>
		<span class="required">* <?php 
echo lang_get('required');
?>
</span>
	</td>
	<td class="center">
		<input type="submit" class="button" value="<?php 
echo lang_get('update_news_button');
?>
                print_assign_to_option_list(0, $t_project_id);
                break;
            case 'VIEW_STATUS':
                print_enum_string_option_list('view_state', config_get('default_bug_view_status'));
                break;
            case 'UP_CATEGORY':
                print_category_option_list();
                break;
            case 'UP_TARGET_VERSION':
            case 'UP_FIXED_IN_VERSION':
                print_version_option_list('', $t_project_id, VERSION_ALL);
                break;
        }
        # other forms use the same function to display the list
        if ($t_request > '') {
            print_enum_string_option_list($t_request, FIXED);
        }
        echo '</select>';
    }
    ?>
	</td>
</tr>
	<?php 
    if (isset($t_question_title2)) {
        switch ($f_action) {
            case 'RESOLVE':
                $t_show_version = ON == config_get('show_product_version') || AUTO == config_get('show_product_version') && count(version_get_all_rows($t_project_id)) > 0;
                if ($t_show_version) {
                    ?>
		<tr class="row-2">
			<td class="category">
if ($t_show_resolution) {
    ?>
	<tr>
		<th class="category">
			<label for="resolution"><?php 
    echo lang_get('resolution');
    ?>
</label>
		</th>
		<td>
			<select <?php 
    echo helper_get_tab_index();
    ?>
 name="resolution">
				<?php 
    print_enum_string_option_list('resolution', config_get('default_bug_resolution'));
    ?>
			</select>
		</td>
	</tr>
<?php 
}
?>

<?php 
# Target Version (if permissions allow)
if ($t_show_target_version) {
    ?>
	<tr>
		<th class="category">
			<label for="target_version"><?php 
				<span class="label-style"></span>
			</div>
			<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
				<label for="custom-field-access-level-r"><span><?php echo lang_get( 'custom_field_access_level_r' ) ?></span></label>
				<span class="select">
					<select id="custom-field-access-level-r" name="access_level_r">
						<?php print_enum_string_option_list( 'access_levels', $t_definition['access_level_r'] ) ?>
					</select>
				</span>
				<span class="label-style"></span>
			</div>
			<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
				<label for="custom-field-access-level-rw"><span><?php echo lang_get( 'custom_field_access_level_rw' ) ?></span></label>
				<span class="select">
					<select id="custom-field-access-level-rw" name="access_level_rw">
						<?php print_enum_string_option_list( 'access_levels', $t_definition['access_level_rw'] ) ?>
					</select>
				</span>
				<span class="label-style"></span>
			</div>
			<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
				<label for="custom-field-length-min"><span><?php echo lang_get( 'custom_field_length_min' ) ?></span></label>
				<span class="input"><input type="text" id="custom-field-length-min" name="length_min" size="32" maxlength="64" value="<?php echo $t_definition['length_min'] ?>" /></span>
				<span class="label-style"></span>
			</div>
			<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
				<label for="custom-field-length-max"><span><?php echo lang_get( 'custom_field_length_max' ) ?></span></label>
				<span class="input"><input type="text" id="custom-field-length-max" name="length_max" size="32" maxlength="64" value="<?php echo $t_definition['length_max'] ?>" /></span>
				<span class="label-style"></span>
			</div>
			<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">