diff --git a/app/views/customers/_form.html.erb b/app/views/customers/_form.html.erb index 6cc983d..979fedb 100644 --- a/app/views/customers/_form.html.erb +++ b/app/views/customers/_form.html.erb @@ -1,60 +1,44 @@ -
-
-
+<%= form_for @customer do |f| %> + <%= error_messages_for 'customer' %> - <%= form_for @customer do |f| %> - -
- <%=t(:label_display_name)%> -
- <%= f.text_field :name, required: true, class: "customer-name", autocomplete: "off", data: { autocomplete_url: "/customers/autocomplete" } %> -
-
- -
- <%=t(:label_primary_phone)%> -
- <%= f.telephone_field :primary_phone, autocomplete: "off" %> -
-
- -
- <%=t(:label_mobile_phone)%>: -
- <%= f.telephone_field :mobile_phone, autocomplete: "off" %> -
-
- -
- <%=t(:label_email)%>: -
- <%= f.email_field :email, autocomplete: "off" %> -
-
- -
- <%= t(:field_notes) %>: -
-

- <%= f.text_area :notes, - rows: 8, - class: 'wiki-edit', - style: 'width: 95%;', - id: 'customer_notes' %> - <% unless local_assigns[:hide_toolbar] %> - <%= wikitoolbar_for 'customer_notes' %> - <% end %> -

-
-
- - <% unless local_assigns[:hide_submit] %> -
- <%= f.submit %> -
+
+ +

+ <%= f.label :name, t(:label_display_name) %> + <%= f.text_field :name, required: true, class: "customer-name", autocomplete: "off", data: { autocomplete_url: "/customers/autocomplete" } %> +

+ +

+ <%= f.label :primary_phone, t(:label_primary_phone) %> + <%= f.telephone_field :primary_phone, autocomplete: "off" %> +

+ +

+ <%= f.label :mobile_phone, t(:label_mobile_phone) %> + <%= f.telephone_field :mobile_phone, autocomplete: "off" %> +

+ +

+ <%= f.label :email, t(:label_email) %> + <%= f.email_field :email, autocomplete: "off" %> +

+ +

+ <%= f.label :notes, t(:field_notes) %> + <%= f.text_area :notes, + rows: 8, + class: 'wiki-edit', + style: 'width: 99%;', + id: 'customer_notes' %> + <% unless local_assigns[:hide_toolbar] %> + <%= wikitoolbar_for 'customer_notes' %> <% end %> - <% end %> - -

+

-
+ + <% unless local_assigns[:hide_submit] %> +

+ <%= submit_tag t(:button_save) %> +

+ <% end %> +<% end %> \ No newline at end of file diff --git a/app/views/customers/new.html.erb b/app/views/customers/new.html.erb index 00fa084..9295442 100644 --- a/app/views/customers/new.html.erb +++ b/app/views/customers/new.html.erb @@ -1,3 +1,2 @@

<%=t(:label_new_customer)%>

-
-<%= render partial: 'customers/form' %> +<%= render partial: 'customers/form' %> \ No newline at end of file