Blame Identity/Webenv/App/Mantis/1.1.2-1.fc9/manage_config_workflow_page.php

f2e824
f2e824
# Mantis - a php based bugtracking system
f2e824
f2e824
# Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
f2e824
# Copyright (C) 2002 - 2007  Mantis Team   - mantisbt-dev@lists.sourceforge.net
f2e824
f2e824
# Mantis is free software: you can redistribute it and/or modify
f2e824
# it under the terms of the GNU General Public License as published by
f2e824
# the Free Software Foundation, either version 2 of the License, or
f2e824
# (at your option) any later version.
f2e824
#
f2e824
# Mantis is distributed in the hope that it will be useful,
f2e824
# but WITHOUT ANY WARRANTY; without even the implied warranty of
f2e824
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
f2e824
# GNU General Public License for more details.
f2e824
#
f2e824
# You should have received a copy of the GNU General Public License
f2e824
# along with Mantis.  If not, see <http://www.gnu.org/licenses/>.
f2e824
f2e824
	# --------------------------------------------------------
f2e824
	# $Id: manage_config_workflow_page.php,v 1.21.2.1 2007-10-13 22:33:25 giallu Exp $
f2e824
	# --------------------------------------------------------
f2e824
f2e824
	require_once( 'core.php' );
f2e824
f2e824
	$t_core_path = config_get( 'core_path' );
f2e824
	require_once( $t_core_path . 'email_api.php' );
f2e824
f2e824
	auth_reauthenticate();
f2e824
f2e824
	html_page_top1( lang_get( 'manage_workflow_config' ) );
f2e824
	html_page_top2();
f2e824
f2e824
	print_manage_menu( 'adm_permissions_report.php' );
f2e824
	print_manage_config_menu( 'manage_config_workflow_page.php' );
f2e824
f2e824
	$t_access = current_user_get_access_level();
f2e824
	$t_project = helper_get_current_project();
f2e824
	$t_can_change_workflow = $t_access >= config_get_access( 'status_enum_workflow' );
f2e824
	$t_can_change_flags = $t_can_change_workflow;
f2e824
	$t_overrides = array();
f2e824
	
f2e824
	function set_overrides( $p_config ) {
f2e824
	   global $t_overrides;
f2e824
	   if ( ! in_array( $p_config, $t_overrides ) ) {
f2e824
	       $t_overrides[] = $p_config;
f2e824
	   }
f2e824
	}
f2e824
f2e824
	function parse_workflow( $p_enum_workflow ) {
f2e824
        $t_status_arr  = get_enum_to_array( config_get( 'status_enum_string' ) );
f2e824
        if ( 0 == count( $p_enum_workflow ) ) {
f2e824
            # workflow is not set, default it to all transitions
f2e824
	        foreach ( $t_status_arr as $t_status => $t_label ) {
f2e824
		        $t_temp_workflow = array();
f2e824
			    foreach ( $t_status_arr as $t_next => $t_next_label ) {
f2e824
				    if ( $t_status <> $t_next ) {
f2e824
				       $t_temp_workflow[] = $t_next . ':' . $t_next_label;
f2e824
				    }
f2e824
			    }
f2e824
		        $p_enum_workflow[$t_status] = implode( ',', $t_temp_workflow );
f2e824
		    }
f2e824
	    }
f2e824
f2e824
    	$t_entry = array();
f2e824
    	$t_exit = array();
f2e824
f2e824
    	# prepopulate new bug state (bugs go from nothing to here)
f2e824
    	$t_submit_status_array = config_get( 'bug_submit_status' );
f2e824
    	$t_new_label = get_enum_to_string( lang_get( 'status_enum_string' ), NEW_ );
f2e824
    	if ( is_array( $t_submit_status_array ) ) {
f2e824
    		# @@@ (thraxisp) this is not implemented in bug_api.php
f2e824
    		foreach ($t_submit_status_array as $t_access => $t_status ) {
f2e824
    			$t_entry[$t_status][0] = $t_new_label;
f2e824
    			$t_exit[0][$t_status] = $t_new_label;
f2e824
    		}
f2e824
    	} else {
f2e824
			$t_status = $t_submit_status_array;
f2e824
			$t_entry[$t_status][0] = $t_new_label;
f2e824
			$t_exit[0][$t_status] = $t_new_label;
f2e824
    	}
f2e824
f2e824
        # add user defined arcs and implicit reopen arcs
f2e824
    	$t_reopen = config_get( 'bug_reopen_status' );
f2e824
    	$t_reopen_label = get_enum_to_string( lang_get( 'resolution_enum_string' ), REOPENED );
f2e824
    	$t_resolved_status = config_get( 'bug_resolved_status_threshold' );
f2e824
    	$t_default = array();
f2e824
    	foreach ( $t_status_arr as $t_status => $t_status_label ) {
f2e824
    		if ( isset( $p_enum_workflow[$t_status] ) ) {
f2e824
    			$t_next_arr = get_enum_to_array( $p_enum_workflow[$t_status] );
f2e824
    			foreach ( $t_next_arr as $t_next => $t_next_label) {
f2e824
                    if ( ! isset( $t_default[$t_status] ) ) {
f2e824
    	                $t_default[$t_status] = $t_next;
f2e824
    	            }
f2e824
					$t_exit[$t_status][$t_next] = '';
f2e824
					$t_entry[$t_next][$t_status] = '';
f2e824
				}
f2e824
    		} else {
f2e824
    			$t_exit[$t_status] = array();
f2e824
    		}
f2e824
    		if ( $t_status >= $t_resolved_status ) {
f2e824
    			$t_exit[$t_status][$t_reopen] = $t_reopen_label;
f2e824
    			$t_entry[$t_reopen][$t_status] = $t_reopen_label;
f2e824
    		}
f2e824
    		if ( ! isset( $t_entry[$t_status] ) ) {
f2e824
    			$t_entry[$t_status] = array();
f2e824
    		}
f2e824
    	}
f2e824
        return array( 'entry' => $t_entry, 'exit' => $t_exit, 'default' => $t_default );
f2e824
    }
f2e824
f2e824
f2e824
	# Get the value associated with the specific action and flag.
f2e824
	function show_flag( $p_from_status_id, $p_to_status_id ) {
f2e824
		global $t_can_change_workflow, $t_overrides, $t_file_workflow, $t_global_workflow, $t_project_workflow, $t_colour_global, $t_colour_project;
f2e824
		if ( $p_from_status_id <> $p_to_status_id ) {
f2e824
            $t_file = isset( $t_file_workflow['exit'][$p_from_status_id][$p_to_status_id] ) ? 1 : 0 ;
f2e824
            $t_global = isset( $t_global_workflow['exit'][$p_from_status_id][$p_to_status_id] ) ? 1 : 0 ;
f2e824
            $t_project = isset( $t_project_workflow['exit'][$p_from_status_id][$p_to_status_id] ) ? 1 : 0;
f2e824
f2e824
            $t_colour = '';
f2e824
            if ( $t_global != $t_file ) {
f2e824
                $t_colour = ' bgcolor="' . $t_colour_global . '" '; # all projects override
f2e824
                if ( $t_can_change_workflow ) {
f2e824
                    set_overrides( 'status_enum_workflow' );
f2e824
                }
f2e824
            }
f2e824
            if ( $t_project != $t_global ) {
f2e824
                $t_colour = ' bgcolor="' . $t_colour_project . '" '; # project overrides
f2e824
                if ( $t_can_change_workflow ) {
f2e824
                    set_overrides( 'status_enum_workflow' );
f2e824
                }
f2e824
            }
f2e824
            $t_value = '';
f2e824
f2e824
			$t_flag = ( 1 == $t_project );
f2e824
			$t_label = $t_flag ? $t_project_workflow['exit'][$p_from_status_id][$p_to_status_id] : '';
f2e824
f2e824
			if ( $t_can_change_workflow ) {
f2e824
				$t_flag_name = $p_from_status_id . ':' . $p_to_status_id;
f2e824
				$t_set = $t_flag ? "CHECKED" : "";
f2e824
				$t_value .= "<input type=\"checkbox\" name=\"flag[]\" value=\"$t_flag_name\" $t_set />";
f2e824
			} else {
f2e824
				$t_value .= $t_flag ? 'X' : ' ';
f2e824
			}
f2e824
f2e824
			if ( $t_flag && ( '' != $t_label ) ) {
f2e824
				$t_value .= '
(' . $t_label . ')';
f2e824
			}
f2e824
		} else {
f2e824
            $t_value = ' ';
f2e824
		}
f2e824
f2e824
		$t_value .= '';
f2e824
f2e824
		return $t_value;
f2e824
	}
f2e824
f2e824
	function section_begin( $p_section_name ) {
f2e824
		$t_enum_status = explode_enum_string( config_get( 'status_enum_string' ) );
f2e824
		echo '';
f2e824
		echo ''
f2e824
			. strtoupper( $p_section_name ) . '' . "\n";
f2e824
		echo '' . lang_get( 'current_status' ) . '';
f2e824
		echo ''
f2e824
			. lang_get( 'next_status' ) . '';
f2e824
		echo "\n";
f2e824
		foreach( $t_enum_status as $t_status ) {
f2e824
			$t_entry_array = explode_enum_arr( $t_status );
f2e824
			echo ' ' . string_no_break( get_enum_to_string( lang_get( 'status_enum_string' ), $t_entry_array[0] ) ) . ' ';
f2e824
		}
f2e824
			echo '' . lang_get( 'custom_field_default_value' ) . '';
f2e824
		echo '' . "\n";
f2e824
	}
f2e824
f2e824
	function capability_row( $p_from_status ) {
f2e824
		global $t_file_workflow, $t_global_workflow, $t_project_workflow, $t_colour_global, $t_colour_project, $t_can_change_workflow;
f2e824
		$t_enum_status = get_enum_to_array( config_get( 'status_enum_string' ) );
f2e824
		echo '' . string_no_break( get_enum_to_string( lang_get( 'status_enum_string' ), $p_from_status ) ) . '';
f2e824
		foreach ( $t_enum_status as $t_to_status_id => $t_to_status_label ) {
f2e824
			echo show_flag( $p_from_status, $t_to_status_id );
f2e824
		}
f2e824
f2e824
        $t_file = isset( $t_file_workflow['default'][$p_from_status] ) ? $t_file_workflow['default'][$p_from_status] : 0 ;
f2e824
        $t_global = isset( $t_global_workflow['default'][$p_from_status] ) ? $t_global_workflow['default'][$p_from_status] : 0 ;
f2e824
        $t_project = isset( $t_project_workflow['default'][$p_from_status] ) ? $t_project_workflow['default'][$p_from_status] : 0;
f2e824
f2e824
        $t_colour = '';
f2e824
        if ( $t_global != $t_file ) {
f2e824
            $t_colour = ' bgcolor="' . $t_colour_global . '" '; # all projects override
f2e824
            if ( $t_can_change_workflow ) {
f2e824
                set_overrides( 'status_enum_workflow' );
f2e824
            }
f2e824
        }
f2e824
        if ( $t_project != $t_global ) {
f2e824
            $t_colour = ' bgcolor="' . $t_colour_project . '" '; # project overrides
f2e824
            if ( $t_can_change_workflow ) {
f2e824
                set_overrides( 'status_enum_workflow' );
f2e824
            }
f2e824
        }
f2e824
		echo '';
f2e824
		if ( $t_can_change_workflow ) {
f2e824
            echo '<select name="default_' . $p_from_status . '">';
f2e824
            print_enum_string_option_list( 'status', $t_project );
f2e824
            echo '</select>';
f2e824
        } else {
f2e824
            echo get_enum_to_string( lang_get( 'status_enum_string' ), $t_project );
f2e824
        }
f2e824
        echo ' ';
f2e824
		echo '' . "\n";
f2e824
	}
f2e824
f2e824
	function section_end() {
f2e824
		echo '
' . "\n";
f2e824
	}
f2e824
f2e824
	function threshold_begin( $p_section_name ) {
f2e824
		echo '';
f2e824
		echo '' . strtoupper( $p_section_name ) . '' . "\n";
f2e824
		echo '' . lang_get( 'threshold' ) . '';
f2e824
		echo '' . lang_get( 'status_level' ) . '';
f2e824
		echo '' . lang_get( 'alter_level' ) . '';
f2e824
		echo "\n";
f2e824
	}
f2e824
f2e824
	function threshold_row( $p_threshold ) {
f2e824
		global $t_access, $t_can_change_flags, $t_colour_project, $t_colour_global;
f2e824
f2e824
        $t_file = config_get_global( $p_threshold );
f2e824
        $t_global = config_get( $p_threshold, null, null, ALL_PROJECTS );
f2e824
        $t_project = config_get( $p_threshold );
f2e824
		$t_can_change_threshold = $t_access >= config_get_access( $p_threshold );
f2e824
        $t_colour = '';
f2e824
        if ( $t_global != $t_file ) {
f2e824
            $t_colour = ' bgcolor="' . $t_colour_global . '" '; # all projects override
f2e824
            if ( $t_can_change_threshold ) {
f2e824
                set_overrides( $p_threshold );
f2e824
            }
f2e824
        }
f2e824
        if ( $t_project != $t_global ) {
f2e824
            $t_colour = ' bgcolor="' . $t_colour_project . '" '; # project overrides
f2e824
            if ( $t_can_change_threshold ) {
f2e824
                set_overrides( $p_threshold );
f2e824
            }
f2e824
        }
f2e824
f2e824
		echo '' . lang_get( 'desc_' . $p_threshold ) . '';
f2e824
		if ( $t_can_change_threshold ) {
f2e824
			echo '<td' . $t_colour . '><select name="threshold_' . $p_threshold . '">';
f2e824
			print_enum_string_option_list( 'status', $t_project );
f2e824
			echo '</select> ';
f2e824
			echo '<select name="access_' . $p_threshold . '">';
f2e824
			print_enum_string_option_list( 'access_levels', config_get_access( $p_threshold ) );
f2e824
			echo '</select> ';
f2e824
			$t_can_change_flags = true;
f2e824
		} else {
f2e824
			echo '<td' . $t_colour . '>' . get_enum_to_string( lang_get( 'status_enum_string' ), $t_project ) . ' ';
f2e824
			echo '' . get_enum_to_string( lang_get( 'access_levels_enum_string' ), config_get_access( $p_threshold ) ) . ' ';
f2e824
		}
f2e824
f2e824
		echo '' . "\n";
f2e824
	}
f2e824
f2e824
	function threshold_end() {
f2e824
		echo '
' . "\n";
f2e824
	}
f2e824
f2e824
	function access_begin( $p_section_name ) {
f2e824
		$t_enum_status = explode_enum_string( config_get( 'status_enum_string' ) );
f2e824
		echo '';
f2e824
		echo ''
f2e824
			. strtoupper( $p_section_name ) . '' . "\n";
f2e824
		echo '' . lang_get( 'access_change' ) . '';
f2e824
	}
f2e824
f2e824
	function access_row( ) {
f2e824
		global $t_access, $t_can_change_flags, $t_colour_project, $t_colour_global;
f2e824
f2e824
		$t_enum_status = get_enum_to_array( config_get( 'status_enum_string' ) );
f2e824
f2e824
		$t_file_new = config_get_global( 'report_bug_threshold' );
f2e824
		$t_global_new = config_get( 'report_bug_threshold', null, null, ALL_PROJECTS );
f2e824
		$t_project_new = config_get( 'report_bug_threshold' );
f2e824
f2e824
		$t_file_set = config_get_global( 'set_status_threshold' );
f2e824
		foreach ( $t_enum_status as $t_status => $t_status_label) {
f2e824
		    if ( ! isset( $t_file_set[$t_status] ) ) {
f2e824
		        $t_file_set[$t_status] = config_get_global('update_bug_status_threshold');
f2e824
		    }
f2e824
		}
f2e824
f2e824
		$t_global_set = config_get( 'set_status_threshold', null, null, ALL_PROJECTS );
f2e824
		foreach ( $t_enum_status as $t_status => $t_status_label) {
f2e824
		    if ( ! isset( $t_file_set[$t_status] ) ) {
f2e824
		        $t_file_set[$t_status] = config_get('update_bug_status_threshold', null, null, ALL_PROJECTS );
f2e824
		    }
f2e824
		}
f2e824
f2e824
		$t_project_set = config_get( 'set_status_threshold' );
f2e824
		foreach ( $t_enum_status as $t_status => $t_status_label) {
f2e824
		    if ( ! isset( $t_file_set[$t_status] ) ) {
f2e824
		        $t_file_set[$t_status] = config_get('update_bug_status_threshold' );
f2e824
		    }
f2e824
		}
f2e824
f2e824
		foreach ( $t_enum_status as $t_status => $t_status_label) {
f2e824
			echo '' . string_no_break( get_enum_to_string( lang_get( 'status_enum_string' ), $t_status ) ) . '';
f2e824
			if ( NEW_ == $t_status ) {
f2e824
				$t_level = $t_project_new;
f2e824
				$t_can_change = ( $t_access >= config_get_access( 'report_bug_threshold' ) );
f2e824
                $t_colour = '';
f2e824
                if ( $t_global_new != $t_file_new ) {
f2e824
                    $t_colour = ' bgcolor="' . $t_colour_global . '" '; # all projects override
f2e824
                    if ( $t_can_change ) {
f2e824
                        set_overrides( 'report_bug_threshold' );
f2e824
                    }
f2e824
                }
f2e824
                if ( $t_project_new != $t_global_new ) {
f2e824
                    $t_colour = ' bgcolor="' . $t_colour_project . '" '; # project overrides
f2e824
                    if ( $t_can_change ) {
f2e824
                        set_overrides( 'report_bug_threshold' );
f2e824
                    }
f2e824
                }
f2e824
			} else {
f2e824
				$t_level = ( isset( $t_project_set[$t_status] ) ? $t_project_set[$t_status] : false );
f2e824
				$t_level_global = ( isset( $t_global_set[$t_status] ) ? $t_global_set[$t_status] : false );
f2e824
				$t_level_file = ( isset( $t_file_set[$t_status] ) ? $t_file_set[$t_status] : false );
f2e824
				$t_can_change = ( $t_access >= config_get_access( 'set_status_threshold' ) );
f2e824
                $t_colour = '';
f2e824
                if ( $t_level_global != $t_level_file ) {
f2e824
                    $t_colour = ' bgcolor="' . $t_colour_global . '" '; # all projects override
f2e824
                    if ( $t_can_change ) {
f2e824
                        set_overrides( 'set_status_threshold' );
f2e824
                    }
f2e824
                }
f2e824
                if ( $t_level != $t_level_global ) {
f2e824
                    $t_colour = ' bgcolor="' . $t_colour_project . '" '; # project overrides
f2e824
                    if ( $t_can_change ) {
f2e824
                        set_overrides( 'set_status_threshold' );
f2e824
                    }
f2e824
                }
f2e824
			}
f2e824
			if ( $t_can_change ) {
f2e824
				echo '<td' . $t_colour . '><select name="access_change_' . $t_status . '">';
f2e824
				print_enum_string_option_list( 'access_levels', $t_level );
f2e824
				echo '</select> ';
f2e824
			    $t_can_change_flags = true;
f2e824
			} else {
f2e824
				echo '' . get_enum_to_string( lang_get( 'access_levels_enum_string' ), $t_level ) . '';
f2e824
			}
f2e824
			echo '' . "\n";
f2e824
		}
f2e824
	}
f2e824
f2e824
	echo '

';
f2e824
f2e824
	# count arcs in and out of each status
f2e824
	$t_enum_status = config_get( 'status_enum_string' );
f2e824
	$t_status_arr  = get_enum_to_array( $t_enum_status );
f2e824
f2e824
	$t_extra_enum_status = '0:non-existent,' . $t_enum_status;
f2e824
	$t_lang_enum_status = '0:' . lang_get( 'non_existent' ) . ',' . lang_get( 'status_enum_string' );
f2e824
	$t_all_status = explode( ',', $t_extra_enum_status);
f2e824
f2e824
	# gather all versions of the workflow
f2e824
	$t_file_workflow = parse_workflow( config_get_global( 'status_enum_workflow' ) );
f2e824
	$t_global_workflow = parse_workflow( config_get( 'status_enum_workflow', null, null, ALL_PROJECTS ) );
f2e824
	$t_project_workflow = parse_workflow( config_get( 'status_enum_workflow' ) );
f2e824
f2e824
    # validate the project workflow
f2e824
	$t_validation_result = '';
f2e824
	foreach ( $t_status_arr as $t_status => $t_label ) {
f2e824
		if ( isset( $t_project_workflow['exit'][$t_status][$t_status] ) ) {
f2e824
			$t_validation_result .= ''
f2e824
							. get_enum_to_string( $t_lang_enum_status, $t_status )
f2e824
							. '' . lang_get( 'superfluous' ) . '';
f2e824
		}
f2e824
	}
f2e824
f2e824
	# check for entry == 0 without exit == 0, unreachable state
f2e824
	foreach ( $t_status_arr as $t_status => $t_status_label) {
f2e824
		if ( ( 0 == count( $t_project_workflow['entry'][$t_status] ) ) && ( 0 < count( $t_project_workflow['exit'][$t_status] ) ) ){
f2e824
			$t_validation_result .= ''
f2e824
							. get_enum_to_string( $t_lang_enum_status, $t_status )
f2e824
							. '' . lang_get( 'unreachable' ) . '';
f2e824
		}
f2e824
	}
f2e824
f2e824
	# check for exit == 0 without entry == 0, unleaveable state
f2e824
	foreach ( $t_status_arr as $t_status => $t_status_label ) {
f2e824
		if ( ( 0 == count( $t_project_workflow['exit'][$t_status] ) ) && ( 0 < count( $t_project_workflow['entry'][$t_status] ) ) ){
f2e824
			$t_validation_result .= ''
f2e824
							. get_enum_to_string( $t_lang_enum_status, $t_status )
f2e824
							. '' . lang_get( 'no_exit' ) . '';
f2e824
		}
f2e824
	}
f2e824
f2e824
	# check for exit == 0 and entry == 0, isolated state
f2e824
	foreach ( $t_status_arr as $t_status => $t_status_label ) {
f2e824
		if ( ( 0 == count( $t_project_workflow['exit'][$t_status] ) ) && ( 0 == count( $t_project_workflow['entry'][$t_status] ) ) ){
f2e824
			$t_validation_result .= ''
f2e824
							. get_enum_to_string( $t_lang_enum_status, $t_status )
f2e824
							. '' . lang_get( 'unreachable' ) . '
' . lang_get( 'no_exit' ) . '';
f2e824
		}
f2e824
	}
f2e824
f2e824
	$t_colour_project = config_get( 'colour_project');
f2e824
	$t_colour_global = config_get( 'colour_global');
f2e824
f2e824
	echo "<form name=\"workflow_config_action\" method=\"post\" action=\"manage_config_workflow_set.php\">\n";
f2e824
f2e824
	if ( ALL_PROJECTS == $t_project ) {
f2e824
	    $t_project_title = lang_get( 'config_all_projects' );
f2e824
	} else {
f2e824
	    $t_project_title = sprintf( lang_get( 'config_project' ) , string_display( project_get_name( $t_project ) ) );
f2e824
	}
f2e824
	echo '

' . $t_project_title . '

' . "\n";
f2e824
	echo '

' . lang_get( 'colour_coding' ) . '
';

f2e824
	if ( ALL_PROJECTS <> $t_project ) {
f2e824
	    echo '' . lang_get( 'colour_project' ) .'
';
f2e824
	}
f2e824
	echo '' . lang_get( 'colour_global' ) . '

';
f2e824
f2e824
	# show the settings used to derive the table
f2e824
	threshold_begin( lang_get( 'workflow_thresholds' ) );
f2e824
	if ( ! is_array( config_get( 'bug_submit_status' ) ) ) {
f2e824
		threshold_row( 'bug_submit_status' );
f2e824
	}
f2e824
	threshold_row( 'bug_resolved_status_threshold' );
f2e824
	threshold_row( 'bug_reopen_status' );
f2e824
	threshold_end();
f2e824
	echo '
';
f2e824
f2e824
	if ( '' <> $t_validation_result ) {
f2e824
		echo '';
f2e824
		echo '' . strtoupper( lang_get( 'validation' ) ) . '' . "\n";
f2e824
		echo '' . lang_get( 'status' ) . '';
f2e824
		echo '' . lang_get( 'comment' ) . '';
f2e824
		echo "\n";
f2e824
		echo $t_validation_result;
f2e824
		echo '

';
f2e824
	}
f2e824
f2e824
	# display the graph as a matrix
f2e824
	section_begin( lang_get( 'workflow' ) );
f2e824
	foreach ( $t_status_arr as $t_from_status => $t_from_label) {
f2e824
		capability_row( $t_from_status );
f2e824
	}
f2e824
	section_end();
f2e824
f2e824
	if ( $t_can_change_workflow ) {
f2e824
		echo '

' . lang_get( 'workflow_change_access' ) . ':';

f2e824
		echo '<select name="workflow_access">';
f2e824
		print_enum_string_option_list( 'access_levels', config_get_access( 'status_enum_workflow' ) );
f2e824
		echo '</select> 


';
f2e824
	}
f2e824
f2e824
	# display the access levels required to move an issue
f2e824
	access_begin( lang_get( 'access_levels' ) );
f2e824
	access_row( );
f2e824
	section_end();
f2e824
f2e824
	if ( $t_access >= config_get_access( 'set_status_threshold' ) ) {
f2e824
		echo '

' . lang_get( 'access_change_access' ) . ':';

f2e824
		echo '<select name="status_access">';
f2e824
		print_enum_string_option_list( 'access_levels', config_get_access( 'set_status_threshold' ) );
f2e824
		echo '</select> 


';
f2e824
	}
f2e824
f2e824
	if ( $t_can_change_flags ) {
f2e824
		echo "<input type=\"submit\" class=\"button\" value=\"" . lang_get( 'change_configuration' ) . "\" />\n";
f2e824
		echo "</form>\n";
f2e824
f2e824
        if ( 0 < count( $t_overrides ) ) {
f2e824
            echo "
<form name=\"mail_config_action\" method=\"post\" action=\"manage_config_revert.php\">\n";
f2e824
            echo "<input name=\"revert\" type=\"hidden\" value=\"" . implode( ',', $t_overrides ) . "\"></input>";
f2e824
            echo "<input name=\"project\" type=\"hidden\" value=\"$t_project\"></input>";
f2e824
            echo "<input name=\"return\" type=\"hidden\" value=\"" . $_SERVER['PHP_SELF'] ."\"></input>";
f2e824
            echo "
f2e824
            if ( ALL_PROJECTS == $t_project ) {
f2e824
                echo lang_get( 'revert_to_system' );
f2e824
            } else {
f2e824
                echo lang_get( 'revert_to_all_project' );
f2e824
            }
f2e824
            echo "\" />\n";
f2e824
            echo "</form>\n";
f2e824
        }
f2e824
f2e824
	} else {
f2e824
        echo "</form>\n";
f2e824
    }
f2e824
f2e824
	html_page_bottom1( __FILE__ );
f2e824
?>