diff --git a/plugins/bnn_upload/app/overrides/orders/show/replace_send_to_supplier_button.html.haml.deface b/plugins/bnn_upload/app/overrides/orders/show/replace_send_to_supplier_button.html.haml.deface index 7343529c..49a38576 100644 --- a/plugins/bnn_upload/app/overrides/orders/show/replace_send_to_supplier_button.html.haml.deface +++ b/plugins/bnn_upload/app/overrides/orders/show/replace_send_to_supplier_button.html.haml.deface @@ -1,6 +1,5 @@ -/ replace 'erb:contains("send_result_to_supplier")' +/ replace '#send_button' - if FoodsoftBnnUpload.enabled? - - raise = link_to t('.send_to_supplier'), send_result_to_supplier_modal_order_path(@order), remote: true, - class: "btn#{' btn-primary' unless @order.last_sent_mail}", + class: "btn#{' btn-primary', data: {confirm: @order.last_sent_mail && t('.confirm_send_to_supplier', when: format_time(@order.last_sent_mail)) } \ No newline at end of file diff --git a/plugins/bnn_upload/lib/foodsoft_bnn_upload.rb b/plugins/bnn_upload/lib/foodsoft_bnn_upload.rb index 983cb3f1..66d7d279 100644 --- a/plugins/bnn_upload/lib/foodsoft_bnn_upload.rb +++ b/plugins/bnn_upload/lib/foodsoft_bnn_upload.rb @@ -1,3 +1,4 @@ +require "deface" require 'foodsoft_bnn_upload/engine' module FoodsoftBnnUpload