Edit C:\Users\Administrator\Desktop\Back\galaxie - Copy\netbusiness\customform\edit.jsp
<% /****************************************************************************** * 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" %> <%@ page import="com.edeal.frontline.controller.actions.SelectAction" %> <%@ page import="com.edeal.frontline.initializers.FormEventInitializer" %> <jsp:useBean class="com.edeal.frontline.FormBean" id="Form" scope="request"/> <jsp:useBean class="com.edeal.frontline.LinkFormQuestionBean" id="LinkFormQuestion" scope="request"/> <link href="<fl:webapp/>/css/common_css.jsp" rel="stylesheet" type="text/css"> <% 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); String id = null; try{ id = Form.getID(); }catch(FieldNotInitializedException fnie){} String seqNum = ""; try{ seqNum = "" + Form.getFrmSeqNum(); }catch(FieldNotInitializedException fnie){ //seqNum = CounterFactory.getCounter(context , "FormNum"); Date d = new Date(); String datestr = String.valueOf(d.getTime()); datestr = datestr.substring(datestr.length()-9); seqNum = datestr; } DecimalFormat df = locale.getDecimalFormat("0000"); Vector eventStatusList = null; String frmEventID = null; String evtLabel = ""; String evtCode = ""; String evtTitle = ""; EventBean evt = null; Vector listSatut = new Vector(); String typeRefresh = flRequest.getRequestParameterOrAttribute("typeRefresh"); try{ frmEventID = Form.getFrmEventID(); }catch(FieldNotInitializedException fnie){} 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; } //End if evtId != null //Gestion du titre de la partie Evenement if (evtTitle.length() < " - ".length()+1){ evtTitle = Utils.getMessage(session, "L305F", "Evénement"); } LinkedHashMap<String, String> listParticipationStatusIDAndDisplay = (LinkedHashMap<String, String>) flRequest.getAttribute(FormEventInitializer.LIST_PARTICIPATION_STATUS); if (listParticipationStatusIDAndDisplay == null) { listParticipationStatusIDAndDisplay = new LinkedHashMap<String, String>(); } String frmParStatus = null; try { frmParStatus = Form.getFrmParStatus(); } catch (FieldNotInitializedException fnie) { } String message=null; try{ message=(String)Form.getCustomProperty("FrmMsgMerci_"); }catch (FieldNotInitializedException fnie) { } %> <script type="text/javascript" language="javascript"> function doRefresh(){ var f = document.forms[0]; doExitConf = false; var url = "<fl:link url="/refresh_customform.fl"/>&typeRefresh=Refresh"; f.typeRefresh.value = 'Refresh'; f.action = url; var i; for (i=0 ; i < f.Links.length ; i++) { f.LinksTexts.value += (i==0 ? "" : "|") + f.Links.options[i].text; f.LinksValues.value += (i==0 ? "" : "|") + f.Links.options[i].value; } f.submit(); } function doSubmit(){ var mf = document.forms[0]; mf.FrmWebIntro.value = editorFrmWebIntro.getData(); mf.FrmWebConclusion.value = editorFrmWebConclusion.getData(); mf.FrmWebHeader.value = editorFrmWebHeader.getData(); mf.FrmWebFooter.value = editorFrmWebFooter.getData(); mf.FrmWebTermsOfUse.value = editorFrmWebTermsOfUse.getData(); for (i=0 ; i < mf.Links.length ; i++) { mf.LinksTexts.value += (i==0 ? "" : "|") + mf.Links.options[i].text; mf.LinksValues.value += (i==0 ? "" : "|") + mf.Links.options[i].value; } beforeSubmit(); return true; } function loadParagraphs(paragraphs) { var mf = document.forms[0]; var paragraphs = mf.LfqParagraphID_.value; $.getJSON("<fl:webapp/>/get_link_label.fl?paragraphs=" + paragraphs, function(data) { if (data != null) { for (var i = 0; i < data.length; i++) { var optValue = data[i].value + '-' + data[i].text; var optText = data[i].value + '-' + data[i].text; mf.Links.options[mf.Links.options.length] = new Option('<fl:getMessage code="L616E" alt="(P)"/> ' + optText , optValue); } mf.lblLfqParagraphID_.value = ''; mf.LfqParagraphID_.value = ''; } }); } function doLfqNaureID__Change(){ var nature = document.getElementById('LfqNaureID_').value; if(nature == '<%= dico.getRefIdByCode("LfqNaureID_", "PARAGRAPHE")%>'){ document.getElementById('question').style.visibility = "hidden"; document.getElementById('question').style.display = "none"; document.getElementById('paragraph').style.visibility = "visible"; document.getElementById('paragraph').style.display = "block"; }else{ document.getElementById('question').style.visibility = "visible"; document.getElementById('question').style.display = "block"; document.getElementById('paragraph').style.visibility = "hidden"; document.getElementById('paragraph').style.display = "none"; } } function doSelectLabel(field) { window.open('<fl:link url="/select_label.fl?1=1"/>&field=' + field, 'select_label', 'width=1000,height=500,menubar=no,status=no,resizable=yes'); } function doRemoveLabel(field){ var f = window.document.forms[0]; if(field == 'ParagraphText'){ f.lblParagraphText.value=''; f.ParagraphText.value = ''; } } function addParagraphAndClearArea(){ paragraphValue = document.getElementById("lblParagraphText").value; document.getElementById("ParagraphText").value = paragraphValue; addParagraph(paragraphValue); doRemoveLabel('ParagraphText'); } </script> <fl:form action="/save_customform.fl" bean="Form"> <% if (id==null) { %> <input type="hidden" name="FrmStatus" value="<%= dico.getRefIdByCode("FrmStatus", "MAKING") %>"/> <% } %> <fl:bigTabs objectTitle="<%=Utils.getMessage(session, \"L63EE\", false, true, \"Questionnaire\")%>" ou="<%=\"/edit_customform.fl\"+(id != null ? \"?id=\"+id : \"id\")%>"> <div> <input type="hidden" name="typeRefresh" /> <table class="container" cellpadding="0"> <input type="hidden" name="typeRefresh" /> <tr> <td colspan="3"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="labelTitreFiche"> <fl:label field="FrmLabel" labelClassName="titreFiche"/> </td> <td class="fieldTitreFiche"> <fl:input property="FrmLabel" mandatoryMsgCode="L63EF"/> </td> </tr> </table> </td> </tr> <tr><td colspan="3" class="ligne_separation"/></tr> <tr> <td class="column2"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F202D" alt="Numéro"/></td> <td class="dataValue"><input type="hidden" name="FrmSeqNum" value="<%= "" + seqNum %>"><%=seqNum%></td> </tr> <fl:fieldEdit property="FrmTypID_" mandatoryMsgCode="" alt=""/> <fl:fieldEdit property="FrmLngID" /> <%-- <fl:fieldEdit property="FrmCategory"/> <fl:fieldEdit property="FrmTabMode"/> --%> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="container" cellpadding="0"> <fl:fieldEdit property="FrmAvailableFromDt" mandatoryMsgCode="M900A" alt="" /> <fl:fieldEdit property="FrmAvailableToDt" mandatoryMsgCode="M900A" alt=""/> <%-- http://u-project2.umanis.com/view.php?id=39749: Export guide / localités et Millésime --%> <fl:fieldEdit property="FrmMillesime_" mandatoryMsgCode="M900A" alt="" size="10"/> <fl:fieldEdit property="FrmIsPublic"/> </table> </td> </tr> <tr><td colspan="3" class="ligne_separation"/></tr> </table> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <fl:smallTabs name="FormQuestDetails" > <fl:sTab id="formEvent" title="<%= Utils.getMessage(session, \"F2022\", false, true, \"Evénements\") %>"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="column2"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F2022" alt="Evénements"/></td> <td class="dataValue"> <input type="hidden" name="mandatory" value="lblFrmEventID"> <input type="hidden" id="mandatory.lblFrmEventID" name="mandatory.lblFrmEventID" value="<fl:getMessage code="M60D9" alt="Veuillez spécifier un événement"/>"> <input type="hidden" name="FrmEventID" value="<fl:getProperty name="Form" property="FrmEventID" alt="" edit="true"/>"/> <input name="lblFrmEventID" type="text" onfocus="this.blur();" value="<%= evtLabel %>" readonly class="input text" /> <a href="javascript:var win = window.open('<fl:webapp/>/select_event.fl?field=FrmEventID&formIndex=0&unattached=1&EvtID=<%= frmEventID %>', 'SelectEvent', 'menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes,width=<%= SelectAction.SELECT_WINDOW_WIDTH %>,height=370')"> <img src="<fl:webapp/>/icons/ico/rechercher.gif" align="top" border="0" width="17" height="17" alt="Sélectionner"> </a> <a href="javascript: clearEvent();"> <img src="<fl:webapp/>/icons/ico/supprimer.gif" align="top" border="0" width="17" height="17" alt="Vider le champ"> </a> <span id="lblFrmEventID_msg" class="mandatory_alert" style="display: none">!</span> <br><span class="comment"><fl:getMessage code="M6111" alt="Les événements déjà attachées à une questionnaire ne seront pas disponibles"/></span> </td> </tr> </table> </td> </tr> <tr> <td class="column2"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="dataLabel" id="FrmParStatus_label"><div><label title="Participation" for="FrmParStatus"><fl:getMessage code="L8186" alt="Participation"/></label></div></td> <td class="dataValue"> <div> <select name="FrmParStatus" class="input select"> <option value=""></option> <% Iterator iter2 = listParticipationStatusIDAndDisplay.keySet().iterator(); while (iter2.hasNext()) { String statusID = (String) iter2.next(); String statusDisplay = (String) listParticipationStatusIDAndDisplay.get(statusID); %> <option value="<%= statusID %>" <%= statusID.equals(frmParStatus) ? "selected" : "" %>><%= Utils.formatToWeb(statusDisplay, true) %></option> <% } %> </select> </div> </td> </tr> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="data_column" cellpadding="0"> <fl:fieldEdit property="FrmParStatusRule"/> </table> </td> </tr> </table> </fl:sTab> <fl:sTab id="formQuest" title="<%=Utils.getMessage(session, \"L0038\", false, true, \"Question\")+\"/\"+Utils.getMessage(session, \"L613E\", false, true, \"Paragaraphe\")%>"> <%-- <table class="container" cellpadding="0"> <tr> <td class="column2"> <table class="container" cellpadding="0"> <tr class="fieldline"> <fl:fieldEdit property="LfqNaureID_" onchange="javascript:doLfqNaureID__Change();"/> </tr> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="container" cellpadding="0" style="visibility: hidden;display:none;" id="paragraph"> <tr class="fieldline"> <fl:fieldEdit property="LfqParagraphID_"/> </tr> </table> <table class="container" cellpadding="0" style="visibility: visible;display:block;" id="question"> <tr class="fieldline"> <fl:fieldEdit property="LfqStoreInObjID_"/> <fl:fieldEdit property="LfqStoreInFldID_"/> </tr> </table> </td> </tr> <tr><td colspan="3" class="ligne_separation"/></tr> </table> --%> <table class="container" cellpadding="0"> <tr class="fieldline"> <td> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="dataValue"> <input type="hidden" name="LinksValues" > <input type="hidden" name="LinksKeys"> <input type="hidden" name="LinksTexts" > <table style="width: 100%;"><tr><td style="width: 60%;"> <div style="float:left;width: 100%; overflow: hidden;"> <select id="Links" name="Links" size="12" style="width:100% ;overflow-y: scroll; overflow-x: hidden;"> <% String linksValues = Utils.getRequestParameter(context, request, "LinksValues"); String linksTexts = Utils.getRequestParameter(context, request, "LinksTexts"); if (typeRefresh != null && "Refresh".equals(typeRefresh)) { Vector linksValuesVec = Utils.explodeList(linksValues , "|"); Vector linksTextsVec = Utils.explodeList(linksTexts , "|"); for (int i=0 ; i<linksValuesVec.size() ; i++) { String curVal = (String) linksValuesVec.elementAt(i); String curTxt = (String) linksTextsVec.elementAt(i); %> <option value="<%= curVal %>"><%= curTxt %></option> <%} }else if (id!=null){ String[][] query = {{"LfqFormID = " + Utils.formatToSQL(context, id)}}; String[] fields = {"LfqID" , "LfqFormQuestionID" , "LfqFormQuestionID:FqtLabel", "LfqParagraph", "LfqPosition"}; 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 curLfqParagraphLbl = Utils.getM String fqtLabel = (String) curLink.get("LfqFormQuestionID:FqtLabel"); %> <option value="<%= curLfqFormQuestionID == null ? curLfqParagraph : curLfqFormQuestionID %>"><%= curLfqFormQuestionID == null ? Utils.getMessage(session, "L616E", "(P)") + " " + Utils.getMessage(session, curLfqParagraph, curLfqParagraph) : Utils.getMessage(session, "L616F", "(Q)") + " " + fqtLabel %></option> <% } } } %> </select> </div> </td> <td style="width: 40%;"> <div style="float:left; margin:5px;"> <table style="width: 80%;"> <tr> <td class="principalText bigFieldPart" style="width: 70%;"> <fl:getMessage code="L613E" alt="Paragraphe"/><br/> <div class="fobLeftDiv"> <textarea name="lblParagraphText" id="lblParagraphText" class="input textarea" style="width: 100%;"></textarea> <input name="ParagraphText" id="ParagraphText" type="hidden" value=""> </div> </td> <td class="smallFieldPart" style="width: 30%;"> <a href="javascript:addParagraphAndClearArea()"><img src="<fl:webapp/>/icons/ico/creer.gif"></a> </td> </tr> </table> <!-- <input type="text" name="ParagraphText" id="ParagraphText" style="margin-bottom: 5px;"><br> <fl:getMessage code="L613E" alt="Paragraphe"/> <a href="javascript:addParagraph()"> <img src="<fl:webapp/>/icons/ico/creer.gif"></a><br><br> --> <table class="container" cellpadding="0" style ="vertical-align: middle; align:center;"> <%-- <fl:fieldEdit property="LfqParagraphID_"/> --%> <%-- <fl:fieldEdit property="LfqParagraphLblID_" type="list"/> --%> <%-- <a href="javascript:loadParagraphs()"><img src="<fl:webapp/>/icons/ico/save_all_long.gif"></a><br><br> --%> </table> <br/><br/> <fl:getMessage code="L606D" alt="Questions"/> <a href="javascript:var win = window.open('<fl:webapp/>/select_link.fl?type=FormQuestion&field=FqtID&formIndex=0', 'LinkSelect', 'menubar=no,status=no,toolbar=no,scrollbars=no,resizable=yes,width=760,height=380')"> <img src="<fl:webapp/>/icons/ico/rechercher.gif" border="0" height="17" alt="Sélectionner"> </a> </div> </td> </tr> </table> </td> <!-- je ne sais pas pourquoi il y a ces deux tds ? <td width="5px"></td> <td class="dataLabel"> </td> --> </tr> <tr> <td> </td> </tr> <tr class="fieldline"> <td class="dataValue" colspan="2"> <a href="javascript:moveLineUp()"><img src="<fl:webapp/>/icons/ico/flecheH.gif"></a> <a href="javascript:removeLine()"><img src="<fl:webapp/>/icons/ico/supprimer.gif"></a> <a href="javascript:moveLineDown()"><img src="<fl:webapp/>/icons/ico/flecheB.gif"></a> </td> </tr> </table> </td> </tr> </table> </fl:sTab> <fl:sTab id="FormIntroConc" title="<%=Utils.getMessage(session, \"F619E\", \"Introduction\")+\"/\"+Utils.getMessage(session, \"F619D\", \"Conclusion\") %>"> <table class="container" cellpadding="0"> <tr> <td colspan="3"> <fl:fieldEdit name="Form" property="FrmWebIntro" alt=" "/> <fl:fieldEdit name="Form" property="FrmWebConclusion" alt=" "/> <fl:fieldEdit name="Form" property="FrmWebTermsOfUse" alt=" "/> <td class="separation"><div class="separation"></div></td> <fl:fieldEdit name="Form" property="FrmMsgMerci_" mandatoryMsgCode="LF368" alt=" "/> <!-- <input type="text" name="FrmMsgMerci_"/> <textarea name="FrmMsgMerci_"cols="30" rows="4"></textarea> <input type="submit" value="Enregistrer"> --> </td> </tr> </table> </fl:sTab> <fl:sTab id="FormHeadFoot" title="<%=Utils.getMessage(session, \"F61A0\", \"En-tête\")+\"/\"+Utils.getMessage(session, \"F61A1\", \"Pied de page\") %>"> <table class="container" cellpadding="0"> <tr> <td colspan="3"> <fl:fieldEdit name="Form" property="FrmWebHeader" alt=" "/> <fl:fieldEdit name="Form" property="FrmWebFooter" alt=" " /> </td> </tr> </table> </fl:sTab> <fl:sTab id="FormDetails" title="<%=Utils.getMessage(session, \"F2024\", true, \"Notes\")%>"> <fl:input property="FrmDetails" rows="6" width="100%"/> </fl:sTab> </fl:smallTabs> </div> </fl:bigTabs> </fl:form> <!-- CKEditor --> <script type="text/javascript" src="<fl:webapp/>/js/wysiwyg/ckeditor/ckeditor.js"></script> <script type="text/javascript" src="<fl:webapp/>/js/wysiwyg/ckeditor/adapters/jquery.js"></script> <script type="text/javascript"> var editorFrmWebIntro = CKEDITOR.replace('FrmWebIntro', { toolbar : [ ['Styles','Format','Font','FontSize','-','Bold','Italic','Underline','StrikeThrough','-','Undo','Redo','-','Cut','Copy','Paste','Find','Replace','-','Outdent','Indent','-','Print'], '/', ['NumberedList','BulletedList','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'], ['Table','-','Link','Flash','Smiley','TextColor','BGColor','Source','-','FusionButton','SimpleLinkButton'] ], toolbarStartupExpanded : true, resize_enabled : false }); var editorFrmWebConclusion = CKEDITOR.replace('FrmWebConclusion', { toolbar : [ ['Styles','Format','Font','FontSize','-','Bold','Italic','Underline','StrikeThrough','-','Undo','Redo','-','Cut','Copy','Paste','Find','Replace','-','Outdent','Indent','-','Print'], '/', ['NumberedList','BulletedList','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'], ['Table','-','Link','Flash','Smiley','TextColor','BGColor','Source','-','FusionButton','SimpleLinkButton'] ], toolbarStartupExpanded : true, resize_enabled : false }); var editorFrmWebHeader = CKEDITOR.replace('FrmWebHeader', { toolbar : [ ['Styles','Format','Font','FontSize','-','Bold','Italic','Underline','StrikeThrough','-','Undo','Redo','-','Cut','Copy','Paste','Find','Replace','-','Outdent','Indent','-','Print'], '/', ['NumberedList','BulletedList','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'], ['Table','-','Link','Flash','Smiley','TextColor','BGColor','Source','-','FusionButton','SimpleLinkButton'] ], toolbarStartupExpanded : true, resize_enabled : false }); var editorFrmWebFooter = CKEDITOR.replace('FrmWebFooter', { toolbar : [ ['Styles','Format','Font','FontSize','-','Bold','Italic','Underline','StrikeThrough','-','Undo','Redo','-','Cut','Copy','Paste','Find','Replace','-','Outdent','Indent','-','Print'], '/', ['NumberedList','BulletedList','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'], ['Table','-','Link','Flash','Smiley','TextColor','BGColor','Source','-','FusionButton','SimpleLinkButton'] ], toolbarStartupExpanded : true, resize_enabled : false }); var editorFrmWebTermsOfUse = CKEDITOR.replace('FrmWebTermsOfUse', { toolbar : [ ['Styles','Format','Font','FontSize','-','Bold','Italic','Underline','StrikeThrough','-','Undo','Redo','-','Cut','Copy','Paste','Find','Replace','-','Outdent','Indent','-','Print'], '/', ['NumberedList','BulletedList','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'], ['Table','-','Link','Flash','Smiley','TextColor','BGColor','Source','-','FusionButton','SimpleLinkButton'] ], toolbarStartupExpanded : true, resize_enabled : false }); </script>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de