diff --git a/src/main/resources/static/js/registerbusiness.js b/src/main/resources/static/js/registerbusiness.js index e551c7f1a232086ff34b9067b732d17891a7b67e..985522e31d1995d8b092995594e5e850f859549c 100644 --- a/src/main/resources/static/js/registerbusiness.js +++ b/src/main/resources/static/js/registerbusiness.js @@ -1,6 +1,15 @@ var modalStage = 0 var urlInput, urlPrefixInput, nameInput, descInput, tagsInput, amountInput = null; +function keyPress(e) { + if(e.key == "Enter"){ + e.preventDefault() + progress() + }if(e.key == "Tab"){ + e.preventDefault() + } +} + function htmlDecode(input) { var doc = new DOMParser().parseFromString(input, "text/html"); return doc.documentElement.textContent; diff --git a/src/main/resources/templates/allUserShops.html b/src/main/resources/templates/allUserShops.html index 1599d6292ec0814e922229e3dfe3ab0f20f58073..4aa3e36090eb859ad63586853618673af77eb3f2 100644 --- a/src/main/resources/templates/allUserShops.html +++ b/src/main/resources/templates/allUserShops.html @@ -49,6 +49,8 @@ total_reward_amount=${shop.getStampBoard.getRewards.size}, img_path=${shop.shopImage}, shopId=${shop.shopId}"></div> + <h1 class="subtitle is-5" th:if="${favouriteShops.size == 0 && activeShops.size == 0}"> Looks like you don't have any stamps yet, favourite a shop or make a purchase to start collecting!</h1> + </div> diff --git a/src/main/resources/templates/registerbusiness.html b/src/main/resources/templates/registerbusiness.html index 7e1d3c06368645cc557801a2432f988412160d14..a0fc4e7454d35e3841714591a5768468c50c8af9 100644 --- a/src/main/resources/templates/registerbusiness.html +++ b/src/main/resources/templates/registerbusiness.html @@ -28,7 +28,7 @@ <div id="progressBar" class="progressBar"> <div style="width:20%"></div> </div> - <form name="businessForm" id="businessForm" action="/businessRegister" th:method="post" onsubmit="return false"> + <form onkeydown="keyPress(event)" name="businessForm" id="businessForm" action="/businessRegister" th:method="post" onsubmit="return false"> <section class="modal-card-body url-centering" id="modal_container"> <div id="modal_page1" class="modal_page"> <h5 class="title is-5" style="text-align:center">Enter your shop URL</h5>