Edit C:\Users\Administrator\Desktop\Back\galaxie - Copy\sales\person\edit_per_event_per.jsp
<% // 0038935: CTC Questionnaire de satisfaction // http://u-project2.umanis.com/view.php?id=38935 /****************************************************************************** * Copyright (c) 2000-2006 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.FieldNotInitializedException" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="java.util.LinkedHashMap" %> <%@ page import="java.util.Iterator" %> <%@ page import="java.util.Vector" %> <%@ page import="java.util.Hashtable"%> <%@ page import="com.edeal.frontline.ListBean" %> <%@ page import="com.edeal.frontline.initializers.PersonEventInitializer" %> <%@ page import="com.edeal.frontline.helper.EventBaseHelper.EventCategory" %> <%@ taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean class="com.edeal.frontline.PersonEventBean" id="PersonEvent" 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 = context.getDataDictionary(); String id = flRequest.getParameter("id"); LinkedHashMap<String, String> listInscriptionStatusIDAndDisplay = (LinkedHashMap<String, String>) flRequest.getAttribute(PersonEventInitializer.LIST_INSCRIPTION_STATUS); if (listInscriptionStatusIDAndDisplay == null) { listInscriptionStatusIDAndDisplay = new LinkedHashMap<String, String>(); } LinkedHashMap<String, String> listParticipationStatusIDAndDisplay = (LinkedHashMap<String, String>) flRequest.getAttribute(PersonEventInitializer.LIST_PARTICIPATION_STATUS); if (listParticipationStatusIDAndDisplay == null) { listParticipationStatusIDAndDisplay = new LinkedHashMap<String, String>(); } String msqQuota = (String) flRequest.getAttribute(PersonEventInitializer.MSG_QUOTA); EventCategory eventCategory = (EventCategory) flRequest.getAttribute(PersonEventInitializer.EVENT_TYPE); String pvtID = null; try { pvtID = PersonEvent.getPvtID(); } catch (FieldNotInitializedException fnie) { } String pvtEventID = null; try { pvtEventID = PersonEvent.getPvtEventID(); } catch (FieldNotInitializedException fnie) { } String pvtParStatus = null; try { pvtParStatus = PersonEvent.getPvtParStatus(); } catch (FieldNotInitializedException fnie) { } String pvtInsStatus = null; try { pvtInsStatus = PersonEvent.getPvtInsStatus(); } catch (FieldNotInitializedException fnie) { } String NonRepondu = null; try { NonRepondu = dico.getRefIdByCode("Esp", "Te1", "NORES"); } catch (Exception e) { e.printStackTrace(); } //ABM Evolution : http://u-project2.umanis.com/view.php?id=40873 = création du liste SENDQSTEVT String lstObjID = ""; try { String[] fieldslst = {"LstID"}; String[][] querylst = {{"LstCode = 'SENDQSTEVT'"}}; Vector listlst = ListBean.listSummary(context, fieldslst, querylst); if(listlst != null && !listlst.isEmpty()) { Hashtable tab = (Hashtable)listlst.firstElement(); lstObjID = (String)tab.get("LstID"); } } catch (Exception e) { lstObjID =""; } String envoye = null; try { envoye = dico.getRefIdByCode("PvtInsStatus", "SENT"); } catch (Exception e) { e.printStackTrace(); } %> <html> <head> <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/checkFields.jsp"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/presentField.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/utils.js"></script> <script language="javascript"> function doPvtEventIDChange() { var f = document.forms[0]; f.action = "<fl:webapp/>/refresh_personevent_per.fl"; f.submit(); } function doSubmit() { var resp = checkPersonEventFields(); if (resp == 0) return; var f = document.forms[0]; f.$$returnedHtmlBody.value = 'Nothing here'; f.$$returnedHtmlHead.value = '<sc' + 'ript language=\"javascript\">window.top.opener.doRefreshEvents();window.top.close();</scr' + 'ipt>'; f.submit(); } function checkPersonEventFields(){ var f = document.forms[0]; if (f.PvtEventID.value == '') { alert('<fl:getMessage code="L818E" alt="Veuillez sélectionner un événement" js="true"/>'); f.PvtEventID.focus(); return 0; } if (f.PvtPersonID.value == '') { alert('<fl:getMessage code="M9040" alt="Veuillez sélectionner une personne" js="true"/>'); f.PvtPersonID.focus(); return 0; } return 1; } function doSendQstToPerson(){ var resp = checkPersonEventFields(); if (resp == 0) return; if (window.confirm('<fl:getMessage code="MF18A" alt="Etes-vous sûr de vouloir envoyer un mail à cette personne avec cet événement :" js="true"/>' + '\n' + $("#lblPvtEventID").val() + ' ?')) { var PvtID = $("#PvtID").val(); var url = '<fl:link url="/send_pvt_qst_ajax_per.fl?1=1"/>&PvtID=' + PvtID ; showWaiting(); $.getJSON(url, function(data) { hideWaiting(); var msg =""; $.each( data, function( key, val ) { msg = val; }); if(msg === "OK"){ alert('Mail envoyé !'); document.getElementsByName('PvtInsStatus')[0].value = '<%=envoye%>'; }else{ alert(msg); } doSubmit(); }); } } function CustomEventListLink(){ window.open("<fl:webapp/>/xml_select_list.fl?id=<%=lstObjID%>&field=PvtEventID&formIndex=0", 'SelectLo_RattID', 'resizeable=yes,scrollbars=yes,menubar=no,toolbar=no,height=670,width =800'); } </script> <title><fl:getMessage code="L2025" alt="e-Deal"/></title> <link rel="stylesheet" href="<fl:webapp/>/css/common_css.jsp" 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/master_css.jsp"> <script language="javascript" src="<fl:webapp/>/js/jsOnload.jsp"></script> </head> <body> <div id="object_css" style="top: 0px; left: 0px; bottom: 0px; height: 100%;"> <fl:bigTabs ignoreList="" objectTitle="<%= Utils.getMessage(session, \"MF17B\", \"Envoyer un questionnaire\") %>"> <fl:form action="/save_personevent.fl" bean="PersonEvent"> <input type="hidden" name="$$returnedHtmlHead" value=""/> <input type="hidden" name="$$returnedHtmlBody" value="Closing..."/> <input type="hidden" name="$$presentFields" value="" /> <input type="hidden" id="PvtID" name="PvtID" value="<%=pvtID %>" /> <table class="container" cellpadding="0"> <% if ((msqQuota != null) && (EventCategory.MEET.equals(eventCategory))) { %> <tr> <td colspan="3" class="titreFiche"> <%= msqQuota %> </td> </tr> <tr class="ligne_separation"><td colspan="3"></td></tr> <% } %> <tr> <td class="column2"> <table class="data_column" cellpadding="0"> <fl:fieldEdit property="PvtEventID" mandatoryMsgCode="L818E" selectUrl="javascript:CustomEventListLink();"/> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="data_column" cellpadding="0"> <fl:fieldEdit property="PvtPersonID" mandatoryMsgCode="M9040"/> </table> </td> </tr> <tr class="ligne_separation"><td></td></tr> <tr> <td class="column2"> <table class="data_column" cellpadding="0"> <tr class="fieldline"> <td class="dataLabel" id="PvtInsStatus_label"><div><label title="Inscription" for="PvtInsStatus"><fl:getMessage code="F80AF" alt="Inscription"/></label></div></td> <td class="dataValue"> <div> <select name="PvtInsStatus" class="input select chpsTextObligatoire"> <% Iterator iter = listInscriptionStatusIDAndDisplay.keySet().iterator(); while (iter.hasNext()) { String statusID = (String) iter.next(); String statusDisplay = (String) listInscriptionStatusIDAndDisplay.get(statusID); %> <option value="<%= statusID %>" <%= statusID.equals(pvtInsStatus) ? "selected" : "" %>><%= statusDisplay %></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="PvtPerInsRep"/> </table> </td> </tr> <tr class="ligne_separation"><td></td></tr> <tr> <td class="column2"> <table class="data_column" cellpadding="0"> <tr class="fieldline"> <td class="dataLabel" id="PvtParStatus_label"><div><label title="Participation" for="PvtParStatus"><fl:getMessage code="L8186" alt="Participation"/></label></div></td> <td class="dataValue"> <div> <select name="PvtParStatus" class="input select chpsTextObligatoire"> <!-- <option value=""></option> --> <% Iterator iter2 = listParticipationStatusIDAndDisplay.keySet().iterator(); while (iter2.hasNext()) { String statusID = (String) iter2.next(); String statusDisplay = (String) listParticipationStatusIDAndDisplay.get(statusID); %> <option value="<%= Utils.formatToWeb(statusID, true) %>" <%= statusID.equals(NonRepondu) ? "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="PvtPerParRep"/> <!-- <fl:fieldEdit property="PvtPerParAcc"/> --> </table> </td> </tr> </table> </fl:form> </fl:bigTabs> <br> <table class="data_column" cellpadding="0"> <tr> <td style="text-align: center;"> <a href="javascript:doSendQstToPerson();"><img style="border: none;" src="<fl:webapp/>/icons/ico/valid_green_long.gif"></a> <a href="javascript:window.close()"><img style="border: none;" src="<fl:webapp/>/icons/ico/fermer_red_long.gif"></a> </td> </tr> </table> </div> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de