mirror of
https://github.com/OpenBazaar/openbazaar-desktop
synced 2025-10-06 00:22:47 +02:00
Only show for physical goods types
This commit is contained in:
@@ -235,7 +235,7 @@
|
||||
<div class="clrT2 txSm helper"><%= ob.polyT('editListing.helperTags') %></div>
|
||||
</section>
|
||||
|
||||
<section class="js-scrollToSection categorySection contentBox padMd clrP clrBr clrSh3 tx3">
|
||||
<section class="js-scrollToSection contentBox padMd clrP clrBr clrSh3 tx3 js-sectionShippingFrom shippingFromSection">
|
||||
<h2 class="h4 clrT"><%= ob.polyT('editListing.sectionNames.sendLocation') %></h2>
|
||||
<hr class="clrBr rowMd" />
|
||||
<% if (ob.errors['item.sendLocation']) print(ob.formErrorTmpl({ errors: ob.errors['item.sendLocation'] })) %>
|
||||
|
@@ -202,7 +202,8 @@
|
||||
<% } %>
|
||||
</div>
|
||||
<hr class="rowLg">
|
||||
<% if(ob.metadata.shippingFromCountryCode !== '' || ob.metadata.shippingFromPostalCode !== '') { %>
|
||||
<% if (ob.metadata.contractType === 'PHYSICAL_GOOD') { %>
|
||||
<% if (ob.metadata.shippingFromCountryCode !== '' || ob.metadata.shippingFromPostalCode !== '') { %>
|
||||
<h5><%= ob.polyT('editListing.sendLocation.shippingFromLabel') %></h5>
|
||||
<div class="rowLg">
|
||||
<% if(ob.metadata.shippingFromCountryCode !== '') { %>
|
||||
@@ -212,7 +213,7 @@
|
||||
<%= ob.polyT('editListing.sendLocation.shippingFromPostalCodeLabel') %>: <%= ob.metadata.shippingFromPostalCode %>
|
||||
<% } %>
|
||||
</div>
|
||||
<% } %>
|
||||
<% } } %>
|
||||
<h5><%= ob.polyT('listingDetail.tags') %></h5>
|
||||
<div class="tagWrapper rowLg">
|
||||
<% ob.item.tags.forEach(function(tag){
|
||||
|
@@ -977,6 +977,9 @@ export default class extends BaseModal {
|
||||
// If the type is not 'PHYSICAL_GOOD', we'll clear out any shipping options.
|
||||
if (metadata.get('contractType') !== 'PHYSICAL_GOOD') {
|
||||
this.model.get('shippingOptions').reset();
|
||||
const m = this.model.get('metadata');
|
||||
m.set('shippingFromCountryCode', 'NA');
|
||||
m.set('shippingFromPostalCode', '');
|
||||
} else {
|
||||
// If any shipping options have a type of 'LOCAL_PICKUP', we'll
|
||||
// clear out any services that may be there.
|
||||
|
@@ -325,6 +325,7 @@
|
||||
|
||||
.tab-shipping,
|
||||
.shippingSection,
|
||||
.shippingFromSection,
|
||||
.conditionWrap {
|
||||
display: none;
|
||||
}
|
||||
@@ -341,6 +342,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
&.TYPE_PHYSICAL_GOOD {
|
||||
.tab-shippingFrom,
|
||||
.conditionWrap,
|
||||
.shippingFromSection {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
&.TYPE_CRYPTOCURRENCY {
|
||||
.tab-variants,
|
||||
.tab-coupons {
|
||||
|
Reference in New Issue
Block a user