mirror of
https://github.com/aljazceru/BTCPayServerPlugins.git
synced 2025-12-17 15:44:26 +01:00
initial commit
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
Vue.component("AOPP", {
|
||||
props: ["srvModel"],
|
||||
methods: {
|
||||
onaoppChange: function(){
|
||||
this.aoppAddressInputDirty = true;
|
||||
this.aoppAddressInputInvalid = false;
|
||||
},
|
||||
onSubmit : function(){
|
||||
var self = this;
|
||||
if (this.aoppAddressInput && this.aoppAddressInput.startsWith("aopp:?")) {
|
||||
this.aoppAddressFormSubmitting = true;
|
||||
// Push the email to a server, once the reception is confirmed move on
|
||||
$.ajax({
|
||||
url: "/plugins/"+this.srvModel.storeId+"/AOPP/" +this.srvModel.invoiceId,
|
||||
type: "POST",
|
||||
data: JSON.stringify({ aopp: this.aoppAddressInput }),
|
||||
contentType: "application/json; charset=utf-8"
|
||||
})
|
||||
.done(function () {
|
||||
}).always(function () {
|
||||
self.aoppAddressFormSubmitting = false;
|
||||
});
|
||||
} else {
|
||||
this.aoppAddressInputInvalid = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
data: function () {
|
||||
return {
|
||||
aoppAddressInput: "",
|
||||
aoppAddressInputDirty: false,
|
||||
aoppAddressInputInvalid: false,
|
||||
aoppAddressFormSubmitting: false
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user