Commit c8a59dcf authored by MOREAU Ulysse's avatar MOREAU Ulysse
Browse files

Fix edit before payment

parent 4969c84a
...@@ -45,7 +45,8 @@ window.addEventListener("load", function (e) { ...@@ -45,7 +45,8 @@ window.addEventListener("load", function (e) {
initChangeDetection(document.orderedit); initChangeDetection(document.orderedit);
var edit_button = document.getElementById("edit_button"), var edit_button = document.getElementById("edit_button"),
payment_button = document.getElementById("payment_button"); payment_button = document.getElementById("payment_button"),
payment_href = payment_button.getAttribute("href");
function checkChanges(e){ function checkChanges(e){
...@@ -53,11 +54,13 @@ window.addEventListener("load", function (e) { ...@@ -53,11 +54,13 @@ window.addEventListener("load", function (e) {
{ {
edit_button.style.display="block"; edit_button.style.display="block";
payment_button.classList.toggle("disabled", true); payment_button.classList.toggle("disabled", true);
payment_button.setAttribute("href", "#");
} }
else else
{ {
edit_button.style.display="none"; edit_button.style.display="none";
payment_button.classList.toggle("disabled", false); payment_button.classList.toggle("disabled", false);
payment_button.setAttribute("href", payment_href);
} }
} }
......
This diff is collapsed.
This diff is collapsed.
...@@ -5,6 +5,7 @@ $nav-bg: #EEE ...@@ -5,6 +5,7 @@ $nav-bg: #EEE
$nav-fg: black $nav-fg: black
$blue: #6BD $blue: #6BD
$orange: #df8a11 $orange: #df8a11
$disabledorange: #c7b293
$yellow: #FCCD76 $yellow: #FCCD76
$red: #e55 $red: #e55
$light-red: #e99 $light-red: #e99
...@@ -66,6 +67,10 @@ nav > ul ...@@ -66,6 +67,10 @@ nav > ul
body body
flex-flow: column flex-flow: column
.disabled
cursor: not-allowed !important
background-color: $disabledorange !important
@import "forms" @import "forms"
@import "tables" @import "tables"
@import "classes" @import "classes"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment