Skip to content

Commit

Permalink
Add back buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
obasekietinosa committed Dec 5, 2020
1 parent b6a064d commit b5e71b9
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
margin-bottom: 5px;
}

input[type="text"], input[type="email"] {
input[type="text"], input[type="email"], input[type="url"] {
padding: 7px 15px;
border-radius: 5px;
background: transparent;
Expand Down Expand Up @@ -113,7 +113,7 @@ <h1>Tools for your Paystack Storefront</h1>
<section id="store-url-section">
<h1>Enter your Paystack Storefront URL</h1>
<form action="" id="submit-store-url">
<input type="text" name="storeUrl" id="storeURL" placeholder="https://paystack.shop/your-store-name" required />
<input type="text" name="storeUrl" id="storeURL" pattern="(https:\/\/)?(paystack.shop\/)([^\/\s]+)(.*)" placeholder="https://paystack.shop/your-store-name" required />
<button type="submit" class="btn-primary">Set up custom domain</button>
</form>
</section>
Expand All @@ -123,7 +123,7 @@ <h1>Enter your Paystack Storefront URL</h1>
<section id="custom-domain-section">
<h1>Enter your custom domain</h1>
<form action="" id="submit-custom-domain">
<input type="text" name="customDomain" id="customDomain" placeholder="https://your-store-name" required />
<input type="url" name="customDomain" id="customDomain" placeholder="https://your-store-name" required />
<button type="submit" class="btn-primary">Set up custom domain</button>
<button id="backToStoreURL" class="btn-primary">Go back</button>
</form>
Expand Down Expand Up @@ -219,5 +219,15 @@ <h1>Please wait while we set things up...</h1>

provisionStorefront();
});

$("#backToStoreURL").addEventListener("click", (event) => {
event.preventDefault();
navigateTo(ROUTES.STORE_URL);
})

$("#backToCustomDomain").addEventListener("click", (event) => {
event.preventDefault();
navigateTo(ROUTES.STORE_URL);
})
</script>
</html>

0 comments on commit b5e71b9

Please sign in to comment.