Skip to content

Commit

Permalink
Move form to partial
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellemaxwell committed Nov 1, 2024
1 parent 79424da commit 5acd645
Show file tree
Hide file tree
Showing 2 changed files with 130 additions and 129 deletions.
128 changes: 128 additions & 0 deletions pkg/web/templates/partials/sunrise/message_accept.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
<div class="grid md:grid-cols-2 py-2 border-t border-t-black">
<section>
<h2 class="my-4 font-bold">TRANSACTION DETAILS</h2>
<!-- TODO: Range transaction details and display in the data list -->
<dl>
<div class="grid grid-cols-2">
<dt class="font-semibold">Amount</dt>
<dd>1.045</dd>
</div>
</dl>
</section>
<section>
<h2 class="my-4 font-bold">ORIGINATOR DETAILS</h2>
<!-- TODO: Range originator details and display in the data list -->
<dl>
<div class="grid grid-cols-2">
<dt class="font-semibold">First Name</dt>
<dd>James</dd>
</div>
</dl>
</section>
</div>

<section>
<form>
<div class="mt-4"></div>
<section class="py-2 border-t border-t-black">
<h2 class="my-4 font-bold">BENEFICIARY DETAILS</h2>
<div class="my-5">
<label for="benf_crypto_address" class="label-style">Crypto Address</label>
<input type="text" id="benf_crypto_address" name="benf_crypto_address"
placeholder="Enter beneficiary's crypto address" class="input-style" />
</div>
<div class="grid gap-6 my-4 md:grid-cols-2">
<div>
<label for="benf_first_name" class="label-style">Legal First or Given Name</label>
<input type="text" id="benf_first_name" name="benf_first_name"
placeholder="Enter beneficiary's first or given name" class="input-style" />
</div>
<div>
<label for="benf_last_name" class="label-style">Legal Last or Family Name</label>
<input type="text" id="benf_last_name" name="benf_last_name"
placeholder="Enter beneficiary's last or family name" class="input-style" />
</div>
</div>
<div class="grid gap-6 my-4 md:grid-cols-2">
<div>
<label for="bf_id_dob" class="label-style">Date of Birth</label>
<input type="date" id="bf_id_dob" name="bf_id_dob" placeholder="Enter beneficiary's date of birth"
class="input-style" />
</div>
<div>
<label for="bf_id_birth_place" class="label-style">Place of Birth</label>
<input type="text" id="bf_id_birth_place" name="bf_id_birth_place"
placeholder="Enter the beneficiary's place of birth" class="input-style" />
</div>
</div>
<div class="my-4">
<label for="benf_customer_id" class="label-style">Internal Customer Identifier</label>
<input type="text" id="benf_customer_id" name="benf_customer_id"
placeholder="Enter customer's internal identification number" class="input-style" />
</div>
<div class="grid gap-6 my-4 md:grid-cols-2">
<div>
<label for="benf_addr_line_1" class="label-style">Street Address - Line 1</label>
<input type="text" id="benf_addr_line_1" name="benf_addr_line_1"
placeholder="Enter beneficiary's street address" class="input-style" />
</div>
<div>
<label for="benf_addr_line_2" class="label-style">Street Address - Line 2 (optional) eg. apartment or
suite number</label>
<input type="text" id="benf_addr_line_2" name="benf_addr_line_2"
placeholder="Enter beneficiary's unit or building number" class="input-style" />
</div>
<div>
<label for="benf_city" class="label-style">City/Municipality</label>
<input type="text" id="benf_city" name="benf_city" placeholder="Enter beneficiary's city or municipality"
class="input-style" />
</div>
<div>
<label for="benf_state" class="label-style">Region/Province/State</label>
<input type="text" id="benf_state" name="benf_state"
placeholder="Enter beneficiary's region, province, or state" class="input-style" />
</div>
<div>
<label for="benf_post_code" class="label-style">Postal Code</label>
<input type="text" id="benf_post_code" name="benf_post_code" placeholder="Enter beneficiary's postal code"
class="input-style" />
</div>
<div>
<label for="benf_countries" class="label-style">Country</label>
<select id="benf_countries" name="benf_country"></select>
</div>
</div>
<div class="grid gap-6 my-6 md:grid-cols-2">
<div>
<label for="bf_id_number" class="label-style">National Identification Number</label>
<input type="text" id="bf_id_number" name="bf_id_number"
placeholder="Enter beneficiary's national identification number" class="input-style" />
</div>
<div>
<label for="bf_id_type_code" class="label-style">National Identification Type</label>
<select id="bf_id_type_code" name="bf_id_type_code"></select>
</div>
</div>
<div class="my-6">
<label for="bf_id_country" class="label-style">Country of Issue</label>
<select id="bf_id_country" name="bf_id_country"></select>
</div>
</section>

<!-- TODO: Add htmx attributes to buttons -->
<div class="py-4 flex justify-center items-center gap-x-2">
<button
type="button"
onclick="transaction_rejection_modal.showModal()"
class="p-1 btn w-36 bg-warning font-semibold text-lg text-white text-center md:p-2 hover:bg-warning/80">
Reject
</button>
<button
type="submit"
class="submit-btn w-36 btn p-1 bg-success font-semibold text-lg text-white md:p-2 hover:bg-success/80">
<span class="submit-btn-text">Accept</span>
<span id="loader" class="htmx-indicator loading loading-spinner loading-md"></span>
</button>
</div>
</form>
</section>
131 changes: 2 additions & 129 deletions pkg/web/templates/view_message.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,137 +10,10 @@ <h1 class="pb-4 text-2xl md:text-3xl font-semibold text-center text-balance">
transaction. If you're not yet part of the TRISA network, <a href="https://vaspdirectory.net/" target="_blank" class="underline text-blue-700">consider joining</a>
to streamline future Travel Rule compliance and secure data exchanges.
</p>

<!-- TODO: Add htmx attributes -->
<div id="transaction">
<div class="grid md:grid-cols-2 py-2 border-t border-t-black">
<section>
<h2 class="my-4 font-bold">TRANSACTION DETAILS</h2>
<!-- TODO: Range transaction details and display in the data list -->
<dl>
<div class="grid grid-cols-2">
<dt class="font-semibold">Amount</dt>
<dd>1.045</dd>
</div>
</dl>
</section>
<section>
<h2 class="my-4 font-bold">ORIGINATOR DETAILS</h2>
<!-- TODO: Range originator details and display in the data list -->
<dl>
<div class="grid grid-cols-2">
<dt class="font-semibold">First Name</dt>
<dd>James</dd>
</div>
</dl>
</section>
</div>
<div id="sunrise-transaction"></div>

<section>
<form>
<div class="mt-4"></div>
<section class="py-2 border-t border-t-black">
<h2 class="my-4 font-bold">BENEFICIARY DETAILS</h2>
<div class="my-5">
<label for="benf_crypto_address" class="label-style">Crypto Address</label>
<input type="text" id="benf_crypto_address" name="benf_crypto_address"
placeholder="Enter beneficiary's crypto address" class="input-style" />
</div>
<div class="grid gap-6 my-4 md:grid-cols-2">
<div>
<label for="benf_first_name" class="label-style">Legal First or Given Name</label>
<input type="text" id="benf_first_name" name="benf_first_name"
placeholder="Enter beneficiary's first or given name" class="input-style" />
</div>
<div>
<label for="benf_last_name" class="label-style">Legal Last or Family Name</label>
<input type="text" id="benf_last_name" name="benf_last_name"
placeholder="Enter beneficiary's last or family name" class="input-style" />
</div>
</div>
<div class="grid gap-6 my-4 md:grid-cols-2">
<div>
<label for="bf_id_dob" class="label-style">Date of Birth</label>
<input type="date" id="bf_id_dob" name="bf_id_dob" placeholder="Enter beneficiary's date of birth"
class="input-style" />
</div>
<div>
<label for="bf_id_birth_place" class="label-style">Place of Birth</label>
<input type="text" id="bf_id_birth_place" name="bf_id_birth_place"
placeholder="Enter the beneficiary's place of birth" class="input-style" />
</div>
</div>
<div class="my-4">
<label for="benf_customer_id" class="label-style">Internal Customer Identifier</label>
<input type="text" id="benf_customer_id" name="benf_customer_id"
placeholder="Enter customer's internal identification number" class="input-style" />
</div>
<div class="grid gap-6 my-4 md:grid-cols-2">
<div>
<label for="benf_addr_line_1" class="label-style">Street Address - Line 1</label>
<input type="text" id="benf_addr_line_1" name="benf_addr_line_1"
placeholder="Enter beneficiary's street address" class="input-style" />
</div>
<div>
<label for="benf_addr_line_2" class="label-style">Street Address - Line 2 (optional) eg. apartment or
suite number</label>
<input type="text" id="benf_addr_line_2" name="benf_addr_line_2"
placeholder="Enter beneficiary's unit or building number" class="input-style" />
</div>
<div>
<label for="benf_city" class="label-style">City/Municipality</label>
<input type="text" id="benf_city" name="benf_city" placeholder="Enter beneficiary's city or municipality"
class="input-style" />
</div>
<div>
<label for="benf_state" class="label-style">Region/Province/State</label>
<input type="text" id="benf_state" name="benf_state"
placeholder="Enter beneficiary's region, province, or state" class="input-style" />
</div>
<div>
<label for="benf_post_code" class="label-style">Postal Code</label>
<input type="text" id="benf_post_code" name="benf_post_code" placeholder="Enter beneficiary's postal code"
class="input-style" />
</div>
<div>
<label for="benf_countries" class="label-style">Country</label>
<select id="benf_countries" name="benf_country"></select>
</div>
</div>
<div class="grid gap-6 my-6 md:grid-cols-2">
<div>
<label for="bf_id_number" class="label-style">National Identification Number</label>
<input type="text" id="bf_id_number" name="bf_id_number"
placeholder="Enter beneficiary's national identification number" class="input-style" />
</div>
<div>
<label for="bf_id_type_code" class="label-style">National Identification Type</label>
<select id="bf_id_type_code" name="bf_id_type_code"></select>
</div>
</div>
<div class="my-6">
<label for="bf_id_country" class="label-style">Country of Issue</label>
<select id="bf_id_country" name="bf_id_country"></select>
</div>
</section>

<!-- TODO: Add htmx attributes to buttons -->
<div class="py-4 flex justify-center items-center gap-x-2">
<button
type="button"
onclick="transaction_rejection_modal.showModal()"
class="p-1 btn w-36 bg-warning font-semibold text-lg text-white text-center md:p-2 hover:bg-warning/80">
Reject
</button>
<button
type="submit"
class="submit-btn w-36 btn p-1 bg-success font-semibold text-lg text-white md:p-2 hover:bg-success/80">
<span class="submit-btn-text">Accept</span>
<span id="loader" class="htmx-indicator loading loading-spinner loading-md"></span>
</button>
</div>
</form>
</section>
</div>
</section>

<!-- Reject modal -->
Expand Down

0 comments on commit 5acd645

Please sign in to comment.