<%/******************************************************************************
 * Copyright (c) 2000-2005 e-Deal
 *
 * e-Deal S.A.
 * 55 rue Brillat Savarin
 * 75013 Paris
 * France
 *
 * T: +33 (0)1 53 80 80 30
 * F: +33 (0)1 73 01 69 77
 * http://www.e-deal.com
 * 
 * La diffusion de ce code source sous quelque forme que ce soit sans
 * l'autorisation de E-DEAL est interdite.
 *
 * Vous êtes autorisés à modifier ce code source uniquement pour votre usage
 * propre et sous réserve que les mentions de copyright demeurent intactes.
 *
 * Ce code est fourni en l'état. Aucune garantie d'aucune sorte, explicite ou
 * implicite n'est donnée. En aucun cas E-DEAL ne pourra être tenu pour
 * responsable des dommages pouvant résulter de l'utilisation de ce code
 * source.
 *
 *
 ******************************************************************************/
%>
<%@page session="true"%>
<%@ page import="com.edeal.frontline.Utils" %>
<%@ page import="com.edeal.frontline.navigation.FlRequest"%>
<%@ page import="com.edeal.frontline.FlContext"%>
<%@ page import="com.edeal.frontline.DataDictionary"%>
<%@ page import="com.edeal.frontline.FieldNotInitializedException"%>
<%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %>
<jsp:useBean class="com.edeal.frontline.custom.GiftCheque_Bean" id="GiftCheque_" scope="request"/>
<html>
<head>
<link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/common_css.jsp">
<link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/common_css.jsp">
<link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/master_css.jsp">

<script type="text/javascript" language="javascript" src="<fl:webapp/>/js/master_js.jsp"></script>
<script type="text/javascript" language="javascript" src="<fl:webapp/>/js/presentField.js"></script>
<%
FlRequest flRequest = new FlRequest(request);
FlContext context = flRequest.getContext();
DataDictionary dico = context.getDataDictionary();
String cheqPointeStateID = null;

try {
	cheqPointeStateID = dico.getRefIdByCode("Ch_", "Te1", "PO");
} catch (Exception e) {
	cheqPointeStateID = "";
}

%>
<script language="javascript">

	function doSubmit() {
		var f = document.forms[0];  		
  		var htmlHead = "<scr" + "ipt language=\"javascript\">";
  		htmlHead += "window.parent.opener.doRefresh();";
  		htmlHead += "self.close();";
  		htmlHead += "</scr" + "ipt>";
  	    f.$$returnedHtmlHead.value = htmlHead;
  		return true;
	}

</script>
</head>
<body>

<div id="object_css" style="top: 0px; left: 0px; bottom: 0px; height: 100%;">
<fl:form action="save_giftcheque_.fl" bean="GiftCheque_">
			<%-- 
			<input type="hidden" name="GchStatusID" value="cheqPointeStateID">
			--%>
			<input type="hidden" name="$$returnedHtmlHead" value="">
			<input type="hidden" name="$$returnedHtmlBody" value="Closing...">
<fl:bigTabs showFooter="false" objectTitle="<%=Utils.getMessage(session, \"LF12A\", \"Choisir l'adhérent\")%>" >  
    <table class="container" cellpadding="0" style="width: 100%">
    	<fl:fieldEdit property="GchUseWithAdherent" query="[[EntTyeID:RefVal = 'ETAB'], [EntTyeID:RefVal = 'HOTEL'], [EntTyeID:RefVal = 'RESTO']]" mandatoryMsgCode="MF069"/>
	</table>
</fl:bigTabs>
</fl:form>
<div style="width: 100%; text-align: center">
	<a href="javascript:submit()"><img src="<fl:webapp/>/icons/ico/valid_green2_long.gif" border="0" alt="<fl:getMessage code="A0003" alt="Enregistrer"/>"></a>&nbsp;&nbsp;&nbsp;<a href="javascript:window.close()"><img src="<fl:webapp/>/icons/ico/fermer_red_long.gif" alt="<fl:getMessage code="A3035" alt="Fermer"/>"></a>
</div>
</div>
</body>