Edit C:\galaxie\deploy\Tomcat6\webapps\galaxie\admin\department\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" %> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/smalltabs_css.jsp"> <jsp:useBean class="com.edeal.frontline.DepartmentBean" id="Department" 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 = null; try { id = Department.getID(); } catch (FieldNotInitializedException fnie) { } // Get the current fiscal year from the Année Fiscal reference table java.util.Vector yearRefList = dico.getRefList(session, "Anf", "Te2"); java.util.Vector tmpVector; java.util.Iterator it = yearRefList.iterator(); String refID = ""; String refVal = "N"; while (it.hasNext()) { tmpVector = (java.util.Vector) it.next(); refID = (String) tmpVector.get(0); refVal = (String) tmpVector.get(1); if (refVal.equals("O")) { break; } } String currFiscalYear = refVal.equals("N") ? "0" : dico.getRefCode("Anf", "Te1", refID); String prevFiscalYear = "0"; try { Integer prevYear = new Integer(Integer.parseInt(currFiscalYear) - 1); prevFiscalYear = prevYear.toString(); } catch (NumberFormatException e) { } boolean PrtGrpeType = false; boolean PrtGrpePrevType = false; try { PrtGrpeType = Department.isDptPrtGrpeType(); PrtGrpePrevType = Department.isDptPrtGrpePrevType(); } catch (Exception e) { } %> <script type="text/javascript" language="javascript"> function checkFields() { var f = document.forms[0]; if (f.DptPrtGrpeValBool.value == 'true') { if (f.DptPrtGrpe.value > 100) { window.alert('<fl:getMessage code="M60BD" alt="La pourcentage donné est superieur de 100."/>'); return false; } } if (f.DptPrtGrpePrevValBool.value == 'true') { if (f.DptPrtGrpePrev.value > 100) { window.alert('<fl:getMessage code="M60BD" alt="La pourcentage donné est superieur de 100."/>'); return false; } } if (f.DptObjCA.value == '') { f.DptObjCA.value = 0; } if (f.DptCAPrev.value == '') { f.DptCAPrev.value = 0; } if (f.DptBudgMktObj.value == '') { f.DptBudgMktObj.value = 0; } if (f.DptBudgMktPrev.value == '') { f.DptBudgMktPrev.value = 0; } if (f.DptPrtGrpe.value == '') { f.DptPrtGrpe.value = 0; } if (f.DptPrtGrpePrev.value == '') { f.DptPrtGrpePrev.value = 0; } return true; } function doSubmit() { //Here you can add your controls var f = document.forms[0]; f.DptPrtGrpeType.value = f.DptPrtGrpeValBool.value; f.DptPrtGrpePrevType.value = f.DptPrtGrpePrevValBool.value; if (checkFields() == false) { return; } return true; } </script> <fl:form action="/save_department.fl" bean="Department"> <input type="hidden" name="DptPrtGrpeType" value="false"> <input type="hidden" name="DptPrtGrpePrevType" value="false"> <fl:bigTabs objectTitle="<%= Utils.getMessage(session, \"L6435\", false, true,\"Département\") %>" ou="<%= \"/edit_department.fl\"+(id != null? \"?id=\" + id : \"\") %>"> <table class="container" cellpadding="0"> <tr> <td colspan="5"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="labelTitreFiche"> <fl:label field="DptTitle" labelClassName="titreFiche"/> </td> <td class="fieldTitreFiche"> <fl:input property="DptTitle" mandatoryMsgCode="M60BE"/> </td> </tr> </table> </td> </tr> <tr><td colspan="5" class="ligne_separation"/></tr> <tr> <td class="column3"> <table class="container" cellpadding="0"> <fl:fieldEdit property="DptCode" mandatoryMsgCode="M60BF" unicityMsgCode="M60CE"/> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column3"> <table class="container" cellpadding="0"> <fl:fieldEdit property="DptType"/> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column3"> <table class="container" cellpadding="0"> <fl:fieldEdit property="DptEnt"/> </table> </td> </tr> <tr class="ligne_separation"><td colspan="5"> </td></tr> </table> <table class="container" cellpadding="0"> <tr class="ligne_separation"><td></td></tr> <tr> <td class="titrePartie"><fl:getMessage code="F2024" alt="Notes"/></td> </tr> <tr> <td class="dataValue noPaddingLeft"><fl:input property="DptNotes" nodiv="false"/></td> </tr> <tr class="ligne_separation"><td></td></tr> <tr class="ligne_separation_couleur"><td></td></tr> <tr class="ligne_separation"><td></td></tr> </table> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <fl:smallTabs name="EnterpriseTabs"> <fl:sTab id="PROFIL" title="<%= Utils.getMessage(session, \"L2009\", \"Budget\") %>"> <table class="container" cellspacing="0" cellpadding="0"> <tr> <td class="headerDataGrid borderLineOne" style="width: 5%;"></td> <td class="headerDataGrid borderLineOne" style="width: 30%;"> <fl:getMessage code="L2011" alt="Chiffre d\'affaires"/> </td> <td class="headerDataGrid borderLineOne" style="width: 30%;"> <fl:getMessage code="L6341" alt="Budget marketing"/> </td> <td class="headerDataGrid borderLineOne" style="width: 30%;"> <fl:getMessage code="L6343" alt="Part groupe"/> </td> </tr> <tr class="tabSimpleFdBleu"> <td class="headerDataGrid borderLineOne" style="width: 5%; text-align: center; "> <%= currFiscalYear %></td> <td class="dataValueX borderLineTwo" style="width: 30%;"> <fl:input property="DptObjCA" htmlClass="number intable"/> </td> <td class="dataValueX borderLineTwo" style="width: 30%;"> <fl:input property="DptBudgMktObj" htmlClass="number intable"/> </td> <td class="dataValueX borderLineTwo" style="width: 30%;"> <table class="fieldTable" style="width:100%;" cellspacing="0" cellpadding="0"> <tr valign="top"> <td class="dataValue" style="width:85%"> <fl:input property="DptPrtGrpe" htmlClass="number intable"/> </td> <td class="dataValue" style="width:15%; text-align: right; padding-left: 3px;"> <select class="select" name="DptPrtGrpeValBool"> <option value="true" <%= PrtGrpeType ? "selected" : "" %>>% </option> <option value="false" <%= PrtGrpeType ? "" : "selected" %>>€ </option> </select> </td> </tr> </table> </td> </tr> <tr class="tabSimpleFdBlanc"> <td class="headerDataGrid borderLineOne" style="width: 5%; text-align: center; "> <%= prevFiscalYear %></td> <td class="dataValueX borderLineTwo" style="width: 30%;"> <fl:input property="DptCAPrev" htmlClass="number intable"/> </td> <td class="dataValueX borderLineTwo" style="width: 30%;"> <fl:input property="DptBudgMktPrev" htmlClass="number intable"/> </td> <td class="dataValueX borderLineTwo" style="width: 30%;"> <table class="fieldTable" cellspacing="0" cellpadding="0"> <tr> <td class="dataValue" style="width:85%"> <fl:input property="DptPrtGrpePrev" htmlClass="number intable"/> </td> <td class="dataValue" style="width:15%; text-align: right; padding-left: 3px;"> <select class="select" name="DptPrtGrpePrevValBool"> <option value="true" <%= PrtGrpePrevType ? "selected" : "" %>>% </option> <option value="false" <%= PrtGrpePrevType ? "" : "selected" %>>€ </option> </select> </td> </tr> </table> </td> </tr> </table> </fl:sTab> <% if (context.getAutoDisplayManager().hasEntry("Department", "Department 1")) { %> <fl:sTab id="Department 1" title="<%= context.getAutoDisplayManager().getTitle(session,\"Department\", \"Department 1\") %>"> <fl:autodisplay name="Department" zone="Department 1" edit="true"/> </fl:sTab> <% } %> <% if (context.getAutoDisplayManager().hasEntry("Department", "Department 2")) { %> <fl:sTab id="Department 1" title="<%= context.getAutoDisplayManager().getTitle(session,\"Department\", \"Department 2\") %>"> <fl:autodisplay name="Department" zone="Department 2" edit="true"/> </fl:sTab> <% } %> <% if (context.getAutoDisplayManager().hasEntry("Department", "Department 3")) { %> <fl:sTab id="Department 1" title="<%= context.getAutoDisplayManager().getTitle(session,\"Department\", \"Department 3\") %>"> <fl:autodisplay name="Department" zone="Department 3" edit="true"/> </fl:sTab> <% } %> </fl:smallTabs> </fl:bigTabs> </fl:form>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de