diff --git a/frappe/public/build.json b/frappe/public/build.json index 30cb2adf87..997a3092ad 100755 --- a/frappe/public/build.json +++ b/frappe/public/build.json @@ -250,6 +250,8 @@ "public/less/form_grid.less" ], "js/form.min.js": [ + "public/js/frappe/form/templates/address_list.html", + "public/js/frappe/form/templates/contact_list.html", "public/js/frappe/form/templates/print_layout.html", "public/js/frappe/form/templates/users_in_sidebar.html", "public/js/frappe/form/templates/set_sharing.html", diff --git a/frappe/public/js/frappe/form/templates/address_list.html b/frappe/public/js/frappe/form/templates/address_list.html new file mode 100644 index 0000000000..0f967b67a0 --- /dev/null +++ b/frappe/public/js/frappe/form/templates/address_list.html @@ -0,0 +1,22 @@ +
+{% for(var i=0, l=addr_list.length; i +

+ {%= i+1 %}. {%= addr_list[i].address_title %}{% if(addr_list[i].address_type!="Other") { %} + ({%= __(addr_list[i].address_type) %}){% } %} + {% if(addr_list[i].is_primary_address) { %} + ({%= __("Primary") %}){% } %} + {% if(addr_list[i].is_shipping_address) { %} + ({%= __("Shipping") %}){% } %} + + + {%= __("Edit") %} +

+

{%= addr_list[i].display %}

+ +{% } %} +{% if(!addr_list.length) { %} +

{%= __("No address added yet.") %}

+{% } %} +

\ No newline at end of file diff --git a/frappe/public/js/frappe/form/templates/contact_list.html b/frappe/public/js/frappe/form/templates/contact_list.html new file mode 100644 index 0000000000..7e6969163b --- /dev/null +++ b/frappe/public/js/frappe/form/templates/contact_list.html @@ -0,0 +1,54 @@ +
+{% for(var i=0, l=contact_list.length; i +

+ {%= contact_list[i].first_name %} {%= contact_list[i].last_name %} + {% if(contact_list[i].is_primary_contact) { %} + ({%= __("Primary") %}) + {% } %} + {% if(contact_list[i].designation){ %} + – {%= contact_list[i].designation %} + {% } %} + + {%= __("Edit") %} +

+ {% if (contact_list[i].phones || contact_list[i].email_ids) { %} +

+ {% if(contact_list[i].phone) { %} + {%= __("Phone") %}: {%= contact_list[i].phone %} ({%= __("Primary") %})
+ {% endif %} + {% if(contact_list[i].mobile_no) { %} + {%= __("Mobile No") %}: {%= contact_list[i].mobile_no %} ({%= __("Primary") %})
+ {% endif %} + {% if(contact_list[i].phone_nos) { %} + {% for(var j=0, k=contact_list[i].phone_nos.length; j + {% } %} + {% endif %} +

+

+ {% if(contact_list[i].email_id) { %} + {%= __("Email") %}: {%= contact_list[i].email_id %} ({%= __("Primary") %})
+ {% endif %} + {% if(contact_list[i].email_ids) { %} + {% for(var j=0, k=contact_list[i].email_ids.length; j + {% } %} + {% endif %} +

+ {% endif %} +

+ {% if (contact_list[i].address) { %} + {%= __("Address") %}: {%= contact_list[i].address %}
+ {% endif %} +

+ +{% } %} +{% if(!contact_list.length) { %} +

{%= __("No contacts added yet.") %}

+{% } %} +

+

\ No newline at end of file