Merge branch 'r-1902001-01' into foodcourt
This commit is contained in:
@@ -13,11 +13,9 @@
|
||||
<%= f.input :auto_print_receipt %>
|
||||
<%= f.label "Select Zones", :class => 'control-label' %>
|
||||
<%= f.collection_check_boxes :zone_ids , Zone.all, :id, :name , :class => 'checkbox form-group'%>
|
||||
<% if(@server_mode != 'cloud') %>
|
||||
<%= f.input :printer_name, :as => :select, :collection => Printer::PrinterWorker.printers, include_blank: false %>
|
||||
<% else %>
|
||||
<%= f.input :printer_name, :as => :select, :collection => [], include_blank: false %>
|
||||
<% end %>
|
||||
|
||||
<%= f.input :printer_name, :as => :select, :collection => Printer::PrinterWorker.printers, include_blank: "Please Select", class: "mdb-select md-form" %>
|
||||
|
||||
<%= f.input :font %>
|
||||
<%= f.input :font_size %>
|
||||
<%= f.input :show_tax %>
|
||||
@@ -25,7 +23,7 @@
|
||||
<%= f.input :show_guest_info %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<div class="form-actions p-l-10">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -66,7 +64,7 @@
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
var serverMode = "<%= @server_mode %>";
|
||||
if(serverMode == 'cloud'){
|
||||
if(serverMode == 'cloud' && typeof code2lab != 'undefined') {
|
||||
var printers = code2lab.getPrinters();
|
||||
var printerInfo = JSON.parse([printers]);
|
||||
var select = $("#cashier_terminal_printer_name");
|
||||
@@ -78,5 +76,12 @@
|
||||
.text(value.deviceName));
|
||||
});
|
||||
}
|
||||
|
||||
$('#cashier_terminal_printer_name option:first').attr('disabled', true);
|
||||
|
||||
$("#cashier_terminal_printer_name").select2({
|
||||
theme: 'material',
|
||||
tags: true
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user