-
-
Notifications
You must be signed in to change notification settings - Fork 729
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
84 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
app/overrides/spree/admin/shipping_methods/_form/add_require_ship_address.html.haml.deface
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
app/overrides/spree/admin/shipping_methods/_form/remove_form_availability_fields.deface
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
remove "div[data-hook='admin_shipping_method_form_availability_fields']" |
1 change: 1 addition & 0 deletions
1
app/overrides/spree/admin/shipping_methods/_form/remove_form_calculator_fields.deface
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
remove "div[data-hook='admin_shipping_method_form_calculator_fields']" |
57 changes: 57 additions & 0 deletions
57
app/overrides/spree/admin/shipping_methods/_form/replace_form_fields.html.haml.deface
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/ replace "div[data-hook='admin_shipping_method_form_fields']" | ||
.alpha.twelve.columns{"data-hook" => "admin_shipping_method_form_fields"} | ||
.row | ||
.alpha.three.columns | ||
= f.label :name, t(:name) | ||
.omega.eight.columns | ||
= f.text_field :name, :class => 'fullwidth', placeholder: "eg. 'Pick-up from Primary School'" | ||
= error_message_on :shipping_method, :name | ||
.row | ||
.alpha.three.columns | ||
= f.label :description, t(:description) | ||
.omega.eight.columns | ||
= f.text_area :description, class: 'fullwidth', rows: 2, placeholder: "eg. 'Please collect your order from 123 Imaginary St, Northcote, 3070'" | ||
= error_message_on :shipping_method, :description | ||
- if @available_zones.length == 1 | ||
= f.hidden_field :zone_id, value: @available_zones.first.id | ||
- else | ||
.row | ||
.alpha.three.columns | ||
= f.label :zone_id, t(:zone) | ||
.omega.eight.columns | ||
= f.collection_select(:zone_id, @available_zones, :id, :name, {}, {:class => 'select2 fullwidth'}) | ||
= error_message_on :shipping_method, :zone_id | ||
- if spree_current_user.admin? | ||
.row | ||
.alpha.three.columns | ||
= f.label :display_on, t(:display) | ||
.omega.eight.columns | ||
= select(:shipping_method, :display_on, Spree::ShippingMethod::DISPLAY.collect { |display| [t(display), display == :both ? nil : display.to_s] }, {}, {:class => 'select2 fullwidth'}) | ||
= error_message_on :shipping_method, :display_on | ||
.row | ||
-# Shipping Category used to be a select field, but we cut it down to two options to simplify the interface and because we thought 'Collection' and | ||
-# 'Delivery' pretty much covered it. If we need more categories in the future, suggest reimplementing the select box from spree's code. | ||
.three.columns.alpha | ||
%label Category | ||
= f.hidden_field :shipping_category_id, value: nil | ||
- Spree::ShippingCategory.where(name: ['Delivery', 'Collection']).limit(2).each do |shipping_category| | ||
.two.columns | ||
= f.radio_button :shipping_category_id, shipping_category.id | ||
| ||
= f.label "shipping_category_id_#{shipping_category.id}", t(shipping_category.name) | ||
.row | ||
.alpha.three.columns | ||
= f.label :require_ship_address, "Requires shipping address?" | ||
.two.columns | ||
= f.radio_button :require_ship_address, true | ||
| ||
= f.label :yes, t(:yes) | ||
.six.columns | ||
= f.radio_button :require_ship_address, false | ||
| ||
= f.label :no, t(:no) | ||
|
||
.row | ||
.alpha.eleven.columns | ||
= render :partial => 'spree/admin/shared/calculator_fields', :locals => { :f => f } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters