issue #23982: don't allow credit card activity if sales order is unpersisted
authorSteve Hackbarth <stephenhackbarth@gmail.com>
Wed, 25 Jun 2014 20:14:40 +0000 (16:14 -0400)
committerSteve Hackbarth <stephenhackbarth@gmail.com>
Wed, 25 Jun 2014 20:14:40 +0000 (16:14 -0400)
enyo-client/application/source/views/list_relations_box.js

index afddf54..afaf261 100644 (file)
@@ -227,7 +227,13 @@ trailing:true, white:true*/
         creditCard = list.getModel(list.getFirstSelected()),
         ccv = this.$.ccv.value,
         amount = this.$.creditCardAmount.value,
-        disable = !creditCard || !amount || (!ccv && !!XT.session.settings.get("CCRequireCCV"));
+        disable = !creditCard ||
+          !amount ||
+          (!ccv && !!XT.session.settings.get("CCRequireCCV")) ||
+          // XXX refactor after attributesChanged refactor
+          // this kind should hold onto a reference to the model
+          // that backs the workspace
+          this.parent.parent.value.isNew();
 
       this.$.processButton.setDisabled(disable);
       this.$.authorizeButton.setDisabled(disable);