You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

117 lines
5.3 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. Copyright 2018 Rémy Taymans <remytaymans@gmail.com>
  4. License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  5. -->
  6. <openerp>
  7. <!-- Modifying the form -->
  8. <template
  9. id="website_portal_details_form"
  10. name="Website Portal Details Form"
  11. inherit_id="website_portal.details">
  12. <xpath expr="//form" position="replace">
  13. <form action="/my/account" method="post">
  14. <input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
  15. <div class="row o_website_portal_details">
  16. <div class="col-md-8">
  17. <div class="row">
  18. <div class="col-md-12">
  19. <div t-if="error_message" class="alert alert-danger">
  20. <t t-foreach="error_message" t-as="err"><t t-esc="err"/><br /></t>
  21. </div>
  22. </div>
  23. <div t-attf-class="form-group #{error.get('name') and 'has-error' or ''} col-lg-6">
  24. <label class="control-label" for="name">Your Name</label>
  25. <input type="text" name="name" class="form-control" t-att-value="name or partner.name" />
  26. </div>
  27. <div class="clearfix" />
  28. <div t-attf-class="form-group #{error.get('email') and 'has-error' or ''} col-lg-6">
  29. <label class="control-label" for="email">Email</label>
  30. <input type="email" name="email" class="form-control" t-att-value="email or partner.email" />
  31. </div>
  32. <div t-attf-class="form-group #{error.get('phone') and 'has-error' or ''} col-lg-6">
  33. <label class="control-label" for="phone">Phone</label>
  34. <input type="tel" name="phone" class="form-control" t-att-value="phone or partner.phone" />
  35. </div>
  36. <div class="clearfix" />
  37. <div t-attf-class="form-group #{error.get('company_name') and 'has-error' or ''} col-lg-6" t-if="partner.parent_id">
  38. <label class="control-label" for="company_name">Company Name</label>
  39. <input type="text" name="company_name" class="form-control" t-att-value="company_name or partner.parent_id.name"/>
  40. </div>
  41. <div t-if="has_check_vat" t-attf-class="form-group #{error.get('vat') and 'has-error' or ''} col-lg-6">
  42. <label class="control-label label-optional" for="vat">VAT Number</label>
  43. <input type="text" name="vat" class="form-control" t-att-value="vat or partner.parent_id.vat" t-if="partner.parent_id"/>
  44. <input type="text" name="vat" class="form-control" t-att-value="vat or partner.vat" t-if="not partner.parent_id"/>
  45. </div>
  46. <div class="clearfix" />
  47. <div t-attf-class="form-group #{error.get('street') and 'has-error' or ''} col-lg-6">
  48. <label class="control-label" for="street">Street</label>
  49. <input type="text" name="street" class="form-control" t-att-value="street or partner.street" />
  50. </div>
  51. <div t-attf-class="form-group #{error.get('city') and 'has-error' or ''} col-lg-6">
  52. <label class="control-label" for="city">City</label>
  53. <input type="text" name="city" class="form-control" t-att-value="city or partner.city" />
  54. </div>
  55. <div t-attf-class="form-group #{error.get('zip') and 'has-error' or ''} col-lg-6">
  56. <label class="control-label" for="zipcode">Zip / Postal Code</label>
  57. <input type="text" name="zipcode" class="form-control" t-att-value="zipcode or partner.zip" />
  58. </div>
  59. <div t-attf-class="form-group #{error.get('country_id') and 'has-error' or ''} col-lg-6">
  60. <label class="control-label" for="country_id">Country</label>
  61. <select name="country_id" class="form-control">
  62. <option value="">Country...</option>
  63. <t t-foreach="countries or []" t-as="country">
  64. <option t-att-value="country.id" t-att-selected="country.id == partner.country_id.id">
  65. <t t-esc="country.name" />
  66. </option>
  67. </t>
  68. </select>
  69. </div>
  70. <div t-attf-class="form-group #{error.get('state_id') and 'has-error' or ''} col-lg-6">
  71. <label class="control-label label-optional" for="state_id">State / Province</label>
  72. <select name="state_id" class="form-control">
  73. <option value="">select...</option>
  74. <t t-foreach="states or []" t-as="state">
  75. <option t-att-value="state.id" style="display:none;" t-att-data-country_id="state.country_id.id" t-att-selected="state.id == partner.state_id.id">
  76. <t t-esc="state.name" />
  77. </option>
  78. </t>
  79. </select>
  80. </div>
  81. <input type="hidden" name="redirect" t-att-value="redirect"/>
  82. </div> <!-- row -->
  83. <div class="clearfix">
  84. <button type="submit" class="btn btn-default btn-primary pull-right mb32 ">
  85. Confirm
  86. <span class="fa fa-long-arrow-right" />
  87. </button>
  88. </div>
  89. </div>
  90. </div>
  91. </form>
  92. </xpath>
  93. </template>
  94. </openerp>