Edit C:\Windows\install\galaxie_p01_01-10\marketing\product\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.DataDictionary" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean class="com.edeal.frontline.ProductBean" id="Product" scope="request"/> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/common_css.jsp"> <% 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 = Product.getID(); } catch (FieldNotInitializedException fnie) { } boolean isGroup = false; try { String prdType = Product.getPrdTypID(); isGroup = prdType != null && prdType.equals(dico.getRefIdByCode("PrdTypID","GROUPE")); } catch (FieldNotInitializedException fnie) { } boolean toCalculate = false; try { String prdTpr = Product.getPrdTprID(); toCalculate = isGroup && prdTpr != null && prdTpr.equals(dico.getRefIdByCode("PrdTprID","CAL")); } catch (FieldNotInitializedException fnie) { } boolean isGesStocks = false; try { isGesStocks = (Boolean)Product.getCustomProperty("PrdGestionStocks_"); } catch (FieldNotInitializedException fnie) { } String productFamilyID = null; String productFamilyVal = ""; try { productFamilyID = (String)Product.getCustomProperty("PrdFamilleProduit_"); productFamilyVal = dico.getRefCode("PrdFamilleProduit_", productFamilyID); } catch (FieldNotInitializedException fnie) { } %> <script type="text/javascript" language="javascript"> function doSubmit() { var f = window.document.forms[0]; if (f.PrdPrice && f.PrdPrice.value == "") { f.PrdPrice.value = 0; } if(f.PrdGestionStocks_){ if(f.PrdGestionStocks_.checked) { if(f.PrdRespProduit_.value == '') { window.alert('<fl:getMessage code="MF03F" alt="Le responsable produit est obligatoire si la gestion des stocks est activée" js="true"/>'); f.PrdRespProduit_.focus(); return; } if(f.PrdStockMinimum_.value == '') { f.PrdStockMinimum_.value=0; } } } //presentFieldsValue(); return true; } function doRefresh() { var f = window.document.forms[0]; presentFieldsValue(); f.action = "<fl:link url="/refresh_product.fl"/>"; doExitConf = false; f.submit(); } function hideandshow() { var f = window.document.forms[0]; var gestionstocks = f.PrdGestionStocks_; var visibility = "hidden"; $("#lblPrdRespProduit_").css( "background-color","rgb(255, 255, 255)" ); if(gestionstocks.checked){ visibility = "visible"; $("#lblPrdRespProduit_").css( "background-color","rgb(253, 203, 204)" ); } document.getElementById("stock_min").style.visibility = visibility; } function doOnLoad() { $("#lblPrdRespProduit_").css( "background-color","rgb(255, 255, 255)" ); <% if(isGesStocks) { %> document.getElementById("stock_min").style.visibility = "visible"; $("#lblPrdRespProduit_").css( "background-color","rgb(253, 203, 204)" ); <% } %> } </script> <fl:form action="/save_product.fl" bean="Product"> <fl:bigTabs objectTitle="<%= Utils.getMessage(session, \"F203E\", false, true, \"Produit\") %>" ou="<%= \"/edit_product.fl\" + (id != null ? \"?id=\" + id : \"\")%>"> <% if(null == id) { %> <input name="PrdStockActuel_" value="0" type="hidden" > <% } %> <table class="container" cellpadding="0"> <tr> <td colspan="5" class="width: 100%; margin: 0px; padding: 0px;"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td><fl:label field="PrdName" labelClassName="labelTitreFiche" code="F203F"/></td> <td class="fieldTitreFiche"><fl:input property="PrdName" mandatoryMsgCode="M201F"/></td> </tr> </table> </td> </tr> <tr class="ligne_separation"><td></td></tr> <tr> <td class="column2"> <table class="data_column" cellpadding="0"> <fl:fieldEdit property="PrdCode" mandatoryMsgCode="L6144" unicityMsgCode="M60CE"/> <fl:fieldEdit property="PrdFamilleProduit_" alt="" mandatoryMsgCode="MF032" onchange="javascript:doRefresh();"/> <tr class="fieldline"> <td id="PhVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;"> </span></td> </tr> <fl:fieldEdit property="PrdDistributeur_" alt="" mandatoryMsgCode="MF030"/> <fl:fieldEdit property="PrdFournisseur_" /> <tr class="fieldline"> <td id="PhVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;"> </span></td> </tr> <% if(!(productFamilyVal.startsWith("COT"))){ %> <fl:fieldEdit property="PrdGestionStocks_" onclick="javascript:hideandshow();"/> <tr id="stock_min" class="fieldline" style="visibility: hidden;"> <td class="dataLabel"> <fl:label field="PrdStockMinimum_"/> </td> <td class="dataValue"> <fl:input property="PrdStockMinimum_" /> </td> </tr> <% }else{ %> <fl:fieldEdit property="PrdMaxQt_" mandatoryMsgCode="MF08B" alt=""/> <% } %> <tr class="fieldline"> <td id="PhVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;"> </span></td> </tr> <tr class="fieldline"> <td id="PhVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;"><fl:getMessage code="LF090" alt="Commercialisation"/></span></td> </tr> <fl:fieldEdit property="PrdStatut_" alt="" mandatoryMsgCode="MF023"/> <fl:fieldEdit property="PrdPrice" postText=" €" format="money" mandatoryMsgCode="MF033"/> <fl:fieldEdit property="PrdTVADefaut_" alt="" mandatoryMsgCode="MF034" /> <fl:fieldEdit property="PrdTaxeParafiscale_" alt=""/> <tr class="fieldline"> <td id="PhVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;"> </span></td> </tr> <fl:fieldEdit property="PrdType_" alt="" mandatoryMsgCode="MF031"/> <fl:fieldEdit property="PrdPubSince" mandatoryMsgCode="MF0BA"/> <fl:fieldEdit property="PrdPubTo"/> <fl:fieldEdit property="PrdCodeComptable_" mandatoryMsgCode="MF035"/> <fl:fieldEdit property="PrdCodeAnalytique_" mandatoryMsgCode="MF036"/> <fl:fieldEdit property="PrdCompteFrance_" mandatoryMsgCode="MF037"/> <fl:fieldEdit property="PrdCompteExport_" mandatoryMsgCode="MF038"/> <fl:fieldEdit property="PrdCompteINTRACOM_" mandatoryMsgCode="MF039"/> <%-- <fl:fieldEdit property="PrdActID"/> <fl:fieldEdit property="PrdFamilyID"/> <fl:fieldEdit property="PrdTypID" type="buttons" separator="<br>" onclick="doRefresh();"/> <% if (isGroup) { %> <fl:fieldEdit property="PrdTprID" type="buttons" separator="<br>" onclick="doRefresh();"/> <% } %> <% if (toCalculate) { %> <fl:fieldEdit readOnly="true" format="#,##0.##" property="PrdPrice" postText=" €"/> <% } else { %> <fl:fieldEdit property="PrdPrice" format="#,##0.##" postText=" €"/> <% } %> <fl:fieldEdit property="PrdRopID" alt=" "/> <fl:fieldEdit property="PrdTvaID" postText="%"/> <fl:fieldEdit property="PrdQualification"/> --%> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="data_column" cellpadding="0"> <tr class="fieldline"> <td id="PrdPicID_label" class="dataLabel"> <fl:label code="F600A"/> </td> <td id="PrdPicID_value" class="dataValue"> <fl:attach name="Product" colID="PrdPicID" htmlClass="fob" edit="true" allowedExtensions="'jpg', 'jpeg', 'png', 'gif'"/> </td> </tr> <tr class="fieldline"> <td id="PhVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;"> </span></td> </tr> <tr class="fieldline"> <td id="PhVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;"> </span></td> </tr> <tr class="fieldline"> <td id="PhVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;"> </span></td> </tr> <fl:fieldEdit property="PrdRespProduit_" /> <tr class="fieldline"> <td id="PhVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;"> </span></td> </tr> <fl:fieldEdit property="PrdID_partenaire_"/> <fl:fieldEdit property="PrdTypologieProduit_" alt=""/> <fl:fieldEdit property="PrdMillesime_" alt=""/> <fl:fieldEdit property="PrdCtrID_" alt=""/> <%-- <tr class="fieldline"> <td id="PrdPdfID_label" class="dataLabel"> <fl:label code="F60C0"/> </td> <td id="PrdPdfID_value" class="dataValue"> <fl:attach name="Product" colID="PrdPdfID" htmlClass="fob" allowedExtensions="'pdf'" edit="true"/> </td> </tr> <fl:fieldEdit property="PrdStock"/> <fl:fieldEdit property="PrdPkgID"/> <fl:fieldEdit property="PrdCptID"/> --%> </table> </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="ProductTabs"> <%-- <fl:sTab id="PRODUCT1" title="<%= context.getAutoDisplayManager().getTitle(session, \"Product\", \"Produit 1\") %>" visible="<%= context.getAutoDisplayManager().hasEntry(\"Product\", \"Produit 1\") %>"> <fl:autodisplay name="Product" zone="Produit 1" edit="true"/> </fl:sTab> <fl:sTab id="PRODUCT2" title="<%= context.getAutoDisplayManager().getTitle(session, \"Product\", \"Produit 2\") %>" visible="<%= context.getAutoDisplayManager().hasEntry(\"Product\", \"Produit 2\") %>"> <fl:autodisplay name="Product" zone="Produit 2" edit="true"/> </fl:sTab> <fl:sTab id="PRODUCT3" title="<%= context.getAutoDisplayManager().getTitle(session, \"Product\", \"Produit 3\") %>" visible="<%= context.getAutoDisplayManager().hasEntry(\"Product\", \"Produit 3\") %>"> <fl:autodisplay name="Product" zone="Produit 3" edit="true"/> </fl:sTab> --%> <fl:sTab id="DescCol" title="<%= Utils.getMessage(session, \"FF11C\", \"Descriptif\") %>"> <fl:input property="PrdProdCard" rows="6" wrap="soft" width="100%"/> </fl:sTab> <fl:sTab id="infosComp" title="<%= Utils.getMessage(session, \"FF11D\", \"Informations complémentaires\") %>"> <fl:input property="PrdInfosComplementaires_" rows="6" wrap="soft" width="100%"/> </fl:sTab> <fl:sTab id="PtFort" title="<%= Utils.getMessage(session, \"FF120\", \"Forces\") %>"> <fl:input property="PrdStrength" rows="6" wrap="soft" width="100%"/> </fl:sTab> <fl:sTab id="PtFaible" title="<%= Utils.getMessage(session, \"FF121\", \"Faiblesses\") %>"> <fl:input property="PrdWeakness" rows="6" wrap="soft" width="100%"/> </fl:sTab> <fl:sTab id="PrdAttach" title="<%=Utils.getMessage(session, \"L201C\", \"Documents joints\")%>"> <fl:attach name="Product" colID="PrdAttID" /> </fl:sTab> </fl:smallTabs> </fl:bigTabs> </fl:form>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de