ilscipio/scipio-erp

View on GitHub
applications/party/widget/partymgr/PaymentMethodScreens.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.
-->

<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">

    <!-- SCIPIO: FIXME?: 2016-11-02: these don't have profile menu entries currently, so
        for now they just highlight profile -->

    <screen name="PaymentMethodDecorator">
        <section>
            <actions>
                <!-- FIXME: this overrides the ones set in the screens cause they dont have entries-->
                <set field="activeSubMenuItem" value="viewprofile"/>
                <script location="component://party/webapp/partymgr/WEB-INF/actions/HasPartyPermissions.groovy"/>
            </actions>
            <widgets>
                <!-- SCIPIO: NOTE: using CommonPartyDecorator causes the sub-menu to open -->
                <decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <section>
                            <condition>
                                <or>
                                    <if-true field="hasViewPermission" />
                                    <if-true field="hasPayInfoPermission" />
                                </or>
                            </condition>
                            <widgets>
                                <decorator-section-include name="body"/>
                            </widgets>
                            <fail-widgets>
                                <container>
                                    <label>${uiLabelMap.AccountingCardInfoNotBelongToYou}</label>
                                </container>
                                <container>
                                    <link target="authview/${donePage}" text="${uiLabelMap.CommonBack}" style="${styles.link_nav_cancel}"/>
                                </container>
                            </fail-widgets>
                        </section>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>

    <screen name="editcreditcard">
        <section>
            <actions>
                <set field="titleProperty" value="PageTitleEditCreditCard"/>
                <set field="activeSubMenuItem" value="editcreditcard"/>
                <set field="cardNumberMinDisplay" value="min"/>
                <set field="showToolTip" value="true"/>
                <script location="component://party/webapp/partymgr/WEB-INF/actions/HasPartyPermissions.groovy"/>
                <script location="component://party/webapp/partymgr/WEB-INF/actions/party/EditPaymentMethod.groovy"/>
            </actions>
            <widgets>
                <decorator-screen name="PaymentMethodDecorator">
                    <decorator-section name="body">
                        <platform-specific>
                            <html><html-template location="component://party/webapp/partymgr/party/editcreditcard.ftl"/></html>
                        </platform-specific>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>
    <screen name="editgiftcard">
        <section>
            <actions>
                
                <set field="activeSubMenuItem" value="editgiftcard"/>
                <script location="component://party/webapp/partymgr/WEB-INF/actions/HasPartyPermissions.groovy"/>
                <script location="component://party/webapp/partymgr/WEB-INF/actions/party/EditPaymentMethod.groovy"/>
                <set field="titleProperty" value="${groovy:context.giftCard ? 'PageTitleEditGiftCard' : 'AccountingCreateNewGiftCard'}"/><!-- SCIPIO: New gift card title -->
            </actions>
            <widgets>
                <decorator-screen name="PaymentMethodDecorator">
                    <decorator-section name="body">
                        <platform-specific>
                            <html><html-template location="component://party/webapp/partymgr/party/editgiftcard.ftl"/></html>
                        </platform-specific>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>
    <screen name="editeftaccount">
        <section>
            <actions>
                <set field="titleProperty" value="PageTitleEditEftAccount"/>
                <set field="activeSubMenuItem" value="editeftaccount"/>

                <script location="component://party/webapp/partymgr/WEB-INF/actions/HasPartyPermissions.groovy"/>
                <script location="component://party/webapp/partymgr/WEB-INF/actions/party/EditPaymentMethod.groovy"/>
            </actions>
            <widgets>
                <decorator-screen name="PaymentMethodDecorator">
                    <decorator-section name="body">
                        <platform-specific>
                            <html><html-template location="component://party/webapp/partymgr/party/editeftaccount.ftl"/></html>
                        </platform-specific>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>

    <!-- SCIPIO: Remove
    <screen name="editavsoverride">
        <section>
            <actions>
                <set field="titleProperty" value="PageTitleEditAvsOverride"/>
                <set field="activeSubMenuItem" value="find"/>

                <set field="partyId" from-field="parameters.partyId"/>
                <set field="donePage" from-field="parameters.DONE_PAGE" default-value="viewprofile"/>
                <entity-one entity-name="PartyIcsAvsOverride" value-field="avsOverride"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonPartyAppDecorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <section>
                            <condition>
                                <if-service-permission service-name="partyBasePermissionCheck" main-action="VIEW"/>
                            </condition>
                            <widgets>
                                <screenlet>
                                    <include-form name="EditAvsOverride" location="component://party/widget/partymgr/PaymentMethodForms.xml"/>
                                </screenlet>
                            </widgets>
                            <fail-widgets>
                                <label style="common-msg-error-perm">${uiLabelMap.PartyMgrViewPermissionError}</label>
                            </fail-widgets>
                        </section>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>
     -->
    
    <screen name="EditBillingAccount">
        <section>
            <actions>
                <set field="titleProperty" value="PageTitleEditBillingAccount"/>
                <set field="activeSubMenuItem" value="EditBillingAccount"/>
                <property-to-field field="defaultCurrencyUomId" resource="general" property="currency.uom.id.default" default="USD"/>
                <set field="billingAccountId" from-field="parameters.billingAccountId"/>
                <entity-one entity-name="BillingAccount" value-field="billingAccount"/>
                <set field="partyId" from-field="parameters.partyId"/>
                <set field="roleTypeId" from-field="parameters.roleTypeId"/>
            </actions>
            <widgets>
                <decorator-screen name="PaymentMethodDecorator">
                    <decorator-section name="body">
                        <screenlet>
                            <include-form name="EditBillingAccount" location="component://party/widget/partymgr/PaymentMethodForms.xml"/>
                        </screenlet>
                    </decorator-section>
                </decorator-screen>
            </widgets>
         </section>
    </screen>
</screens>