Vehicle new/edit pages in Redmine's form style

- labelled_form_for with a "box tabular" form, like core Redmine forms:
  labels on the left, required fields (customer, VIN) marked with *
- Breadcrumb headings ("Vehicles » vehicle"), Create/Save buttons and a
  Cancel link (back to the vehicle, or the customer for new vehicles)
- Field order: customer, VIN, year, make, model, notes; the VIN field
  is limited to 17 characters and keeps focus
- Keeps redmine_qbo's customer autocomplete and the duplicate-VIN link

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
This commit is contained in:
Claude committed 2026-10-29 23:16:23 -04:00
1 parent d7368388b6
commit 9583bf52a8
3 files changed
+41 -75

No files matched your search

+9 -3
View File
@@ -1,3 +1,9 @@
<h2><%=t(:label_edit_customer_vehicle)%></h2>
<br/>
<%= render partial: 'vehicles/form' %>
<h2><%= link_to l(:field_vehicles), vehicles_path %> &#187; <%= link_to @vehicle.to_s, vehicle_path(@vehicle) %></h2>
<%= labelled_form_for @vehicle do |f| %>
<%= render partial: 'vehicles/form', locals: { f: f } %>
<%= submit_tag l(:button_save) %>
<%= link_to l(:button_cancel), vehicle_path(@vehicle) %>
<% end %>
<% html_title(l(:label_edit_customer_vehicle)) -%>