<% /****************************************************************************** * 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" import="com.edeal.frontline.*,java.util.*,java.text.*"%> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <%@ page import="com.edeal.frontline.navigation.FlRequest, java.lang.reflect.*" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="com.edeal.frontline.helper.custom.FormHelper" %> <%@ page import="com.edeal.frontline.controller.actions.netbusiness.*" %> <% final org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(getClass()); FlRequest flRequest = new FlRequest(request); FlContext context = flRequest.getContext(); DataDictionary dico = context.getDataDictionary(); FlLocale locale = FlLocale.getInstance(session); boolean isThereAnyFormElement = false ; String id = null; try{ id = Form.getID(); }catch(FieldNotInitializedException fnie){} int seqNum = 0; try{ seqNum = Form.getFrmSeqNum(); }catch(FieldNotInitializedException fnie){ seqNum = CounterFactory.getCounter(context , "FormNum"); } DecimalFormat df = locale.getDecimalFormat("0000"); String frmEventID = null; String frmStatusID = null; String frmStatusCode = null; String evtTitle = null; String evtLabel = null; String evtCode = null; int evtStatutI = -1; String evtCurrentStatusLabel = null; EventBean evt = null; try{ frmEventID = Form.getFrmEventID(); }catch(FieldNotInitializedException fnie){} try{ frmStatusID = Form.getFrmStatus(); }catch(FieldNotInitializedException fnie){} if(frmStatusID != null && !"".equals(frmStatusID)){ frmStatusCode = dico.getRefCode("FrmStatus", frmStatusID); } try{ evtStatutI = (int) Form.getFrmEveAutoSt(); }catch(FieldNotInitializedException fnie){ evtStatutI = -1;} if (frmEventID!= null){ try{ evt = new EventBean(frmEventID, session); }catch(Exception e){} try{ evtLabel = evt.getEvtLabel(); } catch(Exception e){} try{ evtCode = evt.getEvtCode(); } catch(Exception e){} evtTitle = evtLabel + " - " + evtCode; if (evtStatutI !=-1){ try{ Method getter = Class.forName("com.edeal.frontline.EventBean").getMethod("getEvtStatus" + evtStatutI , null); evtCurrentStatusLabel = (String) getter.invoke(evt , null); }catch(Exception e){ evtCurrentStatusLabel =""; } } } Vector> questionTypesValues = null; try{ questionTypesValues = dico.getRefList(session, "Tq_", "Te1"); }catch (FrontlineException fle) { logger.warn(fle.getMessage()); } String actID = null; Boolean isAdmin = false; if (session != null) { actID = (String)session.getAttribute("effectiveActorID"); if (actID == null) { actID = (String)session.getAttribute("actorID"); if (actID == null) { throw new FrontlineException("there is not an actor ID in session"); } } } try { ActorBean act = new ActorBean(actID, context); Vector actRolesIDs = new Vector(); // On récupère les roles actRolesIDs.addAll(act.getRoles()); String roleADMID = dico.getRefIdByCode("ActRoles", "ADMIN"); /* Role Administrateur*/ if(!(actRolesIDs.isEmpty())) { Iterator iter = actRolesIDs.iterator(); String rowl = ""; while (iter.hasNext()) { rowl = (String)iter.next(); if( rowl.equalsIgnoreCase(roleADMID)) { isAdmin = true; } } } } catch (FrontlineException e){} %> " ou="<%=\"/read_customform.fl\"+(id != null ? \"?id=\"+id : \"id\")%>">
<%-- --%>
"><%= df.format((long)seqNum) %>
">
<% if("PUBLISHED".equals(frmStatusCode)){ %> <%} %> <%-- http://u-project2.umanis.com/view.php?id=39749: Export guide / localités et Millésime --%>
">
"/>
">
<% if (id != null) { String[][] query = {{"LfqFormID = " + Utils.formatToSQL(context, id)}}; String[] fields = {"LfqID" , "LfqFormQuestionID" , "LfqFormQuestionID:FqtLabel", "LfqParagraph", "LfqPosition", "LfqQuestionType_", "LfqCode_"}; String[] orderBy = {"LfqPosition"}; Vector linksList = LinkFormQuestionBean.listSummary(session , fields, query, orderBy); if (linksList != null && linksList.size() > 0) { for (int i=0 ; i < linksList.size() ; i++) { Hashtable curLink = (Hashtable) linksList.elementAt(i); String curLfqFormQuestionID = (String) curLink.get("LfqFormQuestionID"); String curLfqParagraph = (String) curLink.get("LfqParagraph"); String fqtLabel = (String) curLink.get("LfqFormQuestionID:FqtLabel"); if(fqtLabel != null && "Hidden".equals(fqtLabel)){ continue; } int lfqPosition = (Integer) curLink.get("LfqPosition"); String lfqQuestionType_ = (String) curLink.get("LfqQuestionType_"); String lfqCode_ = (String) curLink.get("LfqCode_"); String lfqID = (String) curLink.get("LfqID"); %> <% if (curLfqFormQuestionID == null) { %> "> <% } else { %> "> <%-- --%> <% } %> <% } } } %> <%if(isThereAnyFormElement){ %> <% } %>
<%= Utils.getMessage(session, "L616E", "(P)") + " " + Utils.getMessage(session, curLfqParagraph, curLfqParagraph) %>
  <%= Utils.getMessage(session, "L616F", "(Q)") + " " + fqtLabel %> <%=lfqPosition %> <% if(lfqCode_ == null || lfqCode_.length()==0){ boolean ok = false; try{ LinkFormQuestionBean lfq = new LinkFormQuestionBean(lfqID, context); String fqtID = lfq.getLfqFormQuestionID(); FormQuestionBean fqt = new FormQuestionBean(fqtID, context); String qType = fqt.getFqtType(); if(qType != null) ok = qType.equals(dico.getRefIdByCode("FqtType" , "FRE")) ||qType.equals(dico.getRefIdByCode("FqtType" , "FRL")) ||qType.equals(dico.getRefIdByCode("FqtType" , "INT")); }catch(Exception e){ logger.warn(e.getMessage()); } if(ok){ isThereAnyFormElement = true; %> <% }} %>
Enregistrer">
<% if(isAdmin){ %> " onselect="refreshLFQConfig()"> "/> <% } %> <% String intro=""; String conclusion=""; String termsOfUse=""; String header=""; String footer=""; String message=""; try { intro = Form.getFrmWebIntro(); }catch(FieldNotInitializedException fnie){} try { conclusion = Form.getFrmWebConclusion(); }catch(FieldNotInitializedException fnie){} try { termsOfUse = Form.getFrmWebTermsOfUse(); }catch(FieldNotInitializedException fnie){} try { message = (String)Form.getCustomProperty("FrmMsgMerci_"); }catch(FieldNotInitializedException fnie){} try { header = Form.getFrmWebHeader(); }catch(FieldNotInitializedException fnie){} try { footer = Form.getFrmWebFooter(); }catch(FieldNotInitializedException fnie){} %> "> " nbPix="35"> <%= intro %> " nbPix="35"> <%= conclusion %> " nbPix="35"> <%= termsOfUse %> "/> "> " nbPix="35"> <%= header %> " nbPix="35"> <%= footer %> ">