<!-- statusdeleteconfirm.vm -->

#set ($windowtitle_text = $CommonFunctions.displayTermFromResourceBundle($currentUserId, "AdminDialogs", "statusdeleteconfirm.windowtitle"))

#set ($okbutton_text = $CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.standarderror.okbutton.text"))
#set ($okbutton_hint = $CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.standarderror.okbutton.hint"))
#set ($cancelbutton_text = $CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.buttons.cancel.label"))
#set ($cancelbutton_hint = $CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.buttons.cancel.hint"))
#set ($alert_text = $CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.common.alert"))

<html>
	<head>
		<title>$windowtitle_text</title>
		<link rel='stylesheet' type='text/css' href='../themes/$theme/main.css' />
		<link type="text/css" rel="stylesheet" href="../themes/$theme/xmenu.css" />
		<style>
	    	.mainContainer
	    	{
	    		border-collapse: collapse ;
	    		border: 1px solid black ;
	    		width: 100% ;
	    		height: 100% ;
				background-color:#FFFFFF;
	    	}
	    	.controls
	    	{
	    		background-image: url("../themes/$theme/images/bottom.png") ;
	    		padding: 0px ;
	    		text-align: center ;
	    		width: 100% ;
	    		height: auto ;
	    	}
	    	.errormessage
	    	{
	    		width: 100% ;
	    		height: 100% ;
	    		vertical-align: middle ;
	    		text-align: center ;
	    	}
	    	.icon
	    	{
	    		width:100% ;
	    		height: 35px ;
	    		text-align: left ;
	    		padding-left: 10px ;
	    		padding-top: 10px ;
	    	}
	    	.iconMessage
	    	{
	    		font-family: arial ;
	    		font-size: 14pt ;
	    		font-weight: bold ;
	    		color: #FF0000 ;
	    		padding-left:5px ;
	    	}
	    </style>
		#parse("common_js.vm")
		#parse("systemmanager_js.vm")
		<script type="text/javascript" src="../common/system/systemmanager.js"></script>
		<script type="text/javascript" src="../common/system/communication.js"></script>
		<script type="text/javascript" src="../common/application/itimpact/itimpactadminmanager.js"></script>
		<script type="text/javascript" src='../common/system/systemmanager.js'></script>
		<script type="text/javascript" src="../common/system/xmenu.js"></script>
		<script type="text/javascript">
		//<![CDATA[
			function init()
			{
				centerWindow(500,300) ;
				
				#if ($refreshOpener)
				try
				{
					initSystemManager() ;
					var appWindow = getWindowHandle(APPLICATION_WINDOW) ;
					appWindow.contentRefresh() ;
				}
				catch (m) {}
				#end
			}
			
			function centerWindow(width,height)
			{
			#if (!$noResize)
				window.resizeTo(width,height)

				var left = (screen.availWidth / 2)  - (width  / 2) ;
				var top  = (screen.availHeight / 2) - (height / 2) ;
				moveTo(left,top) ;
			#end

				#if ($refreshOpener)
					try
					{
						opener.contentRefresh() ;
					}
					catch (m) {}
				#end
			}

			function closeWindow()
			{
				close() ;
            }
			function confirmWindow()
			{
				lpcp            	 = new LPCP(document.formPosting);
				var itimpactAdminManager = new ITimpactAdminManager();
				var xmlMethodSignature = itimpactAdminManager.removeStatusValue('$status.getStatusId()');
		       	lpcp.invoke(xmlMethodSignature);
			}

			/*
			 * Dummy showMenu def.
			 */
			function showMenu()
			{
			}

			/*
			 * Define the menu bar.
			 */
			var menubar = new XMenuBar("menubar","center") ;
            var menuButtonOK = new XMenuButton("$okbutton_text","../themes/default/images/ok16x16.gif","confirmWindow()","$okbutton_hint") ;
            var menuButtonCancel = new XMenuButton("$cancelbutton_text","../themes/default/images/cancel16x16.gif","closeWindow()","$cancelbutton_hint") ;
			menubar.add(menuButtonOK) ;
			menubar.add(menuButtonCancel) ;
		//]]>
		</script>
	</head>
	<body onload="init()">
		<form id='formPosting' name='formPosting' method='post' action='../servlet/LPCPRouter' onSubmit="return false">
 			<input type='hidden' name='xmlMethodSignature'/>
 		</form>

		<table class="mainContainer">
			<tr>
				<td class="errormessage">
The status ($CommonFunctions.unescape($status.getStatusValue()))
is still being associated with the following objects:
<ul>
#if ($formCount > 0)<li>$formCount Form(s)#end
#if ($projectCount > 0)<li>$projectCount Project(s)#end
#if ($portfolioCount > 0)<li>$portfolioCount Portfolio(s)#end
#if ($workflowCount > 0)<li>$workflowCount Workflow(s)#end
#if ($dateAgeConfigCount > 0)<li>Progress & Currency setting#end
</ul>
To continue the status deletion, all these associations will be deleted from the system. Do you still want to continue?
</td>
			</tr>
			<tr>
				<td colspan="2" class="aboutMenuBarContainer">
					<script type="text/javascript">
					//<![CDATA[
						menubar.draw() ;
					//]]>
					</script>
				</td>
			</tr>
		</table>
	</body>
</html>