Search in sources :

Example 6 with ExtraButton

use of org.kuali.kfs.kns.web.ui.ExtraButton in project cu-kfs by CU-CommunityApps.

the class CuPaymentRequestForm method getExtraButtons.

@Override
public List<ExtraButton> getExtraButtons() {
    super.getExtraButtons();
    PaymentRequestDocument paymentRequestDocument = this.getPaymentRequestDocument();
    if (StringUtils.equalsIgnoreCase(paymentRequestDocument.getFinancialSystemDocumentHeader().getApplicationDocumentStatus(), PaymentRequestStatuses.APPDOC_DEPARTMENT_APPROVED) && paymentRequestDocument.getFinancialSystemDocumentHeader().getWorkflowDocument().isFinal() && !SpringContext.getBean(CUPaymentMethodGeneralLedgerPendingEntryService.class).isPaymentMethodProcessedUsingPdp(((CuPaymentRequestDocument) paymentRequestDocument).getPaymentMethodCode())) {
        ExtraButton cancelButton = null;
        for (ExtraButton extraButton : extraButtons) {
            if (StringUtils.equals("methodToCall.cancel", extraButton.getExtraButtonProperty())) {
                cancelButton = extraButton;
            }
        }
        if (ObjectUtils.isNotNull(cancelButton)) {
            extraButtons.remove(cancelButton);
        }
    }
    return extraButtons;
}
Also used : CUPaymentMethodGeneralLedgerPendingEntryService(edu.cornell.kfs.fp.service.CUPaymentMethodGeneralLedgerPendingEntryService) PaymentRequestDocument(org.kuali.kfs.module.purap.document.PaymentRequestDocument) CuPaymentRequestDocument(edu.cornell.kfs.module.purap.document.CuPaymentRequestDocument) ExtraButton(org.kuali.kfs.kns.web.ui.ExtraButton)

Example 7 with ExtraButton

use of org.kuali.kfs.kns.web.ui.ExtraButton in project cu-kfs by CU-CommunityApps.

the class CuPurchaseOrderForm method createButtonsMap.

// ==== End CU Customization ====
@Override
protected Map<String, ExtraButton> createButtonsMap() {
    Map<String, ExtraButton> result = super.createButtonsMap();
    // ==== CU Customization (KFSPTS-1457) ====
    // Reopen PO button
    ExtraButton openCxerButton = new ExtraButton();
    openCxerButton.setExtraButtonProperty("methodToCall.openPoCxer");
    openCxerButton.setExtraButtonSource("${" + KFSConstants.EXTERNALIZABLE_IMAGES_URL_KEY + "}buttonsmall_openorder.gif");
    openCxerButton.setExtraButtonAltText("Open PO");
    // Void PO button
    ExtraButton voidCxerButton = new ExtraButton();
    voidCxerButton.setExtraButtonProperty("methodToCall.voidPoCxer");
    voidCxerButton.setExtraButtonSource("${" + KFSConstants.EXTERNALIZABLE_IMAGES_URL_KEY + "}buttonsmall_voidorder.gif");
    voidCxerButton.setExtraButtonAltText("Void PO");
    result.put(openCxerButton.getExtraButtonProperty(), openCxerButton);
    result.put(voidCxerButton.getExtraButtonProperty(), voidCxerButton);
    return result;
}
Also used : ExtraButton(org.kuali.kfs.kns.web.ui.ExtraButton)

Example 8 with ExtraButton

use of org.kuali.kfs.kns.web.ui.ExtraButton in project cu-kfs by CU-CommunityApps.

the class CuVendorCreditMemoForm method getExtraButtons.

@Override
public List<ExtraButton> getExtraButtons() {
    List<ExtraButton> extraButtons = super.getExtraButtons();
    VendorCreditMemoDocument cmDocument = (VendorCreditMemoDocument) getDocument();
    String appExternalImageURL = SpringContext.getBean(ConfigurationService.class).getPropertyValueAsString(KFSConstants.EXTERNALIZABLE_IMAGES_URL_KEY);
    if (!getEditingMode().containsKey(CreditMemoEditMode.DISPLAY_INIT_TAB)) {
        if (!(SpringContext.getBean(PurapService.class).isFullDocumentEntryCompleted(cmDocument) == false && documentActions.containsKey(KRADConstants.KUALI_ACTION_CAN_EDIT))) {
            if (getEditingMode().containsKey(CUPaymentRequestEditMode.WAIVE_WIRE_FEE_EDITABLE)) {
                addExtraButton("methodToCall.calculate", appExternalImageURL + "buttonsmall_calculate.gif", "Calculate");
            }
        }
    }
    return extraButtons;
}
Also used : VendorCreditMemoDocument(org.kuali.kfs.module.purap.document.VendorCreditMemoDocument) PurapService(org.kuali.kfs.module.purap.document.service.PurapService) ConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService) ExtraButton(org.kuali.kfs.kns.web.ui.ExtraButton)

Example 9 with ExtraButton

use of org.kuali.kfs.kns.web.ui.ExtraButton in project cu-kfs by CU-CommunityApps.

the class IWantDocumentForm method createContinueToVendorButton.

/**
 * Creates the continue button on the items page that points to the vendor page
 *
 * @return
 */
protected ExtraButton createContinueToVendorButton() {
    ExtraButton clearButton = new ExtraButton();
    clearButton.setExtraButtonProperty("methodToCall.continueToVendor");
    clearButton.setExtraButtonSource("${" + KFSConstants.RICE_EXTERNALIZABLE_IMAGES_URL_KEY + "}buttonsmall_continue.gif");
    clearButton.setExtraButtonAltText("Continue");
    return clearButton;
}
Also used : ExtraButton(org.kuali.kfs.kns.web.ui.ExtraButton)

Example 10 with ExtraButton

use of org.kuali.kfs.kns.web.ui.ExtraButton in project cu-kfs by CU-CommunityApps.

the class IWantDocumentForm method createCreateDVButton.

protected ExtraButton createCreateDVButton() {
    ExtraButton clearButton = new ExtraButton();
    clearButton.setExtraButtonProperty("methodToCall.createDV");
    clearButton.setExtraButtonSource("${" + KFSConstants.EXTERNALIZABLE_IMAGES_URL_KEY + "}buttonsmall_create_DV.gif");
    clearButton.setExtraButtonAltText("Create DV");
    clearButton.setExtraButtonOnclick("window.open('" + ConfigContext.getCurrentContextConfig().getProperty(KRADConstants.APPLICATION_URL_KEY) + "/financialDisbursementVoucher.do?methodToCall=createDVFromIWantDoc&docId=" + getDocument().getDocumentNumber() + "');return false;");
    clearButton.setExtraButtonParams("_blank");
    return clearButton;
}
Also used : ExtraButton(org.kuali.kfs.kns.web.ui.ExtraButton)

Aggregations

ExtraButton (org.kuali.kfs.kns.web.ui.ExtraButton)12 CUPaymentMethodGeneralLedgerPendingEntryService (edu.cornell.kfs.fp.service.CUPaymentMethodGeneralLedgerPendingEntryService)1 CuPaymentRequestDocument (edu.cornell.kfs.module.purap.document.CuPaymentRequestDocument)1 PaymentRequestDocument (org.kuali.kfs.module.purap.document.PaymentRequestDocument)1 VendorCreditMemoDocument (org.kuali.kfs.module.purap.document.VendorCreditMemoDocument)1 PurapService (org.kuali.kfs.module.purap.document.service.PurapService)1 ConfigurationService (org.kuali.rice.core.api.config.property.ConfigurationService)1