Skip to content

Commit

Permalink
do not use hacky form element for form detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Kukks committed Feb 21, 2024
1 parent 103acb1 commit 1b151b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,6 @@
</div>
<form v-on:submit="onContributeFormSubmit" class="mb-0">
<input type="hidden" :value="perk.id" id="choiceKey" />
<input type="hidden" value="@Model.FormUrl" id="FormUrl" />
<img v-if="perk.image && perk.image != 'null'" class="card-img-top" :src="perk.image" />
<div class="card-body">
<div class="card-title d-flex justify-content-between" :class="{ 'mb-0': !perk.description }">
Expand Down
5 changes: 2 additions & 3 deletions BTCPayServer/wwwroot/crowdfund/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ document.addEventListener("DOMContentLoaded",function (ev) {
if (!this.active || this.loading){
return;
}

var formUrl = e.target["FormUrl"].value;
if (formUrl != '') {
const formUrl = this.$root.srvModel.formUrl;
if (formUrl) {
location.href = formUrl + "?amount=" + this.amount + "&choiceKey=" + this.perk.id;
return;
} else {
Expand Down

0 comments on commit 1b151b7

Please sign in to comment.