account-paymentmethods-billing-contacts.tpl 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <div id="innerBillingContactsContainer">
  2. <label class="form-check form-check-inline billing-contact-0">
  3. <input
  4. type="radio"
  5. class="icheck-button"
  6. name="billingcontact"
  7. value="0"
  8. {if $payMethod->contactType == 'Client' || ($payMethod->contactType === null && $client->billingContactId === 0)}
  9. checked
  10. {/if}>
  11. <strong class="name">{$client->fullName}</strong>
  12. <span class="address1">{$client->address1}</span>,
  13. {if $client->address2}<span class="address2">{$client->address2}</span>,{/if}
  14. <span class="city">{$client->city}</span>,
  15. <span class="state">{$client->state}</span>,
  16. <span class="postcode">{$client->postcode}</span>,
  17. <span class="country">{$client->country}</span>
  18. </label>
  19. <br>
  20. {foreach $client->contacts()->orderBy('firstname', 'asc')->orderBy('lastname', 'asc')->get() as $contact}
  21. <label class="form-check form-check-inline billing-contact-{$contact->id}">
  22. <input
  23. type="radio"
  24. class="icheck-button"
  25. name="billingcontact"
  26. value="{$contact->id}"
  27. {if $payMethod->contactType == 'Contact' && $contact->id == $payMethod->getContactId()}
  28. checked
  29. {elseif $payMethod->contactType === null && $client->billingContactId > 0}
  30. {if $contact->id == $client->billingContactId || $contact->id == $selectedContactId}
  31. checked
  32. {/if}
  33. {/if}>
  34. <strong class="name">{$contact->fullName}</strong>
  35. <span class="address1">{$contact->address1}</span>,
  36. {if $contact->address2}<span class="address2">{$contact->address2}</span>,{/if}
  37. <span class="city">{$contact->city}</span>,
  38. <span class="state">{$contact->state}</span>,
  39. <span class="postcode">{$contact->postcode}</span>,
  40. <span class="country">{$contact->country}</span>
  41. </label>
  42. <br>
  43. {/foreach}
  44. </div>
  45. <script>
  46. jQuery(document).ready(function() {
  47. jQuery('#innerBillingContactsContainer').find('.icheck-button').iCheck({
  48. inheritID: true,
  49. checkboxClass: 'icheckbox_square-blue',
  50. radioClass: 'iradio_square-blue',
  51. increaseArea: '20%'
  52. });
  53. });
  54. </script>