ilscipio/scipio-erp

View on GitHub
applications/product/widget/catalog/PromoForms.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is subject to the terms and conditions defined in the
files 'LICENSE' and 'NOTICE', which are part of this source
code package.
-->

<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd">
    <form name="ListProductPromos" type="list" title="" list-name="productPromos"
        paginate-target="FindProductPromo" odd-row-style="alternate-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <field name="productPromoId" widget-style="${styles.link_nav_info_id}">
            <hyperlink target="EditProductPromo" description="${productPromoId}" also-hidden="false">
                <parameter param-name="productPromoId"/>
            </hyperlink>
        </field>
        <field name="promoName"><display/></field>
        <field name="promoText" encode-output="false"><display/></field>
        <field name="requireCode"><display/></field>
        <field name="createdDate"><display/></field>
    </form>
    <form name="GoToProductPromoCode" method="get" type="single" target="EditProductPromoCode" title=""
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <field name="productPromoCodeId"><text/></field>
        <field name="submitAction" title="${uiLabelMap.CommonFind}" widget-style="${styles.link_nav} ${styles.action_update}"><submit button-type="button"/></field>
    </form>
    <form name="EditProductPromo" type="single" target="updateProductPromo" title="" default-map-name="productPromo"
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <alt-target use-when="productPromo==null" target="createProductPromo"/>
        <auto-fields-service service-name="updateProductPromo" map-name=""/>

        <field name="isCreate" use-when="productPromo==null"><hidden value="true"/></field><!-- SCIPIO: new -->

        <field name="promoName" required-field="true"><text/></field>

        <field use-when="productPromo!=null" name="productPromoId" title="${uiLabelMap.ProductPromotion}"><display/></field>
        <field use-when="productPromo==null&amp;&amp;productPromoId!=null" name="productPromoId" title="${uiLabelMap.ProductPromotion}" tooltip="${uiLabelMap.ProductCouldNotFindProductPromotion} [${productPromoId}]"><display/></field>
        <!-- this to be taken care of with auto-fields-service as soon as it uses entity field info too -->
        <field use-when="productPromo==null&amp;&amp;productPromoId==null" name="productPromoId" title="${uiLabelMap.ProductPromotion}"><ignored/></field>

        <field name="promoText" title="${uiLabelMap.ProductPromoText}"><textarea cols="70" rows="5"/></field>
        <field name="userEntered" title="${uiLabelMap.ProductPromoUserEntered}">
            <drop-down allow-empty="false" no-current-selected-key="Y"><option key="Y" description="${uiLabelMap.CommonY}"/><option key="N" description="${uiLabelMap.CommonN}"/></drop-down>
        </field>
        <field name="showToCustomer" title="${uiLabelMap.ProductPromoShowToCustomer}">
            <drop-down allow-empty="false" no-current-selected-key="Y"><option key="Y" description="${uiLabelMap.CommonY}"/><option key="N" description="${uiLabelMap.CommonN}"/></drop-down>
        </field>
        <field name="requireCode" title="${uiLabelMap.ProductPromotionReqCode}">
            <drop-down allow-empty="false" no-current-selected-key="N"><option key="N" description="${uiLabelMap.CommonN}"/><option key="Y" description="${uiLabelMap.CommonY}"/></drop-down>
        </field>
        <field name="overrideOrgPartyId"><lookup target-form-name="LookupPartyName"/></field>

        <field name="submitAction" title="${uiLabelMap.CommonUpdate}" widget-style="${styles.link_run_sys} ${styles.action_update}"><submit button-type="button"/></field>

        <!-- 
        <field use-when="productPromo!=null" name="lastUpdatedByText" title="${uiLabelMap.ProductLastModifiedBy}:">
            <display description="${productPromo.lastModifiedByUserLogin} ${uiLabelMap.CommonOn} ${productPromo.lastModifiedDate}" also-hidden="false"/>
        </field>
        <field use-when="productPromo!=null" name="createdByText" title="${uiLabelMap.ProductLastCreatedBy}:">
            <display description="${productPromo.createdByUserLogin} ${uiLabelMap.CommonOn} ${productPromo.createdDate}" also-hidden="false"/>
        </field>
         -->
    </form>
    <form name="EditProductPromoCode" type="single" target="updateProductPromoCode" title="" default-map-name="productPromoCode"
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <alt-target use-when="productPromoCode==null" target="createProductPromoCode"/>
        <auto-fields-service service-name="updateProductPromoCode" map-name=""/>

        <field name="isCreate" use-when="productPromoCode==null"><hidden value="true"/></field><!-- SCIPIO: new -->

        <field name="productPromoId">
            <drop-down>
                <entity-options entity-name="ProductPromo" description="[${productPromoId}] ${promoName}">
                    <entity-order-by field-name="productPromoId"/>
                </entity-options>
            </drop-down>
        </field>
        <field use-when="productPromoCode!=null" name="productPromoCodeId" tooltip=""><display/></field>
        <field use-when="productPromoCode==null&amp;&amp;productPromoCodeId!=null" name="productPromoCodeId" tooltip="${uiLabelMap.ProductCouldNotFindProductPromoCode} [${productPromoCodeId}]"><display/></field>
        <!-- this to be taken care of with auto-fields-service as soon as it uses entity field info too -->
        <field use-when="productPromoCode==null&amp;&amp;productPromoCodeId==null" name="productPromoCodeId" tooltip="${uiLabelMap.ProductPromoCodeBlank}"><text/></field>

        <field name="userEntered">
            <drop-down allow-empty="false" no-current-selected-key="Y"><option key="Y" description="${uiLabelMap.CommonY}"/><option key="N" description="${uiLabelMap.CommonN}"/></drop-down>
        </field>
        <field name="requireEmailOrParty">
            <drop-down allow-empty="false" no-current-selected-key="N"><option key="N" description="${uiLabelMap.CommonN}"/><option key="Y" description="${uiLabelMap.CommonY}"/></drop-down>
        </field>

        <field name="submitAction" title="${uiLabelMap.CommonUpdate}" widget-style="${styles.link_run_sys} ${styles.action_update}"><submit button-type="button"/></field>

        <field use-when="productPromoCode!=null" name="lastUpdatedByText" title="${uiLabelMap.ProductLastModifiedBy}:">
            <display description="[${productPromoCode.lastModifiedByUserLogin}] ${uiLabelMap.CommonOn} ${productPromoCode.lastModifiedDate}" also-hidden="false"/>
        </field>
        <field use-when="productPromoCode!=null" name="createdByText" title="${uiLabelMap.CommonCreatedBy}:">
            <display description="[${productPromoCode.createdByUserLogin}] ${uiLabelMap.CommonOn} ${productPromoCode.createdDate}" also-hidden="false"/>
        </field>
    </form>

    <form name="ListProductPromoCodes" type="list" list-name="productPromoCodes"
        odd-row-style="alternate-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <auto-fields-entity entity-name="ProductPromoCode" default-field-type="display"/>
        <field name="lastModifiedDate"><ignored/></field>
        <field name="fromDate"><ignored/></field>
        <field name="createdDate"><ignored/></field>
        <field name="lastModifiedByUserLogin"><ignored/></field>
        <field name="productPromoId"><hidden/></field>
        <field name="productPromoCodeId" widget-style="${styles.link_nav_info_id}">
            <hyperlink target="EditProductPromoCode" description="${productPromoCodeId}" also-hidden="false">
                <parameter param-name="productPromoCodeId"/>
            </hyperlink>
        </field>
        <field name="deleteAction" title=" " widget-style="${styles.link_run_sys} ${styles.action_remove}">
            <hyperlink target="deleteProductPromoCode" description="${uiLabelMap.CommonDelete}" also-hidden="false">
                <parameter param-name="productPromoCodeId"/>
                <parameter param-name="productPromoId"/>
            </hyperlink>
        </field>
        
    </form>
    
    <form name="EditProductPromoContentImage" type="upload" target="addImageContentForProductPromo" default-map-name="productPromoContent">
        <field name="productPromoId"><hidden/></field>
        <field use-when="productPromoContent != null" name="contentId"><display/></field>
        <field name="productPromoContentTypeId"><hidden value="ORIGINAL_IMAGE_URL"/></field>
        <field name="fromDate" use-when="productPromoContent == null" title="${uiLabelMap.CommonFrom}" required-field="true"><date-time/></field>
        <field name="fromDate" use-when="productPromoContent != null" title="${uiLabelMap.CommonFrom}"><display/></field>
        <field name="thruDate" title="${uiLabelMap.CommonThru}" position="2"><date-time/></field>
        <field name="uploadedFile" title="${uiLabelMap.ProductFile}" required-field="true"><file/></field>
        <field use-when="productPromoContent == null" name="submitAction" title="${uiLabelMap.CommonCreate}" widget-style="${styles.link_run_sys} ${styles.action_add}"><submit button-type="button"/></field>
        <field use-when="productPromoContent != null" name="submitAction" title="${uiLabelMap.CommonUpdate}" widget-style="${styles.link_run_sys} ${styles.action_update}"><submit button-type="button"/></field>
    </form>

    <form name="ListProductPromoContent" type="list" list-name="productPromoContents"
            odd-row-style="alternate-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <field name="editProductPromoContent" title="${uiLabelMap.ProductContent}" widget-style="${styles.link_nav_info_desc}">
            <hyperlink target="EditProductPromoContent" description="${description} [${contentId}]" also-hidden="false">
                <parameter param-name="productPromoId"/>
                <parameter param-name="contentId"/>
                <parameter param-name="productPromoContentTypeId"/>
                <parameter param-name="fromDate"/>
            </hyperlink>
        </field>
        <field name="productPromoContentTypeId" title="${uiLabelMap.ProductProductPromoContentType}">
            <display-entity entity-name="ProductContentType" key-field-name="productContentTypeId" also-hidden="false" description="${description}"/>
        </field>
        <field name="fromDate" title="${uiLabelMap.CommonFrom}"><display/></field>
        <field name="thruDate" title="${uiLabelMap.CommonThru}"><display/></field>
        <field name="editContentAction" title="${uiLabelMap.ProductEditContent}" widget-style="${styles.link_nav} ${styles.action_update}">
            <hyperlink target="/content/control/EditContent" target-type="inter-app" description="${contentId}" also-hidden="false">
                <parameter param-name="contentId"/>
            </hyperlink>
        </field>
        <field name="removeContentAction" title=" " widget-style="${styles.link_run_sys} ${styles.action_remove}">
            <hyperlink target="removeContentFromProductPromo" description="${uiLabelMap.CommonDelete}" also-hidden="false">
                <parameter param-name="productPromoId"/>
                <parameter param-name="contentId"/>
                <parameter param-name="productPromoContentTypeId"/>
                <parameter param-name="fromDate"/>
            </hyperlink>
        </field>
    </form>
</forms>