Add inline customer creation modal and functionality

This commit is contained in:
ricky committed 2026-08-24 20:17:41 -04:00
1 parent 7807e5a1e7
commit de7aba15ce
2 files changed
+116 -1

No files matched your search

+10 -1
View File
@@ -1,3 +1,5 @@
<%= javascript_include_tag("customer-modal", plugin: :redmine_qbo_calendar) %>
<%= labelled_form_for @appointment do |f| %>
<%= error_messages_for @appointment %>
@@ -7,6 +9,8 @@
<p>
<%= f.text_field :customer, label: :label_customer, class: "customer-name", autocomplete: "off", data: { autocomplete_url: "/customers/autocomplete" } %>
<%= f.hidden_field :customer_id, id: "customer_id" %>
<!-- Add Quick Create Button -->
<a href="#" id="inline-create-customer-btn" class="icon icon-add" title="New Customer">+</a>
</p>
<p>
@@ -42,4 +46,9 @@
</div>
<%= submit_tag l(:button_save) %>
<% end %>
<% end %>
<!-- Modal Container for Inline Customer Creation -->
<div id="new-customer-dialog" style="display:none;" title="<%= t(:label_new_customer, default: 'New Customer') %>">
<!-- The form will be dynamically loaded via JS or rendered here -->
</div>