Skip to content

Commit

Permalink
Amend sunrise form data and remove type attribute from bttn
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellemaxwell committed Dec 9, 2024
1 parent b55e87b commit 2aa8bd7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
4 changes: 0 additions & 4 deletions pkg/web/static/js/sunrise.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
document.body.addEventListener('htmx:configRequest', (e) => {
if (e.detail.path === '/sunrise/message' && e.detail.verb === 'post') {
const params = e.detail.parameters;
console.log('params', params);

let data = {
email: params.email,
Expand All @@ -10,7 +9,6 @@ document.body.addEventListener('htmx:configRequest', (e) => {
identification: {},
},
beneficiary: {
identification: {},
},
transfer: {
amount: parseFloat(params.amount),
Expand All @@ -35,8 +33,6 @@ document.body.addEventListener('htmx:configRequest', (e) => {
};
};

console.log('data', data);

// Modify outgoing request data.
e.detail.parameters = data;
}
Expand Down
14 changes: 7 additions & 7 deletions pkg/web/templates/send_message.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{ template "base" . }}
{{ define "content" }}

<section class="mx-8 py-9">
<section id="sunrise" class="mx-8 py-9">
<div class="flex justify-around items-center my-4 md:m-8">
<a href="/transactions" class="btn btn-sm btn-circle btn-ghost text-xl">
<i class="fa-solid fa-arrow-left"></i>
Expand All @@ -15,26 +15,26 @@ <h1 class="mx-auto font-semibold text-2xl md:text-3xl text-center text-balance">
You will need a valid email address for your counterparty. If your counterparty is in the TRISA or TRP networks,
<a href="/send-envelope" class="underline text-blue-700">send a secure envelope</a> instead.
</p>
<form id="sunrise-msg-form" hx-post="/sunrise/message" hx-ext="json-enc" method="post">
<form id="sunrise-msg-form" hx-post="/sunrise/message" hx-target="#sunrise" hx-swap="outerHTML" hx-indicator="#loader" hx-ext="json-enc" method="post">

<section class="py-2 border-t border-t-black">
<div class="py-2 border-t border-t-black">
<div class="my-5">
<label for="vasp_name" class="label-style">Counterparty VASP Entity Name</label>
<input type="text" id="vasp_name" name="vasp_name" placeholder="Enter counterparty VASP name" class="input-style" />
<label for="counterparty" class="label-style">Counterparty VASP Entity Name</label>
<input type="text" id="counterparty" name="counterparty" placeholder="Enter counterparty VASP name" class="input-style" />
</div>
<div class="my-5">
<label for="email" class="label-style">Email Address</label>
<input type="text" id="email" name="email" placeholder="Enter counterparty VASP email address" class="input-style" />
</div>
</section>
</div>

{{ template "originator_information" . }}

{{ template "sunrise_beneficiary" . }}

{{ template "virtual_asset" . }}

<button type="button" id="preview-msg-bttn" class="mx-auto block btn bg-primary text-white font-semibold hover:bg-primary/90">Send Message</button>
<button id="preview-msg-bttn" class="mx-auto block btn bg-primary text-white font-semibold hover:bg-primary/90">Send Message</button>
</form>
</section>
</section>
Expand Down

0 comments on commit 2aa8bd7

Please sign in to comment.