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>
|
||||
|
||||
@@ -14,22 +14,11 @@ div.form-inputs span{
|
||||
<%= simple_form_for([:settings,@settings_order_queue_station]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs p-l-15">
|
||||
<div class="form-inputs p-l-10">
|
||||
<%= f.input :station_name %>
|
||||
<%= f.input :is_active %>
|
||||
<% if(@server_mode != 'cloud') %>
|
||||
<div class="form-group select required order_queue_station_printer_name bmd-form-group is-filled focused">
|
||||
<label class="control-label select required bmd-label-static" for="order_queue_station_printer_name"><abbr title="required">*</abbr> Printer name</label>
|
||||
<select class="form-control select required" name="order_queue_station[printer_name]" id="order_queue_station_printer_name">
|
||||
<% Printer::PrinterWorker.printers.each do |printer| %>
|
||||
<option value="<%= printer.force_encoding("UTF-8") %>"><%= printer.force_encoding("UTF-8") %></option>
|
||||
<% end %>
|
||||
</select>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= f.input :printer_name, :as => :select, :collection => [], include_blank: false %>
|
||||
<% end %>
|
||||
<!-- <%= f.input :font_size %> -->
|
||||
<%= f.input :printer_name, :as => :select, :collection => Printer::PrinterWorker.printers, include_blank: "Please Select", class: "mdb-select md-form" %>
|
||||
|
||||
<%= f.input :print_copy %>
|
||||
<%= f.hidden_field :processing_items %>
|
||||
<%= f.label "Select Zones", :class => 'control-label' %>
|
||||
@@ -40,7 +29,7 @@ div.form-inputs span{
|
||||
<%= f.input :auto_print %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions p-l-15">
|
||||
<div class="form-actions p-l-10">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -78,7 +67,7 @@ div.form-inputs span{
|
||||
<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 = $("#order_queue_station_printer_name");
|
||||
@@ -91,4 +80,11 @@ div.form-inputs span{
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$('#order_queue_station_printer_name option:first').attr('disabled', true);
|
||||
|
||||
$("#order_queue_station_printer_name").select2({
|
||||
theme: 'material',
|
||||
tags: true
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user