mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-11-17 18:20:36 -05:00
- labelled_form_for with Redmine's "box tabular" layout: labels on the
left, Display name marked required
- Breadcrumb headings ("Customers » customer"), Create/Save buttons and
a Cancel link back to the customer (or the customer list)
- Keeps the form tag in the partial and the customer_name / customer_notes
ids used by redmine_qbo_calendar's quick-create popup (hide_submit /
hide_toolbar still supported)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
31 lines
1.4 KiB
ERB
31 lines
1.4 KiB
ERB
<%#
|
|
Customer form, in Redmine's form style. Also loaded by redmine_qbo_calendar's quick-create popup
|
|
(hide_submit / hide_toolbar), which relies on the form tag being here and the name field's
|
|
customer_name id.
|
|
%>
|
|
<%= labelled_form_for @customer do |f| %>
|
|
<%= error_messages_for 'customer' %>
|
|
|
|
<div class="box tabular">
|
|
<p>
|
|
<%= f.text_field :name, label: :label_display_name, required: true, size: 60,
|
|
class: 'customer-name', autocomplete: 'off',
|
|
data: { autocomplete_url: '/customers/autocomplete' } %>
|
|
</p>
|
|
<p><%= f.telephone_field :primary_phone, label: :label_primary_phone, size: 20, autocomplete: 'off' %></p>
|
|
<p><%= f.telephone_field :mobile_phone, label: :label_mobile_phone, size: 20, autocomplete: 'off' %></p>
|
|
<p><%= f.email_field :email, label: :label_email, size: 60, autocomplete: 'off' %></p>
|
|
<p>
|
|
<%= f.text_area :notes, label: :field_notes, rows: 8, class: 'wiki-edit', id: 'customer_notes' %>
|
|
<% unless local_assigns[:hide_toolbar] %>
|
|
<%= wikitoolbar_for 'customer_notes' %>
|
|
<% end %>
|
|
</p>
|
|
</div>
|
|
|
|
<% unless local_assigns[:hide_submit] %>
|
|
<%= submit_tag @customer.new_record? ? l(:button_create) : l(:button_save) %>
|
|
<%= link_to l(:button_cancel), @customer.new_record? ? customers_path : customer_path(@customer) %>
|
|
<% end %>
|
|
<% end %>
|