我写deface用于在订单页面中添加新文本字段,我想使用spree默认控制器更新此记录
供应商/礼包/管理/ _shipment / time_window.er.deface
$('#collapseDiv').on('shown.bs.collapse', function () {
$('.icon-before').attr('data-icon', '').text('Show Less');
});
$('#collapseDiv').on('hidden.bs.collapse', function () {
$('.icon-before').attr('data-icon', '').text('Show More');
});
spree.rb
<!-- insert_after 'div[data-hook="admin_shipment_form"] tr.edit-method div' -->
<% if @order.shipping_method_id.present? %>
<div class="field alpha five columns">
<label><%= Spree.t(:fulfillment_time_window) %>:</label>
<%= text_field_tag :fulfillment_time_window, @order.fulfillment_time_window %>
</div>
</div>
我想在订单表中更新此字段
但它没有在params中传递此属性
提前致谢