<%# 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' %>

<%= f.text_field :name, label: :label_display_name, required: true, size: 60, class: 'customer-name', autocomplete: 'off', data: { autocomplete_url: '/customers/autocomplete' } %>

<%= f.telephone_field :primary_phone, label: :label_primary_phone, size: 20, autocomplete: 'off' %>

<%= f.telephone_field :mobile_phone, label: :label_mobile_phone, size: 20, autocomplete: 'off' %>

<%= f.email_field :email, label: :label_email, size: 60, autocomplete: 'off' %>

<%= 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 %>

<% 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 %>