<?php
# ---------------------------------------------------------------------
# truc is a tool for requirement and use case tracking
# Copyright (C) 2006 ASDIS - http://sf.net/projects/truc
#
# (rth) Initial truc version based on rth
#       Copyright (C) 2005 George Holbrook - rth@lists.sourceforge.net
#
# This program is distributed under the terms and conditions of the GPL
# See the README and LICENSE files for details
#----------------------------------------------------------------------

include"./api/include_api.php";
auth_authenticate_user();

$page                   = basename(__FILE__);
$project_properties     = session_get_project_properties();
$project_name           = $project_properties['project_name'];
$s_project_properties	= session_get_project_properties();
$project_id				= $s_project_properties['project_id'];


html_window_title();
html_print_body();
html_page_title($project_name ." -  ". lang_get( 'release_signoff_page' ));
html_page_header( $db, $project_name );
html_print_menu();

error_report_check( $_GET );

print"<br><br>\n";

$row = admin_get_release_detail( $_GET['release_id'] );

$release_id				= $row[RELEASE_ID];
$release_name			= $row[RELEASE_NAME];
$qa_status				= $row[RELEASE_QA_SIGNOFF];
$ba_status				= $row[RELEASE_BA_SIGNOFF];
$qa_signoff_date		= $row[RELEASE_QA_SIGNOFF_DATE];
$ba_signoff_date		= $row[RELEASE_BA_SIGNOFF_DATE];
$qa_signoff_by			= $row[RELEASE_QA_SIGNOFF_BY];
$ba_signoff_by			= $row[RELEASE_BA_SIGNOFF_BY];
$qa_comments			= $row[RELEASE_QA_SIGNOFF_COMMENTS];
$ba_comments			= $row[RELEASE_BA_SIGNOFF_COMMENTS];

print"<div align=center>\n";

print"<form method=post action='release_signoff_action.php'>\n";
print"<table class=width60>\n";
print"<tr>\n";
print"<td>\n";

    print"<table class=inner rules=none border=0>\n";

    print"<tr>\n";
    print"<td class=form-header-l colspan=2>".lang_get('signoff').": $release_name</td>\n";
    print"</tr>\n";

	util_add_spacer();

	# RELEASE STATUS
	print"<tr>\n";
    print"<td class=form-lbl-r>". lang_get('status') ."</td>\n";
    print"<td class=form-data-l>\n";
		$statuses = admin_get_release_status();
        print"<select name='qa_status' size=1>\n";
		html_print_list_box_from_array( $statuses, $qa_status );
        print"</select>\n";
    print"</td>\n";
    print"</tr>\n";

	# RELEASE COMMENTS
    print"<tr>\n";
    print"<td class=form-lbl-r>". lang_get('test_comments') ."</td>\n";
    print"<td class=form-data-l>\n";
        print"<textarea rows='4' cols='60' name='qa_comments'>$qa_comments</textarea>\n";
    print"</td>\n";
    print"</tr>\n";

	print"<input type='hidden' name='release_id' value='$release_id'>\n";

	util_add_spacer();

    print"<tr><td class=center colspan=2><input type=submit name='submit' value='". lang_get('submit_btn') ."'></td></tr>\n";

    print"</table>\n";
print"</td>\n";
print"</tr>\n";
print"</table>\n";

print"</form>\n";

print"</div>\n";


html_print_footer();
?>