Skip to content
Snippets Groups Projects
Commit 0420cd08 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

do not allow to create receipt if there is already one

parent aab57c2d
Branches
No related tags found
No related merge requests found
Pipeline #7350 passed
......@@ -123,7 +123,8 @@ button {
border-color: fade(darken(@color-secondary, 5%), 70%);
color: fade(white, 90%);
}
&.disabled {
&.disabled,
&[disabled] {
background-color: fade(@color-secondary, 30%);
border-color: fade(darken(@color-secondary, 5%), 30%);
color: @font-color-on-white;
......
......@@ -113,7 +113,7 @@ router.post("/payments/receipt",
url.searchParams.append("name", reqData.name)
}
if (!data_complete) {
if (!data_complete || reqData.order.isReceiptCreated()) {
res.redirect(url.toString());
return;
}
......
......@@ -55,7 +55,7 @@
<label for="address"><%= req.t("receipt.address.label", {ns: "admin"}) _%></label>
<textarea name="address" id="address" cols="30" rows="3" placeholder="Mustergasse 3&#10;30159 Musterstadt&#10;Deutschland"><%= typeof address === "undefined" ? "" : address _%></textarea>
</div>
<button class="button"><%= req.t("receipt.submit-userdata", {ns: "admin"}) _%></button>
<button class="button" <%_ if(order.isReceiptCreated()) { _%>disabled<%_ }_%>><%= req.t("receipt.submit-userdata", {ns: "admin"}) _%></button>
</form>
<%_ } _%>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment