Edit C:\galaxie\deploy\Tomcat6\webapps\galaxie\siteweb\webform\webform_question_back_fix_1.jsp
<%@page import="javax.swing.text.Position"%> <%@page import="com.edeal.frontline.helper.custom.EnterpriseHelper"%> <%@page import="com.edeal.frontline.helper.custom.EventHelper"%> <%@page import="org.apache.poi.hssf.record.formula.functions.Even"%> <%@page session="true" import="com.edeal.frontline.*,java.util.*,java.text.*,java.lang.reflect.*,com.edeal.frontline.navigation.*"%> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <%@ page import="com.edeal.frontline.helper.custom.FormHelper" %> <jsp:useBean class="com.edeal.frontline.FormQuestionBean" id="curQuestion" scope="request"/> <jsp:useBean class="com.edeal.frontline.QuestionResponseBean" id="curQrs" scope="request"/> <jsp:useBean class="com.edeal.frontline.EnterpriseBean" id="Enterprise" scope="request"/> <% 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=flRequest.getContext().getDataDictionary(); String EntID = flRequest.getParameter("EntID"); String lfqPos = flRequest.getParameter("lfqPos"); String millesime = flRequest.getParameter("millesime"); String lfqID = flRequest.getParameter("lfqID"); String tiersPrincipalTypeValue = flRequest.getParameter("tiersPrincipalTypeValue"); String hiddenlnkID = flRequest.getParameter("hiddenlnk"); String prefix = flRequest.getParameter("prefix"); LinkFormQuestionBean linkFqt = new LinkFormQuestionBean(lfqID,context); LinkFormQuestionBean hiddenlnk = new LinkFormQuestionBean(lfqID,context); String eventCode = flRequest.getRequestParameterOrAttribute("event"); String languageID = flRequest.getParameter("languageID");//dico.getRefIdByCode("Lna", "Te1", "fr_FR"); String lngCode = flRequest.getParameter("lngCode");/*dico.getRefCode("EntRefLngID_", languageID);*/ String countryID = flRequest.getParameter("countryID");/*dico.getRefIdByCode("Ctr", "Te1", "FR");*/ FlLocale locale = FlLocale.getInstance(context, languageID, countryID); String sharepoint1 =""; String sharepoint2 =""; Vector<String> responses = (Vector<String>)flRequest.getAttribute("responses"); //logger.info("response : "+responses); LinkedHashMap<String,Vector<String>> initialresponses = (LinkedHashMap<String,Vector<String>>)flRequest.getAttribute("initialresponses"); //logger.info("initialresponse : "+initialresponses); boolean isActorLogis = (Boolean) flRequest.getAttribute("isActorLogis"); //logger.info("isActorLogis : "+isActorLogis); Vector<String> initialResponse = (initialresponses.get(lfqID)); QuestionResponseBean initCurQrs = null; if(initialResponse!=null){ initCurQrs = (new QuestionResponseBean(initialResponse.elementAt(0),context)); } String entTyeID = null; String HOTEL = dico.getRefIdByCode("EntTyeID", "HOTEL"); /* Hotel sans Restaurant */ String ETAB = dico.getRefIdByCode("EntTyeID", "ETAB"); /* Hotel-Restaurant */ try{ entTyeID = (String) EnterpriseBean.lookup(context, "EntTyeID", EntID); }catch(Exception e){ e.printStackTrace(); entTyeID = null; } int fqtSeqNum = -1; try{ fqtSeqNum = curQuestion.getFqtSeqNum(); }catch(FieldNotInitializedException fne){ } String qLabel=null; String qLabelCode = null; try { qLabel = curQuestion.getFqtLabel().replaceAll("::millesime::", millesime).replaceAll("::millesime\\+1::", (Integer.parseInt(millesime)+1)+"").replaceAll("::millesime-1::", (Integer.parseInt(millesime)-1)+""); qLabel = (qLabel == null? "" : qLabel); qLabelCode = (String)curQuestion.getCustomProperty("FqtLabelCode_"); qLabelCode = (qLabelCode == null? "" : qLabelCode); qLabelCode = Utils.getMessage(context, lngCode, qLabelCode, false,true,"<non sp�cifi�>").replaceAll("::millesime::", millesime).replaceAll("::millesime\\+1::", (Integer.parseInt(millesime)+1)+"").replaceAll("::millesime-1::", (Integer.parseInt(millesime)-1)+""); } catch (Exception e) {} boolean disabled = false; try{ disabled = (Boolean)hiddenlnk.getCustomProperty("LfqHtmlDisabled_"); //logger.info("disabled"+disabled); }catch(Exception e){ //logger.info("disabled"+disabled); } if(fqtSeqNum == 163 && prefix.equals("R")){ qLabel += " (1)"; } String code = ""; try{ code = (String)hiddenlnk.getCustomProperty("LfqCode_"); }catch(Exception e){} String name = ""; try{ name = (String)hiddenlnk.getCustomProperty("LfqName_"); }catch(Exception e){} String qType = null; try { qType = curQuestion.getFqtType(); } catch (FieldNotInitializedException fnie) { } String typeOfQuestion = ""; try{ typeOfQuestion = FormHelper.getIntervalTypeOfDateOrDouble(context,name,code); }catch(Exception e){ //logger.warn(e.getMessage()); } if("Fermetures_".equals(name) && Utils.explodeList(code, "|").size()>1) typeOfQuestion = "java.util.Date|java.util.Date"; if(typeOfQuestion.length()==0){ String lfqQuestionType_ = null; try{ lfqQuestionType_ = (String)hiddenlnk.getCustomProperty("LfqQuestionType_"); }catch(Exception e){} if(lfqQuestionType_ == null || lfqQuestionType_.length()==0 || lfqQuestionType_.equals(dico.getRefIdByCode("Tq_", "Te1", "TEXT")) ) typeOfQuestion = "java.lang.String"; else{ if(lfqQuestionType_.equals(dico.getRefIdByCode("Tq_", "Te1", "DOUBLE"))) typeOfQuestion = "java.lang.Double"; if(lfqQuestionType_.equals(dico.getRefIdByCode("Tq_", "Te1", "DATE"))) typeOfQuestion = "java.util.Date"; if(lfqQuestionType_.equals(dico.getRefIdByCode("Tq_", "Te1", "INTEGER"))) typeOfQuestion = "java.lang.Integer"; if(qType.equals(dico.getRefIdByCode("FqtType" , "INT"))) typeOfQuestion = typeOfQuestion +"|"+typeOfQuestion; } } String value = ""; try{ value = (String)hiddenlnk.getCustomProperty("LfqValue_"); }catch(Exception e){} String lblID = null; String lblLabel = ""; try { lblID = (String)curQuestion.getCustomProperty("FqtPreTextLabel_"); lblLabel = Utils.getMessage(context,lngCode,lblID,false,true,"").replaceAll("::millesime::", millesime).replaceAll("::millesime\\+1::", (Integer.parseInt(millesime)+1)+"").replaceAll("::millesime-1::", (Integer.parseInt(millesime)-1)+""); } catch (FieldNotInitializedException fnie) { } catch (FrontlineException e) { } String postlblID = null; String postlblLabel = ""; try { postlblID = (String)curQuestion.getCustomProperty("FqtPostTextLabel_"); postlblLabel = Utils.getMessage(context,lngCode,postlblID,false,true,"").replaceAll("::millesime::", millesime).replaceAll("::millesime\\+1::", (Integer.parseInt(millesime)+1)+"").replaceAll("::millesime-1::", (Integer.parseInt(millesime)-1)+""); } catch (FieldNotInitializedException fnie) { } catch (FrontlineException e) { } //TODO // if((prefix.equals("R") && lfqPos.equals("550")) || (prefix.equals("T") && lfqPos.equals("530")) ){ // postlblLabel = Utils.getMessage(context, session, lngCode, "LF242", false, true, ""); // } String helpText = ""; try { helpText = curQuestion.getFqtHelpText(); } catch (FieldNotInitializedException fnie) { } %> <% if(qType != null && qType.equals(dico.getRefIdByCode("FqtType" , "HIDE")) ){ String qrsText = ""; try { qrsText = curQrs.getQrsText(); } catch (Exception e) {} }else{ if(fqtSeqNum <= 175 || fqtSeqNum > 181){ %> <div class="webform_questionblock"> <%}if(fqtSeqNum < 175 || fqtSeqNum > 181){%> <input type="hidden" name="<%= prefix %>_<%= lfqPos %>_LfqID" value="<%= lfqID %>"> <%} if(qType == null || qType.equals(dico.getRefIdByCode("FqtType" , "ATTFILE"))){ String qrsText = ""; try { qrsText = initCurQrs.getQrsText(); } catch (Exception e) {} String qrsText2 = ""; try{ qrsText2 = (new QuestionResponseBean( (String)initialResponse.elementAt(1),context)) .getQrsText(); } catch (Exception e) {} %> <p class="p_webform_questionblock pre_post_labels"><%=lblLabel %></p> <%if(fqtSeqNum == 205){ Map<String,String> url1 = EnterpriseHelper.getSharePointLink(context,EntID); if (url1.containsKey("PHOTOSITE")) { sharepoint2 = url1.get("PHOTOSITE"); } if (url1.containsKey("PHOTOGUIDE")) { sharepoint1 = url1.get("PHOTOGUIDE"); } %> <p class="p_webform_questionblock pre_post_labels"> <fl:getMessage code="LF400" alt="LF400" js="true"/> <% if (sharepoint1.isEmpty()) { %> <fl:getMessage code="LF409" alt="LF409" js="true"/> <% } else { %> <a href=<%=sharepoint1%> target="_blank"> lien sharepoint 1 </a><br/> <% } %> <fl:getMessage code="LF401" alt="LF401" js="true"/> <% if (sharepoint2.isEmpty()) { %> <fl:getMessage code="LF410" alt="LF410" js="true"/> <% } else { %> <a href=<%=sharepoint2%> target="_blank"> lien sharepoint 2 </a><br/> <% } %> <fl:getMessage code="LF402" alt="LF402" js="true"/> </p> <% } if(fqtSeqNum == 207){ Map<String,String> url1 = EnterpriseHelper.getSharePointLink(context,EntID); if (url1.containsKey("PHOTOGUIDE")) { sharepoint1 = url1.get("PHOTOGUIDE"); }%> <p class="p_webform_questionblock pre_post_labels"> <fl:getMessage code="LF405" alt="LF405" js="true"/> <% if (sharepoint1.isEmpty()) { %> <fl:getMessage code="LF409" alt="LF409" js="true"/> <% } else { %> <a href=<%=sharepoint1%> target="_blank"> lien sharepoint 1 </a><br/> <% } %> <fl:getMessage code="LF402" alt="LF402" js="true"/> </p> <% }%> <p id="<%=prefix%>_WebForm_ValQuestion<%=lfqPos%>" class="webform_answer_photo"> <table class="table_photo"> <tr> <td class="td_photo_photo"> <input type="hidden" name="<%=prefix%>_photoAttID" value="<%=qrsText%>"> <input type="hidden" name="<%=prefix%>_photoAttID" value="<%=qrsText2%>"> <div class="div1_w70fl"> <% if (qrsText != null && !Utils.isEmpty(qrsText)) { %> <img class="photo" src="<fl:webapp/>/download?id=<%=qrsText%>" /> <br /> <br /> <% } %> </div> </td> <td class="td_photo_photo"> <div class="div1_w70fl"> <% if (qrsText2 != null && !Utils.isEmpty(qrsText2)) { %> <img class="photo" src="<fl:webapp/>/download?id=<%=qrsText2%>" /> <% } %> </div> </td> </tr> <%if(eventCode.startsWith("EVQG")){ // EVQG23 %> <tr> <td colspan="2"> <span class="span_photo"> <%=Utils.getMessage(context, lngCode, "FF337", false, true, "Si vous souhaitez les modifier, merci de bien vouloir nous envoyer les photos souhaitées par email à l'adresse logisguide@logishotels.com <br><br><br>")%> </span></td> </tr> <tr> <td> <span class="span_photo"> <%=Utils.getMessage(context, lngCode, "LF391", false, true, "Je confirme que la photo ci-dessus est libre de droit.")%> </span></td> </tr> <% }%> </table> </p> <% }else if(qType == null || qType.equals(dico.getRefIdByCode("FqtType" , "FRE"))){ //String ETAB = dico.getRefIdByCode("EntTyeID", "ETAB"); /* Hotel-Restaurant */ //String entTyeID = (String) EnterpriseBean.lookup(context, "EntTyeID", EntID); if((curQuestion.getFqtSeqNum() == 106) /*&& entTyeID.equals(ETAB))*/ || curQuestion.getFqtSeqNum() != 106){ int inputSize = 0; try { inputSize = curQuestion.getFqtInputSize(); } catch (FieldNotInitializedException fnie) { } String qrsText = ""; String qrsTextInitial = ""; try { qrsText = curQrs.getQrsText(); qrsTextInitial = initCurQrs.getQrsText(); } catch (Exception e) {} int qrsInstance = 0; try { qrsInstance = curQrs.getQrsInstance(); } catch (FieldNotInitializedException fnie) { } %> <% if((fqtSeqNum == 20 || fqtSeqNum == 22 || fqtSeqNum == 19 || fqtSeqNum == 18)){ if(!Utils.isNullEmptyString(qrsText)){ disabled = true; } else{ disabled = false; } } %> <p class="pre_post_labels p2_webform_questionblock"><%=lblLabel %></p> <p id="<%= prefix %>_WebForm_ValQuestion<%= lfqPos %>" class="webform_answer"> <%if(fqtSeqNum == 172 || fqtSeqNum == 173 || fqtSeqNum == 174){ if(fqtSeqNum == 172){ %> <div class="webform_label div1_w95fl" style="padding-bottom: 10px"> <label><input type="checkbox" name="<%= prefix %>_<%= lfqPos %>_ResponseRefID" > <%=Utils.getMessage(context, lngCode, "FF34F", true,true,"Renseignez vos spécialités ou plats signature. Nous indiquerons sur le site logishotels.com que la carte de votre restaurant varie selon la saison et le retour du marché. Il s?agit simplement d?aider le client à se projeter dans son expérience de table. Vous pourrez modifier ces informations en cours d?année en nous contactant.")%> </label> </div> <%} %> <div class="webform_label div1_w25fl" id="div1_w<%= fqtSeqNum %>fl" > <%= qLabelCode != null ? qLabelCode : qLabel %> </div> <%} else { %> <div class="webform_label div1_w25fl"> <%= qLabelCode != null ? qLabelCode : qLabel %> </div> <%} %> <div class="div1_w50fl" > <%if(fqtSeqNum == 187 || fqtSeqNum == 188){%> <input type="time" name="<%= prefix %>_<%= lfqPos %>_ResponseTxt" value="<%= qrsText %>" size="20" /> <% }else if(42 == fqtSeqNum){ %> <input type="text" class="input1_w50" name="<%= prefix %>_<%= lfqPos %>_ResponseTxt" value="<%= qrsText.replace("\"", """) %>" onchange="javascript:isItValid('java.lang.Double',this);" /> <% } else {%> <input class="input1_w100" class="webform_input" type="text" name="<%= prefix %>_<%= lfqPos %>_ResponseTxt" value="<%= qrsText.replace("\"", """) %>" <% if(572 == fqtSeqNum){ //semaine livraison field %> onchange="javascript:checkSemaineLivraison(this);" <% }else if(50 == fqtSeqNum){ //EntSiret field %> onchange="javascript:formatSiret(this);" <%}else if((fqtSeqNum <= 152 && fqtSeqNum >= 149) || fqtSeqNum == 20){ %> onchange="javascript:isNumberPhoneValid(this); javascript:doFormatTel_(this, '<fl:getMessage code="L30B8" alt="Saisie du téléphone" js="true"/> :', '<%= countryID %>')" <%}else if(fqtSeqNum >= 133 && fqtSeqNum <= 135){ %> onchange="javascript:doCivResuired('<%= prefix %>', '<%= lfqPos %>');" <%}else if((fqtSeqNum >= 153 && fqtSeqNum <= 159) || fqtSeqNum == 22){ %> onchange="javascript:isEmailValid(this);" <% }else if("java.lang.Double".equals(typeOfQuestion)){ %> style="width:90%;" onchange="javascript:isItValid('java.lang.Double',this);" <%}else if("java.lang.Integer".equals(typeOfQuestion) && fqtSeqNum != 572){ %> onchange="javascript:isItValid('java.lang.Integer',this);" <% } %> <%= (disabled ? "disabled" : "") %> /> <%} if(!disabled && isActorLogis && qrsTextInitial != null && !Utils.isEmpty(qrsTextInitial)){ %> <i class="i_text_initial"><%= qrsTextInitial %></i> <%} %> <% if("java.lang.Double".equals(typeOfQuestion)){ if(fqtSeqNum == 447 || fqtSeqNum == 42){ %> <span class="span_bold"> €</span><% }else{%><span class="span_bold"> %</span> <%} }%> </div> </p> <p class="pre_post_labels p3_webform_questionblock"> <%=postlblLabel %></p> <% } }else if ( qType.equals(dico.getRefIdByCode("FqtType" , "FRL")) ) { int inputSize = 0; try { inputSize = curQuestion.getFqtInputSize(); } catch (FieldNotInitializedException fnie) { } String qrsText = ""; String qrsTextInitial = ""; try { qrsText = curQrs.getQrsText(); qrsTextInitial = initCurQrs.getQrsText(); } catch (Exception e) {} int qrsInstance = 0; try { qrsInstance = curQrs.getQrsInstance(); } catch (FieldNotInitializedException fnie) { } %> <p class="pre_post_labels p32_webform_questionblock"><%=lblLabel %></p> <p id="<%= prefix %>_WebForm_ValQuestion<%= lfqPos %>" class="webform_answer"> <div class="webform_label div1_w25fl"><%= qLabelCode != null ? qLabelCode : qLabel %></div> <div class="div1_w50fl2"> <textarea name="<%= prefix %>_<%= lfqPos %>_ResponseTxt" id="<%= prefix %>_<%= lfqPos %>_ResponseTxt" class="input_textarea" style="height: 15%;"> <%= qrsText %> </textarea> <%if(!disabled && isActorLogis && qrsTextInitial != null && !Utils.isEmpty(qrsTextInitial)){ %> <i class="i_text_initial"><%= qrsTextInitial %></i> <% } %> </div> </p> <p class="pre_post_labels p4_webform_questionblock"> <%=postlblLabel %></p> <% }else if(qType != null && qType.equals(dico.getRefIdByCode("FqtType" , "INT"))){ Collections.sort(responses); QuestionResponseBean qrs1 = null; String qrsText1 = ""; String qrsText1Initial = ""; int qrsInstance1 = -1; int instance = -1; int initqrsInstance1 = -1; int initinstance = -1; try{ if(responses != null && responses.size() > 0) qrs1 = new QuestionResponseBean((String)responses.elementAt(0),context); try { qrsText1 = qrs1.getQrsText(); } catch (Exception e) {} try { qrsText1Initial = initCurQrs.getQrsText(); } catch (Exception e) {} try { qrsInstance1 = qrs1.getQrsInstance(); if(qrsInstance1 == 0) instance = 1; else instance = 2; } catch (FieldNotInitializedException fnie) { } try { initqrsInstance1 = initCurQrs.getQrsInstance(); if(initqrsInstance1 == 0) initinstance = 1; else initinstance = 2; } catch (FieldNotInitializedException fnie) { } }catch(Exception e){ } QuestionResponseBean qrs2 = null; String qrsText2 = ""; String qrsText2Initial = ""; int qrsInstance2 = -1; int initqrsInstance2 = -1; try{ if(responses != null && responses.size() > 0) qrs2 = new QuestionResponseBean((String)responses.elementAt(1),context); try { qrsText2 = qrs2.getQrsText(); } catch (Exception e) {} try { qrsText2Initial = initialResponse !=null ?(new QuestionResponseBean(initialResponse.elementAt(1),context)).getQrsText():null; } catch (Exception e) {} try { qrsInstance2 = qrs2.getQrsInstance(); if(qrsInstance2 == 0) instance = 2; else instance = 1; } catch (FieldNotInitializedException fnie) { } try { initqrsInstance2 = initialResponse != null ?(new QuestionResponseBean(initialResponse.elementAt(1),context)).getQrsInstance() : null; if(initqrsInstance2 == 0) initinstance = 2; else initinstance = 1; } catch (FieldNotInitializedException fnie) { } if(initinstance != 1){ String temp = qrsText1Initial; qrsText1Initial = qrsText2Initial; qrsText2Initial = temp; } }catch(Exception e){ } QuestionResponseBean qrs3 = null; String qrsText3 = ""; String qrsText3Initial = ""; int qrsInstance3 = -1; int initqrsInstance3 = -1; int initqrsInstance3_horaire = -1; QuestionResponseBean qrs4 = null; String qrsText4 = ""; String qrsText4Initial = ""; int qrsInstance4 = -1; int initqrsInstance4 = -1; int initqrsInstance4_horaire = -1; //to get the thirth and forth if (responses != null && !responses.isEmpty() && responses.size() > 2) { try { qrs3 = new QuestionResponseBean((String) responses.elementAt(2), context); try { qrsText3 = qrs3.getQrsText(); } catch (Exception e) { } try { qrsText3Initial = initialResponse !=null ?(new QuestionResponseBean(initialResponse.elementAt(2),context)).getQrsText():null; } catch (Exception e) { } try { qrsInstance3 = qrs3.getQrsInstance(); instance = qrs3.getQrsInstance() + 1 ; } catch (FieldNotInitializedException fnie) { } try { initqrsInstance3_horaire = initialResponse != null ?(new QuestionResponseBean(initialResponse.elementAt(2),context)).getQrsInstance() : null ; initqrsInstance3 = initialResponse != null ?(new QuestionResponseBean(initialResponse.elementAt(2),context)).getQrsInstance() + 1 : null ; // if (initqrsInstance1 == 0) // initinstance = 1; // else // initinstance = 2; } catch (FieldNotInitializedException fnie) { } } catch (Exception e) { } try { qrs4 = new QuestionResponseBean((String) responses.elementAt(3), context); try { qrsText4 = qrs4.getQrsText(); } catch (Exception e) { } try { qrsText4Initial = initialResponse !=null ?(new QuestionResponseBean(initialResponse.elementAt(3),context)).getQrsText():null; } catch (Exception e) { } try { qrsInstance4 = qrs4.getQrsInstance(); instance = qrs4.getQrsInstance() + 1 ; } catch (FieldNotInitializedException fnie) { } try { initqrsInstance4_horaire = initialResponse != null ?(new QuestionResponseBean(initialResponse.elementAt(3),context)).getQrsInstance() : null ; initqrsInstance4 = initialResponse != null ?(new QuestionResponseBean(initialResponse.elementAt(3),context)).getQrsInstance() + 1 : null ; } catch (FieldNotInitializedException fnie) { } } catch (Exception e) { } } String qrtext1 = ""; String qrtext2 = ""; String qrtext3 = ""; String qrtext4 = ""; if(qrsInstance1==0){ qrtext1=qrsText1; }else if(qrsInstance1==1){ qrtext2=qrsText1; }else if(qrsInstance1==2){ qrtext3=qrsText1; }else if(qrsInstance1==3){ qrtext4=qrsText1; } if(qrsInstance2==0){ qrtext1=qrsText2; }else if(qrsInstance2==1){ qrtext2=qrsText2; }else if(qrsInstance2==2){ qrtext3=qrsText2; }else if(qrsInstance2==3){ qrtext4=qrsText2; } if(qrsInstance3==0){ qrtext1=qrsText3; }else if(qrsInstance3==1){ qrtext2=qrsText3; }else if(qrsInstance3==2){ qrtext3=qrsText3; }else if(qrsInstance3==3){ qrtext4=qrsText3; } if(qrsInstance4==0){ qrtext1=qrsText4; }else if(qrsInstance4==1){ qrtext2=qrsText4; }else if(qrsInstance4==2){ qrtext3=qrsText4; }else if(qrsInstance4==3){ qrtext4=qrsText4; } String qrtext1Initial = ""; String qrtext2Initial = ""; String qrtext3Initial = ""; String qrtext4Initial = ""; if(initqrsInstance1==0){ qrtext1Initial=qrsText1Initial; }else if(initqrsInstance1==1){ qrtext2Initial=qrsText1Initial; }else if(initqrsInstance1==2){ qrtext3Initial=qrsText1Initial; }else if(initqrsInstance1==3){ qrtext4Initial=qrsText1Initial; } if(initqrsInstance2==0){ qrtext1Initial=qrsText2Initial; }else if(initqrsInstance2==1){ qrtext2Initial=qrsText2Initial; }else if(initqrsInstance2==2){ qrtext3Initial=qrsText2Initial; }else if(initqrsInstance2==3){ qrtext4Initial=qrsText2Initial; } if(initqrsInstance3_horaire==0){ qrtext1Initial=qrsText3Initial; }else if(initqrsInstance3_horaire==1){ qrtext2Initial=qrsText3Initial; }else if(initqrsInstance3_horaire==2){ qrtext3Initial=qrsText3Initial; }else if(initqrsInstance3_horaire==3){ qrtext4Initial=qrsText3Initial; } if(initqrsInstance4_horaire==0){ qrtext1Initial=qrsText4Initial; }else if(initqrsInstance4_horaire==1){ qrtext2Initial=qrsText4Initial; }else if(initqrsInstance4_horaire==2){ qrtext3Initial=qrsText4Initial; }else if(initqrsInstance4_horaire==3){ qrtext4Initial=qrsText4Initial; } %> <% boolean isOpen = false; boolean isClosed = false; boolean isOpen24h = false; boolean isInitClosed = false; boolean isInitOpen24h = false; if(!Utils.isNullEmptyString(qrsText1Initial) && !Utils.isNullEmptyString(qrsText2Initial) && qrsText1Initial.equals(qrsText2Initial) && qrsText1Initial.equals("00:00")){ isInitClosed = true; } else{ if((qrsText1Initial != null && qrsText1Initial.equals("00:01")) && (qrsText2Initial != null && qrsText2Initial.equals("23:59"))){ isInitOpen24h = true; } } if(!Utils.isNullEmptyString(qrsText1) && !Utils.isNullEmptyString(qrsText2) && qrsText1.equals(qrsText2) && qrsText1.equals("00:00")){ isClosed = true; } else{ if((qrsText1 != null && qrsText1.equals("00:01")) && (qrsText2 != null && qrsText2.equals("23:59"))){ isOpen24h = true; }else if(!Utils.isNullEmptyString(qrsText1) || !Utils.isNullEmptyString(qrsText2) || !Utils.isNullEmptyString(qrsText3) || !Utils.isNullEmptyString(qrsText4) ){ isOpen = true; } } %> <%if((fqtSeqNum >= 175 && fqtSeqNum <= 181)){%> <% if(fqtSeqNum == 175){ %> <p class="pre_post_labels p5_webform_questionblock"><%=lblLabel %></p> <table class="Opening"> <thead> <tr> <%if(prefix.equals("R")){ %> <td class="First"> </td> <td class="Second"><h4><%= Utils.getMessage(context, lngCode, "FF339", "Je suis fermé") %></h4></td> <td class="Fourth" colspan="2" style="text-align:center;" style="text-align:left;"><h4><%=Utils.getMessage(context, lngCode, "FF33A", "Je suis ouvert sur un créneau horaire") %></h4></td> <%} else{%> <td class="First"> </td> <td class="Second"><h4><%= Utils.getMessage(context, lngCode, "FF339", "Je suis fermé") %></h4></td> <td class="Third"><h4><%= Utils.getMessage(context, lngCode, "FF338", "Je suis ouvert 24h/24h") %></h4></td> <td class="Fourth" colspan="2" style="text-align:center;" style="text-align:left;"><h4><%=Utils.getMessage(context, lngCode, "FF33A", "Je suis ouvert sur un créneau horaire") %></h4></td> <%} %> </tr> <tr> <td > </td> <td > </td> <%if(!prefix.equals("R")){ %> <td > </td> <%} %> <td style="text-align:center; width:25%;"><h4><%= (prefix != null && prefix.equals("R")) ? Utils.getMessage(context, lngCode, "FF347", true,true, "Ouvert le Matin") : Utils.getMessage(context, lngCode, "FF376", true,true ,"Matin") %></h4></td> <td style="text-align:center; width:25%;"><h4><%= (prefix != null && prefix.equals("R")) ? Utils.getMessage(context, lngCode, "FF348", true,true, "Ouvert le Soir") : Utils.getMessage(context, lngCode, "FF375", true, true, "Après-midi") %></h4></td> </tr> <%} %> </thead> <tr> <td><div class="webform_label div1_w40fl"><%= qLabelCode != null ? qLabelCode : qLabel %></div></td> <td> <span class="spanaroundradio" style="<%= isActorLogis && isInitClosed ? "background-color:red" : ""%>"> <input type="radio" <%= isClosed ? " checked " : "" %> name="<%=prefix %>_<%= lfqPos %>_ResponseRefID" onchange="disableOpening(this, '<%=prefix %>_<%= lfqPos %>')"/> </span> </td> <%if(!prefix.equals("R")){ %> <td> <span class="spanaroundradio" style="<%= isActorLogis && qrsText2Initial != null && !Utils.isEmpty(qrsText2Initial) && isInitOpen24h ? "background-color:red" : ""%>"> <input type="radio" <%= isOpen24h ? " checked " : "" %> name="<%=prefix %>_<%= lfqPos %>_ResponseRefID" onchange="disableOpening(this, '<%=prefix %>_<%= lfqPos %>')"> </span> </td> <%}%> <td colspan="2"> <table style="width: 100%;" class="OpeningSubTable"> <tbody> <tr> <td style="width: 8%;"> <span class="spanaroundradio"> <input type="radio" name="<%=prefix %>_<%= lfqPos %>_ResponseRefID" <%= isOpen ? " checked " : "" %> onchange="enableOpening(this, '<%=prefix %>_<%= lfqPos %>')"> </span> </td> <td style="width: 20%;"> <%= Utils.getMessage(context, lngCode, "L621C", "De") %> <input type="time" <%= !isOpen ? isClosed || isOpen24h ? "disabled" : "" : "" %> name="<%=prefix %>_<%= lfqPos %>_ResponseInt" value="<%= isOpen ? qrtext1 : ""%>" onblur="doInInputTime(this, '<%=prefix %>_<%= lfqPos %>')"><%if( isActorLogis && qrtext1Initial != null && !Utils.isEmpty(qrtext1Initial)){ %> <i class="i_text_initial"><%= !isOpen ? "" : qrtext1Initial %></i><% } %> </td> <td style="width: 20%;"> <%= Utils.getMessage(context, lngCode, "L8254", "À") %> <input type="time" <%= !isOpen ? isClosed || isOpen24h ? "disabled" : "" : "" %> name="<%=prefix %>_<%= lfqPos %>_ResponseInt" value="<%= isOpen ? qrtext2 : ""%>" size="20" onchange="doInInputTime(this, '<%=prefix %>_<%= lfqPos %>')"><%if( isActorLogis && qrtext2Initial != null && !Utils.isEmpty(qrtext2Initial)){ %> <i class="i_text_initial"><%= !isOpen ? "" : qrtext2Initial %></i><% } %> </td> <td style="width: 20%;"><%= Utils.getMessage(context, lngCode, "L621C", "De") %> <input type="time" <%= !isOpen ? isClosed || isOpen24h ? "disabled" : "" : "" %> name="<%=prefix %>_<%= lfqPos %>_ResponseInt" value="<%= isOpen ? qrtext3 : "" %>" onchange="doInInputTime(this, '<%=prefix %>_<%= lfqPos %>')"><%if( isActorLogis && qrtext3Initial != null && !Utils.isEmpty(qrtext3Initial)){ %> <i class="i_text_initial"><%= !isOpen ? "" : qrtext3Initial%></i><% } %> </td> <td style="width: 20%;"> <%= Utils.getMessage(context, lngCode, "L8254", "À") %> <input type="time" <%= !isOpen ? isClosed || isOpen24h ? "disabled" : "" : "" %> name="<%=prefix %>_<%= lfqPos %>_ResponseInt" value="<%= isOpen ? qrtext4 : "" %>" size="20" onchange="doInInputTime(this, '<%=prefix %>_<%= lfqPos %>')" ><%if( isActorLogis && qrtext4Initial != null && !Utils.isEmpty(qrtext4Initial)){ %> <i class="i_text_initial"><%= !isOpen ? "" : qrtext4Initial %></i><% } %> </td> <td style="width: 2%;"> <input type="hidden" name="<%= prefix %>_<%= lfqPos %>_LfqID" value="<%= lfqID %>"> </td> </tr> </tbody> </table> </td> </tr> <%if(fqtSeqNum == 181){ %> </table> <%} //TODO %> <%} else{ %> <p class="pre_post_labels p5_webform_questionblock"><%=lblLabel %></p> <p id="<%=prefix %>_WebForm_ValQuestion<%= lfqPos %>" class="webform_answer"> <div class="webform_label div1_w40fl"><%= qLabelCode != null ? qLabelCode : qLabel %></div> <div class="webform_label div3_w50fl"> <%= "Fermetures_".equals(name) ? Utils.getMessage(context, lngCode, "L3128", "Du") : Utils.getMessage(context, lngCode, "L621C", "De") %> <input type="text" name="<%=prefix %>_<%= lfqPos %>_ResponseInt" value="<%= instance == 1 ? qrsText1 : qrsText2 %>" size="20" onchange="javascript:areTheyValid('<%=typeOfQuestion%>',this);"> <%if(!disabled && isActorLogis && qrsText1Initial != null && !Utils.isEmpty(qrsText1Initial)){ %><i class="i_text_initial"><%= qrsText1Initial %></i> <% } %><%= "Fermetures_".equals(name) ? "" : " "+"€" %> <%= "Fermetures_".equals(name) ? Utils.getMessage(context, lngCode, "L63B4", "Au") : Utils.getMessage(context, lngCode, "L8254", "A") %> <input type="text" name="<%=prefix %>_<%= lfqPos %>_ResponseInt" value="<%= instance == 1 ? qrsText2 : qrsText1 %>" size="20" onchange="javascript:areTheyValid('<%=typeOfQuestion%>',this);"> <%if(!disabled && isActorLogis && qrsText2Initial != null && !Utils.isEmpty(qrsText2Initial)){ %><i class="i_text_initial"><%= qrsText2Initial %></i> <% } %><%= "Fermetures_".equals(name) ? "" : " "+"€" %> <%if(typeOfQuestion.equals("java.util.Date|java.util.Date")){ %> <img src="<fl:webapp/>/icons/bigvalid_non.gif" onclick="javascript:clearDates('<%=prefix %>_<%= lfqPos %>_ResponseInt')"> <%} %> </div> </p> <br> <br> <p class="pre_post_labels p6_webform_questionblock"><%=postlblLabel %></p> <%} } else { //Pas Texte libre, c-a-d REF ou LST Vector<String> refvals = new Vector<String>(); boolean isREF = false; boolean isLST = false; String test_81 = null ; if ( qType.equals(dico.getRefIdByCode("FqtType" , "REF")) ) { isREF = true; if(responses != null && responses.size() > 0){ QuestionResponseBean qrs = null; // nouvelle demande d'ajout d'equipement que pour hotel-sans-restaurant if (entTyeID.equals(ETAB) && fqtSeqNum == 29) { for(int i=0; i<responses.size(); i++){ qrs = new QuestionResponseBean(responses.elementAt(i),context); String refresp = null; try{ refresp = qrs.getQrsRefValID(); test_81 = dico.getRefIdByCode("Qp_","Te1", "81"); // on affiche pas les 81 et RP if(!refresp.equals(dico.getRefIdByCode("Qp_" , "Te1", "81")) || !refresp.equals(dico.getRefIdByCode("Qp_", "Te1", "RP"))){ refvals.add(refresp); } }catch(FieldNotInitializedException fe){ } } //// } else { for(int i=0; i<responses.size(); i++){ qrs = new QuestionResponseBean(responses.elementAt(i),context); String refresp = null; try{ refresp = qrs.getQrsRefValID(); refvals.add(refresp); }catch(FieldNotInitializedException fe){ } } } } } if ( qType.equals(dico.getRefIdByCode("FqtType" , "LST")) ) { isLST = true; } boolean isCombo = true; boolean isRadio = false; boolean isCheck = false; String dispType = null; try { dispType = curQuestion.getFqtDispType(); } catch (FieldNotInitializedException fnie) { } if (dispType != null && dispType.equals(dico.getRefIdByCode("FqtDispType", "RADIO"))) { isCombo = false; isRadio = true; } if (dispType != null && dispType.equals(dico.getRefIdByCode("FqtDispType", "CHECK"))) { isCombo = false; isCheck = true; } int complementaryText = 0; try { complementaryText = curQuestion.getFqtAssociatedText(); } catch (FieldNotInitializedException fnie) { } int nbColumn = 1; try { nbColumn = curQuestion.getFqtColumnsNb(); } catch (FieldNotInitializedException fnie) { } int hasOther = 0; try { hasOther = curQuestion.getFqtHasOther(); } catch (FieldNotInitializedException fnie) { } String refTableID = null; try { refTableID = curQuestion.getFqtRefTable(); } catch (FieldNotInitializedException fnie) { } Vector listSelectedRef = null; String selectedRefStr = null; try{ listSelectedRef = (Vector)curQuestion.getCustomProperty("FqtRefsDisp_"); selectedRefStr = Utils.implodeList(listSelectedRef, "|"); }catch(FieldNotInitializedException e){} Vector listRef2Init = null; String refToInitStr = null; try{ listRef2Init = (refvals != null && refvals.size()>0) ? refvals : (Vector)curQuestion.getCustomProperty("FqtRefsInit_"); refToInitStr = Utils.implodeList(listRef2Init, "|"); }catch(FieldNotInitializedException e){} Vector possibleResponses = new Vector(); possibleResponses = listSelectedRef; if ( isLST ) { for (int j=0 ; j < 15 ; j++) { String lstAnswer = null; try { Method getter = Class.forName("com.edeal.frontline.FormQuestionBean").getMethod("getFqtLstAnswer" + j , null); lstAnswer = (String) getter.invoke(curQuestion , null); } catch (Exception e) { } if (lstAnswer != null) { Vector oneResponse = new Vector(); oneResponse.add(Integer.toString(j)); oneResponse.add(lstAnswer); possibleResponses.add(oneResponse); } } } else { String[] fields = {"RefID","RefVal"}; String[][] query = {{"RefTabID = " + Utils.formatToSQL(context, refTableID)}}; String[] orderBy = {"RefTe1 ASC"}; } Vector<String> initrefvals = new Vector<String>(); // nouvelle demande d'ajout d'equipement que pour hotel-sans-restaurant if ( qType.equals(dico.getRefIdByCode("FqtType" , "REF")) ) { isREF = true; if(initialResponse != null && initialResponse.size() > 0){ QuestionResponseBean qrs = null; for(int i=0; i<initialResponse.size(); i++){ if (entTyeID.equals(ETAB) && fqtSeqNum == 29) { qrs = (new QuestionResponseBean(initialResponse.elementAt(i),context)); String refresp = null; try{ refresp = qrs.getQrsRefValID(); test_81 = dico.getRefIdByCode("Qp_","Te1", "81"); // if(!refresp.equals(dico.getRefIdByCode("Qp_" , "Te1", "81")) || !refresp.equals(dico.getRefIdByCode("Qp_", "Te1", "RP"))){ initrefvals.add(refresp); } }catch(FieldNotInitializedException fe){ } } else { qrs = (new QuestionResponseBean(initialResponse.elementAt(i),context)); String refresp = null; try{ refresp = qrs.getQrsRefValID(); initrefvals.add(refresp); }catch(FieldNotInitializedException fe){ } } } } } Vector initlistSelectedRef = null; String initselectedRefStr = null; try{ initlistSelectedRef = (Vector)curQuestion.getCustomProperty("FqtRefsDisp_"); initselectedRefStr = Utils.implodeList(initlistSelectedRef, "|"); }catch(FieldNotInitializedException e){} Vector initlistRef2Init = null; String initrefToInitStr = null; try{ initlistRef2Init = (initrefvals != null && initrefvals.size()>0) ? initrefvals : (Vector)curQuestion.getCustomProperty("FqtRefsInit_"); initrefToInitStr = Utils.implodeList(initlistRef2Init, "|"); }catch(FieldNotInitializedException e){} //nouvelle demande d'ajout d'equipement que pour hotel-sans-restaurant if (entTyeID.equals(ETAB) && fqtSeqNum == 29){ initlistSelectedRef.remove(dico.getRefIdByCode("Qp_" , "Te1", "81")); initlistSelectedRef.remove(dico.getRefIdByCode("Qp_", "Te1", "RP")); } Vector initpossibleResponses = new Vector(); initpossibleResponses = initlistSelectedRef; String initresponseSelected = ""; for (int j=0 ; initpossibleResponses!=null && j < initpossibleResponses.size() ; j++) { String initresponseChoice = (String) initpossibleResponses.elementAt(j); String initresponseLabel = (String)dico.getRefDisp(locale, refTableID, "Te1", initresponseChoice); String tt_81 = (String)dico.getRefIdByCode("Qp_" , "Te1", "81"); String tt_RP = (String)dico.getRefIdByCode("Qp_", "Te1", "RP"); String qrsRefVal = null; boolean isRefVal = false; boolean isInitVal = (initlistRef2Init != null ? initlistRef2Init.contains(initresponseChoice) : false); int qrsPos = -1; if (!isLST) { try { qrsRefVal = initCurQrs != null ? initCurQrs.getQrsRefValID() : ""; isRefVal = qrsRefVal.equals(initresponseChoice); } catch (Exception e) {} } else { try { qrsPos = initCurQrs.getQrsPosition(); isRefVal = (new Integer(initresponseChoice).intValue() == qrsPos); } catch (Exception e) {} } initresponseSelected = isInitVal ? initresponseLabel : initresponseSelected ; } // Evolution EB030 Boolean isClassement = false; if(code.equals("EntCheNbID_") || code.equals("EntCocNbID_")/* || code.equals("EntStarClassID_") || code.equals("EntAnx_")*/){ if (!entTyeID.equals(HOTEL) && !entTyeID.equals(ETAB)) { isClassement = true; } } if (isCombo) { if (isClassement == false) { %> <p class="pre_post_labels p2_webform_questionblock"><%=lblLabel %></p> <p id="<%=prefix %>_WebForm_ValQuestion<%= lfqPos %>" class="webform_answer p_important_nofloat" > <% if(disabled) { %> <%if(fqtSeqNum == 182){ %> <div class="webform_label div1_w25fl div1_w25fl_fqtNum<%= fqtSeqNum %>"> <%} else { %> <div class="webform_label div1_w25fl"> <%} %> <%= qLabelCode != null ? qLabelCode : qLabel %></div> <div class="div1_w50fl" > <% if(possibleResponses != null && possibleResponses.size() > 0){ String responseSelected = ""; String responseChoice = ""; String responseChoiceSelected = ""; for (int j=0 ; j < possibleResponses.size() ; j++) { responseChoice = (String) possibleResponses.elementAt(j); String responseLabel = (String)dico.getRefDisp(locale, refTableID, "Te1", responseChoice); String qrsRefVal = null; boolean isRefVal = false; boolean isInitVal = (listRef2Init != null ? listRef2Init.contains(responseChoice) : false); int qrsPos = -1; if (!isLST) { try { qrsRefVal = curQrs != null ? curQrs.getQrsRefValID() : ""; isRefVal = qrsRefVal.equals(responseChoice); } catch (Exception e) {} } else { try { qrsPos = curQrs.getQrsPosition(); isRefVal = (new Integer(responseChoice).intValue() == qrsPos); } catch (Exception e) {} } responseSelected = isInitVal ? responseLabel : responseSelected ; responseChoiceSelected = isInitVal ? responseChoice : responseChoiceSelected ; } %> <input type="hidden" name="<%=prefix %>_<%= lfqPos %>_<%= isLST ? "ResponsePosition" : "ResponseRefID" %>" value="<%= responseChoiceSelected %>" /> <input class="webform_input input1_w100" type="text" <%if(fqtSeqNum == 182){ %> id="input1_w100_fqtNum<%= fqtSeqNum %>" <%} else { %> id="input1_w100" <%} %> name="<%=prefix %>__<%= lfqPos %>_<%= isLST ? "ResponsePosition" : "ResponseRefID" %>" value ="<%=responseSelected %>" size="<%= Integer.toString(complementaryText) %>" <%= (disabled ? "disabled" : "") %>/> <%if( isActorLogis && responseSelected != null && !Utils.isEmpty(responseSelected)){ %> <i class="i_text_initial"><%= responseSelected %></i> <% } %> <% }}else{ %> <%if(fqtSeqNum == 182){ %> <div class="webform_label div1_w25fl div1_w25fl_fqtNum<%= fqtSeqNum %>"> <%} else { %> <div class="webform_label div3_w25fl"> <%} %> <%= qLabelCode != null ? qLabelCode : qLabel %> </div> <div class="div2_w70fl"> <select <%if(fqtSeqNum == 182){ %> id="input1_w100_fqtNum<%= fqtSeqNum %>" <%} %> class="webform_select" name="<%=prefix %>_<%= lfqPos %>_<%= isLST ? "ResponsePosition" : "ResponseRefID" %>" <%= (disabled || fqtSeqNum == 182 ? "disabled" : "") %>> <% if(possibleResponses != null && possibleResponses.size() > 0) %> <%if(fqtSeqNum < 194 || fqtSeqNum > 196){ %> <option value=""></option> <%} for (int j=0 ; j < possibleResponses.size() ; j++) { String responseChoice = (String) possibleResponses.elementAt(j); String responseLabel = (String)dico.getRefDisp(locale, refTableID, "Te1", responseChoice); String qrsRefVal = null; boolean isRefVal = false; boolean isInitVal = (listRef2Init != null ? listRef2Init.contains(responseChoice) : false); int qrsPos = -1; if (!isLST) { try { qrsRefVal = curQrs != null ? curQrs.getQrsRefValID() : ""; isRefVal = qrsRefVal.equals(responseChoice); } catch (Exception e) {} } else { try { qrsPos = curQrs.getQrsPosition(); isRefVal = (new Integer(responseChoice).intValue() == qrsPos); } catch (Exception e) {} } %> <option value="<%= responseChoice %>" <%= (isInitVal || ( fqtSeqNum >= 194 && fqtSeqNum <= 196 && j == 0 ) ? "selected" : "") %>><%= responseLabel %></option> <% } %> </select> <%if(!disabled && isActorLogis && initresponseSelected != null && !Utils.isEmpty(initresponseSelected)){ %> <i class="i_text_initial"><%= initresponseSelected %></i> <% } %> <%} %> <% if (complementaryText > 0) { String cplText = null; try { cplText = curQrs != null ? curQrs.getQrsMoreText() : ""; } catch (Exception e) {} %> <input class="webform_input" type="text" name="<%=prefix %>_<%= lfqPos %>_ResponseComplementaryText_Any" value="<%= (cplText != null) ? curQrs.getQrsMoreText() :"" %>" size="<%= Integer.toString(complementaryText) %>"> <% } %> </div> </p> <br/> <p class="pre_post_labels p7_webform_questionblock"><%=postlblLabel %></p> <% } } else { // pas combo , c-a-d checkbox ou radio String tagType = "checkbox"; if (isRadio) { tagType = "radio"; } //int nbResByColumn = possibleResponses.size() / nbColumn; //if ( nbColumn * nbResByColumn < possibleResponses.size() ) nbResByColumn++; //int cptPossibleResponse = 0; if(possibleResponses != null && possibleResponses.size() > 0 && possibleResponses.size() == 1){ int nbResByColumn = possibleResponses.size() / nbColumn; if ( nbColumn * nbResByColumn < possibleResponses.size() ) nbResByColumn++; int cptPossibleResponse = 0; String responseChoice = (String) possibleResponses.elementAt(0); String responseLabel = qLabel; boolean isInitVal = (listRef2Init != null ? listRef2Init.contains(responseChoice) : false); String initresponseChoice = (String) initpossibleResponses.elementAt(0); boolean initisInitVal = (initlistRef2Init != null ? initlistRef2Init.contains(initresponseChoice) : false); %> <p id="<%=prefix %>_WebForm_ValQuestion<%= lfqPos %>" class="webform_answer"> <div class="webform_label div1_w95fl"> <p class="pre_post_labels p8_webform_questionblock"><%=lblLabel %></p> <label><input type="<%= tagType %>" name="<%=prefix %>_<%= lfqPos %>_<%= isLST ? "ResponsePosition" : "ResponseRefID" %>" value="<%= responseChoice %>" <%= isInitVal ? "checked" : "" %>> <%=initisInitVal && isActorLogis ? "<i class=\"i_text_initial\">"+(qLabelCode != null ? qLabelCode : qLabel)+"</i>" : (qLabelCode != null ? qLabelCode : qLabel) %></label> <p class="pre_post_labels p9_webform_questionblock"><%=postlblLabel %></p> </div> <% }else if(possibleResponses != null && possibleResponses.size() > 1){ int nbResByColumn = possibleResponses.size() / nbColumn; if ( nbColumn * nbResByColumn < possibleResponses.size() ) nbResByColumn++; int cptPossibleResponse = 0; %> <p id="<%=prefix %>_WebForm_ValQuestion<%= lfqPos %>" class="webform_answer"> <p class="pre_post_labels p10_webform_questionblock"><%= lblLabel %></p> <div class="webform_label div2_w95fl" ><%= qLabelCode != null ? qLabelCode : qLabel %></div> <%if(fqtSeqNum == 161) {%> <p class="pre_post_labels p11_webform_questionblock"><%= postlblLabel %></p> <%} %> <ul id="<%=prefix %>_WebForm_ValQuestion<%= lfqPos %>" class="webform_list ul_w95ofh"> <% boolean isChecked=false;%> <% if(fqtSeqNum == 29 || fqtSeqNum == 191 || fqtSeqNum == 119){ Hashtable allPossibleResponnesByCatCOde = EventHelper.getResponceChoiseByCategory(context, possibleResponses); int index = 0; List<String> keys = new ArrayList<String>(new HashSet(allPossibleResponnesByCatCOde.keySet())); Collections.sort(keys); for(Object catCodeId : keys){ String catLabel = (String)dico.getRefDisp(locale, (String)RefValuesBean.lookup(context, "reftabid", (String)catCodeId) , "Te1", (String)catCodeId); possibleResponses = (Vector)allPossibleResponnesByCatCOde.get(catCodeId); %> <div class="webform_label div2_w95fl"><p><%= catLabel %></p></div> <% index++; for (int j=0 ; j < possibleResponses.size() ; j++) { String responseChoice = (String) possibleResponses.elementAt(j); String responseLabel = (String)dico.getRefDisp(locale, refTableID, "Te1", responseChoice); String qrsRefVal = null; boolean isRefVal = false; boolean isInitVal = (listRef2Init != null ? listRef2Init.contains(responseChoice) : false); boolean initisInitVal = (initlistRef2Init != null ? initlistRef2Init.contains(responseChoice) : false); String wifiPayantRefID = dico.getRefIdByCode("Eq_NameID", "50"); if(isInitVal==true) isChecked=true; int qrsPos = -1; String styleVal = j != possibleResponses.size() - 1 ? "" : "margin-bottom: 25px;"; if (!isLST) try { qrsRefVal = curQrs != null ? curQrs.getQrsRefValID() : ""; isRefVal = qrsRefVal.equals(responseChoice); } catch (Exception e) {} else try { qrsPos = curQrs.getQrsPosition(); isRefVal = (new Integer(responseChoice).intValue() == qrsPos); } catch (Exception e) {} String cplText = null; try { cplText = curQrs != null ? curQrs.getQrsMoreText() : ""; } catch (Exception e) {} %> <li style="float:left;display:inline;width:<%= (100/nbColumn) + "%;" + styleVal %>"> <%if (cptPossibleResponse % nbResByColumn == 0) { %> <label class="webform_answer label1_fs12fwb" ><%= "radio".equals(tagType)? "<span class='spanaroundradio'>":"" %> <input type="<%= tagType %>" name="<%=prefix %>_<%= lfqPos %>_<%= isLST ? "ResponsePosition" : "ResponseRefID" %>" value="<%= responseChoice %>" <%= isRefVal || isInitVal ? "checked" : "" %> <%= (disabled ? "disabled" : "") %> /> <%=initisInitVal && isActorLogis ? "<i class=\"i_text_initial\">"+responseLabel+"</i>" : responseLabel %> <i style="font-weight: normal;"><%=responseChoice != null && wifiPayantRefID != null && responseChoice.equals(wifiPayantRefID) ? Utils.getMessage(context, lngCode, "FF329", true,true,"") : "" %></i> <%= "radio".equals(tagType)? "</span>":"" %></label> <% } else { %> <label class="webform_answer label2_fs12fwb"><%= "radio".equals(tagType)? "<span class='spanaroundradio'>":"" %> <input type="<%= tagType %>" name="<%=prefix %>_<%= lfqPos %>_<%= isLST ? "ResponsePosition" : "ResponseRefID" %>" value="<%= responseChoice %>" <%= isRefVal || isInitVal ? "checked" : "" %> <%= (disabled ? "disabled" : "") %> /> <!-- #006120--> <%=initisInitVal && isActorLogis ? "<i style=\"color:red\">"+responseLabel+"</i>" : responseLabel %> <i style="font-weight: normal;"><%=responseChoice != null && wifiPayantRefID != null && responseChoice.equals(wifiPayantRefID) ? Utils.getMessage(context, lngCode, "FF329", true,true,"") : "" %></i> <%= "radio".equals(tagType)? "</span>":"" %></label> <% }%> <%if ( (complementaryText > 0) || (hasOther > 0 && j == possibleResponses.size() - 1) ) { %> <input type="text" name="<%=prefix %>_<%= lfqPos %>_ResponseComplementaryText_<%= responseChoice %>" value="<%= cplText != null && isRefVal ? cplText : "" %>" size="<%= complementaryText > 0 ? Integer.toString(complementaryText) : Integer.toString(hasOther) %>" <%= (disabled ? "disabled" : "") %> /> <% } %> </li> <% cptPossibleResponse++; } } } else { for (int j=0 ; j < possibleResponses.size() ; j++) { String responseChoice = (String) possibleResponses.elementAt(j); String responseLabel = (String)dico.getRefDisp(locale, refTableID, "Te1", responseChoice); if(fqtSeqNum == 192){ //MF1F7 MF1F8 responseLabel = Utils.getMessage(context, lngCode, (j == 0) ? "MF1F7" : "MF1F8", true,true,"") ; } String onChangesBF = ""; if(fqtSeqNum == 40 && prefix != null && (prefix.startsWith("M") || prefix.startsWith("I"))){ onChangesBF = "onchange=\"handleBreakfastPrice(this);\""; } String responsePostLable = ""; if(fqtSeqNum == 161) responsePostLable = (String) EventHelper.getEquipementPostText(context, locale, responseChoice); String qrsRefVal = null; boolean isRefVal = false; boolean isInitVal = (listRef2Init != null ? listRef2Init.contains(responseChoice) : false); boolean initisInitVal = (initlistRef2Init != null ? initlistRef2Init.contains(responseChoice) : false); if(isInitVal==true) isChecked=true; int qrsPos = -1; if (!isLST) try { qrsRefVal = curQrs != null ? curQrs.getQrsRefValID() : ""; isRefVal = qrsRefVal.equals(responseChoice); } catch (Exception e) {} else try { qrsPos = curQrs.getQrsPosition(); isRefVal = (new Integer(responseChoice).intValue() == qrsPos); } catch (Exception e) {} String cplText = null; try { cplText = curQrs != null ? curQrs.getQrsMoreText() : ""; } catch (Exception e) {} %> <li style="float:left;display:inline;width:<%= (100/nbColumn) + "%" %>;"> <%if(fqtSeqNum == 1101 || fqtSeqNum == 213) {%> <% if (cptPossibleResponse % nbResByColumn == 0) { %> <% if(initisInitVal){ %> <label class="webform_answer label1_fs12fwb" > <%=responseLabel %> <img class="Valid_Green_Symbol" src="<fl:webapp/>/icons/valideResponseImage.png" style="height: 20px;" /> </label> <%} else{%> <label class="webform_answer label1_fs12fwb" style="color: #A3A6AB;" > <%=responseLabel %> <img class="Valid_Green_Symbol" src="<fl:webapp/>/icons/noValideResponseImage.png" style="height: 20px;" /> </label> <%} %> <% } else { %> <% if(initisInitVal){ %> <label class="webform_answer label1_fs12fwb" > <%=responseLabel %> <img class="Valid_Green_Symbol" src="<fl:webapp/>/icons/valideResponseImage.png" style="height: 20px;" /> </label> <%} else{%> <label class="webform_answer label1_fs12fwb" style="color: #A3A6AB;" > <%=responseLabel %> <img class="Valid_Green_Symbol" src="<fl:webapp/>/icons/noValideResponseImage.png" style="height: 20px;" /> </label> <%} %> <% }%> <%} else { if (cptPossibleResponse % nbResByColumn == 0) { %> <label class="webform_answer label1_fs12fwb" <%= (isRefVal || isInitVal) && fqtSeqNum == 165 ? "style=\"color:green;\"" : "" %> > <%= "radio".equals(tagType)? "<span class='spanaroundradio'>":"" %> <input type="<%= tagType %>" name="<%=prefix %>_<%= lfqPos %>_<%= isLST ? "ResponsePosition" : "ResponseRefID" %>" value="<%= responseChoice %>" <%= isRefVal || isInitVal ? "checked" : "" %> <%= (disabled ? "disabled" : "") %> <%= fqtSeqNum == 165 ? "onchange=\"changeLabelColor(this);\"" : "" %> <%= onChangesBF %> /> <%=initisInitVal && isActorLogis ? "<i class=\"i_text_initial\">"+responseLabel+"</i>" : responseLabel %> <%if(fqtSeqNum == 161 && responsePostLable != null){ %> <span class="pre_post_choises"><%= responsePostLable %></span> <%} %> <%= "radio".equals(tagType)? "</span>":"" %></label> <% } else { %> <label class="webform_answer label2_fs12fwb" <%= (isRefVal || isInitVal) && fqtSeqNum == 165 ? "style=\"color:green;\"" : "" %> ><%= "radio".equals(tagType)? "<span class='spanaroundradio'>":"" %> <input type="<%= tagType %>" name="<%=prefix %>_<%= lfqPos %>_<%= isLST ? "ResponsePosition" : "ResponseRefID" %>" value="<%= responseChoice %>" <%= isRefVal || isInitVal ? "checked" : "" %> <%= (disabled ? "disabled" : "") %> <%= fqtSeqNum == 165 ? "onchange=\"changeLabelColor(this);\"" : "" %> <%= onChangesBF %> /> <!-- #006120--> <%=initisInitVal && isActorLogis ? "<i style=\"color:red\">"+responseLabel+"</i>" : responseLabel %> <%if(fqtSeqNum == 161 && responsePostLable != null){ %> <span class="pre_post_choises"><%= responsePostLable %></span> <%} %> <%= "radio".equals(tagType)? "</span>":"" %></label> <% }}%> <%if ( (complementaryText > 0) || (hasOther > 0 && j == possibleResponses.size() - 1) ) { %> <input type="text" name="<%=prefix %>_<%= lfqPos %>_ResponseComplementaryText_<%= responseChoice %>" value="<%= cplText != null && isRefVal ? cplText : "" %>" size="<%= complementaryText > 0 ? Integer.toString(complementaryText) : Integer.toString(hasOther) %>" <%= (disabled ? "disabled" : "") %> /> <% } %> <%if(fqtSeqNum == 165){ %> </li> <br><br> <%} else { %> </li> <%} %> <% cptPossibleResponse++; } } %> </ul> <br/> </p> <%if(fqtSeqNum != 161) {%> <p class="pre_post_labels p11_webform_questionblock"><%= postlblLabel %></p> <%} if(fqtSeqNum == 165){ %> <div class="webform_label div1_w25fl doNotPrint buttonDiv" style=" text-align: center; min-width:100%;"> <span style="font-size: 15px; background-color: blue;" onclick="calculateIndice('<%= prefix%>' , '<%= lfqPos%>', '<%= languageID %>' , '<%= countryID%>');"> <%=Utils.getMessage(context, lngCode, "FF33B", true,true,"Calculer mon indice Séjour plus sûr")%> </span> </div> <br> <br> <br> <br> <br> <div class="webform_label div1_w25fl doNotPrint" style="width: 20%;" > <span> <%=Utils.getMessage(context, lngCode, "FF344", true,true,"Indice séjour plus sûr")%> </span> </div> <div class="webform_answer div1_w50fl doNotPrint" style="width: 20%; background-color: #A3A6AB; text-align: center;"> <span style="font-size: 12px; font-weight: bold;" id="PrintResult"></span> </div> <br> <br> <br> <%} } //if > 1 %> <% } } %> </div> <%}%>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de