Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit c8eb9f4

Browse files
committed
Update other to alternate_contact.
Fix styling on very long addresses.
1 parent dafbe25 commit c8eb9f4

File tree

7 files changed

+18
-15
lines changed

7 files changed

+18
-15
lines changed

css/obBase.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4820,12 +4820,12 @@ input[type="checkbox"].fieldItem:checked + label .togLabelOff {
48204820

48214821
.buyAddressWrapper {
48224822
padding: 15px;
4823-
overflow: hidden;
4823+
word-wrap: break-word;
48244824
}
48254825

4826-
.buyAddressWrapper > div {
4827-
overflow: hidden;
4828-
text-overflow: ellipsis;
4826+
.payAddressWrapper {
4827+
padding: 20px 15px;
4828+
word-wrap: break-word;
48294829
}
48304830

48314831
/*========== utility classes ==========*/

js/templates/buyAddresses.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<%= address.state %> <%= address.postal_code %>
2626
</div>
2727
<div>
28-
<%= address.other %>
28+
<%= address.alternate_contact %>
2929
</div>
3030
<div>
3131
<%= address.displayCountry %>
@@ -78,7 +78,7 @@
7878
<%= address.state %> <%= address.postal_code %>
7979
</div>
8080
<div>
81-
<%= address.other %>
81+
<%= address.alternate_contact %>
8282
</div>
8383
<div>
8484
<%= address.displayCountry %>

js/templates/buyDetails.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
<% if( ob.vendor_offer.listing.metadata.category === "physical good" ) { %>
6868
<div class="flexRow custCol-border borderBottom">
6969
<div class="flexCol-8">
70-
<div class="rowItem padding2015">
70+
<div class="payAddressWrapper">
7171
<div class="table">
7272
<div>
7373
<div class="thumbnail-large-slim">
@@ -80,8 +80,11 @@
8080
<% if(ob.selectedAddress) { %>
8181
<div class="marginBottom2"><%= ob.selectedAddress.name %></div>
8282
<div class="marginBottom2"><%= ob.selectedAddress.street %></div>
83-
<div class="marginBottom2"><%= ob.selectedAddress.city %>, <%= ob.selectedAddress.state %> <%= ob.selectedAddress.postal_code %></div>
84-
<div class="marginBottom2"><%= ob.selectedAddress.other %></div>
83+
<div class="marginBottom2">
84+
<%= ob.selectedAddress.city %><% if(ob.selectedAddress.state || ob.selectedAddress.postal_code && ob.selectedAddress.city){ %>,<% } %>
85+
<%= ob.selectedAddress.state %> <%= ob.selectedAddress.postal_code %>
86+
</div>
87+
<div class="marginBottom2"><%= ob.selectedAddress.alternate_contact %></div>
8588
<div><%= ob.selectedAddress.displayCountry %></div>
8689
<% } %>
8790
</div>

js/templates/settings.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ <h3 class="padding15 margin0 fontWeight500"><%= polyglot.t('CurrentAddress') %><
846846
<% if(address.city && address.state || address.city && address.postal_code) print(",") %>
847847
<%= address.state %> <%= address.postal_code %>
848848
</div>
849-
<div><%= address.other %></div>
849+
<div><%= address.alternate_contact %></div>
850850
<div><%= address.displayCountry %></div>
851851
</div>
852852

js/templates/transactionModal.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ <h3 class="txt-bright"><%= polyglot.t('CheckExchanges') %> </h3>
773773
<div><%- ob.buyer_order.order.shipping.ship_to %></div>
774774
<div><%- ob.buyer_order.order.shipping.address %></div>
775775
<div><%- ob.buyer_order.order.shipping.city %> <%- ob.buyer_order.order.shipping.state %> <%- ob.buyer_order.order.shipping.postal_code %></div>
776-
<div><%- ob.buyer_order.order.shipping.other %></div>
776+
<div><%- ob.buyer_order.order.alternate_contact %></div>
777777
<div><%= polyglot.t('countries.' + ob.buyer_order.order.shipping.country) %></div>
778778
</div>
779779
</div>

js/views/buyWizardVw.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ module.exports = baseModal.extend({
340340
newAddress.city = this.$el.find('#buyWizardCityInput').val();
341341
newAddress.state = this.$el.find('#buyWizardStateInput').val();
342342
newAddress.postal_code = this.$el.find('#buyWizardPostalInput').val();
343-
newAddress.other = this.$el.find('#buyWizardOther').val();
343+
newAddress.alternate_contact = this.$el.find('#buyWizardOther').val();
344344
newAddress.country = this.$el.find('#buyWizardCountryInput').val();
345345
newAddress.displayCountry = this.$el.find('#buyWizardCountryInput option:selected').data('name');
346346

@@ -509,7 +509,7 @@ module.exports = baseModal.extend({
509509
formData.append("city", selectedAddress.city);
510510
formData.append("state", selectedAddress.state);
511511
formData.append("postal_code", selectedAddress.postal_code);
512-
formData.append("other", selectedAddress.other);
512+
formData.append("alternate_contact", selectedAddress.alternate_contact);
513513
formData.append("country", selectedAddress.country);
514514
}
515515

js/views/settingsVw.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -965,12 +965,12 @@ module.exports = pageVw.extend({
965965
newAddress.city = this.$('#settingsShipToCity').val();
966966
newAddress.state = this.$('#settingsShipToState').val();
967967
newAddress.postal_code = this.$('#settingsShipToPostalCode').val();
968-
newAddress.other = this.$('#settingsShipToOther').val();
968+
newAddress.alternate_contact = this.$('#settingsShipToOther').val();
969969
newAddress.country = this.$('#settingsShipToCountry').val();
970970
newAddress.displayCountry = this.$('#settingsShipToCountry option:selected').data('name');
971971

972972
//if form is partially filled out throw error
973-
if (newAddress.name || newAddress.street || newAddress.city || newAddress.state || newAddress.postal_code || newAddress.other) {
973+
if (newAddress.name || newAddress.street || newAddress.city || newAddress.state || newAddress.postal_code || newAddress.alternate_contact) {
974974
if (!newAddress.name) {
975975
this.$('#settingsShipToName').addClass('invalid');
976976
app.simpleMessageModal.open({

0 commit comments

Comments
 (0)