Skip to content
This repository has been archived by the owner on Aug 30, 2018. It is now read-only.

Commit

Permalink
Merge pull request #577 from Shopify/fix-customer-addresses
Browse files Browse the repository at this point in the history
Show errors in customer address forms
  • Loading branch information
cshold committed Sep 29, 2016
2 parents 6990367 + 3fecdcc commit e5395f3
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions templates/customers/addresses.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
{% comment %}
Add address form, hidden by default
{% endcomment %}
<div id="AddAddress" class="form-vertical" style="display: none;">
{% form 'customer_address', customer.new_address %}

{% form 'customer_address', customer.new_address %}
<div id="AddAddress" class="form-vertical" {% unless form.errors %}style="display:none;"{% endunless %}>
<h2>{{ 'customer.addresses.add_new' | t }}</h2>
{{ form.errors | default_errors }}

<div class="grid">

Expand Down Expand Up @@ -93,8 +93,8 @@
<p><a href="#" onclick="Shopify.CustomerAddress.toggleNewForm(); return false;">{{ 'customer.addresses.cancel' | t }}</a></p>

<hr>
{% endform %}
</div>
</div>
{% endform %}

<h2>{{ 'customer.addresses.title' | t }}</h2>

Expand Down Expand Up @@ -125,10 +125,10 @@
{{ 'customer.addresses.delete' | t | delete_customer_address_link: address.id }}
</p>

<div id="EditAddress_{{ address.id }}" class="form-vertical" style="display:none;">
{% form 'customer_address', address %}

{% form 'customer_address', address %}
<div id="EditAddress_{{ address.id }}" class="form-vertical" {% unless form.errors %}style="display:none;"{% endunless %}>
<h4>{{ 'customer.addresses.edit_address' | t }}</h4>
{{ form.errors | default_errors }}

<div class="grid">
<div class="grid__item one-half small--one-whole">
Expand Down Expand Up @@ -183,8 +183,8 @@
<p><a href="#" onclick="Shopify.CustomerAddress.toggleForm({{ form.id }}); return false;">{{ 'customer.addresses.cancel' | t }}</a></p>

<hr>
{% endform %}
</div>
</div>
{% endform %}

{% endfor %}

Expand Down

0 comments on commit e5395f3

Please sign in to comment.