diff --git a/app/views/contact_us/contacts/new.html.erb b/app/views/contact_us/contacts/new.html.erb index 5204126..bfebccb 100644 --- a/app/views/contact_us/contacts/new.html.erb +++ b/app/views/contact_us/contacts/new.html.erb @@ -1,8 +1,5 @@ - +<% javascript "contacts/new_contact.js" %> +

<%= _("Contact Us") %>

@@ -15,64 +12,69 @@
- <%= form_for @contact, :url => contacts_path do |f| %> -
-
- <% if ContactUs.require_name %> -
- <%= f.label :name, (_('Name') + content_tag(:abbr, "*", class: "required")).html_safe %> - <% if user_signed_in? then %> - <%= f.text_field :name, value: current_user.name(false) %> - <% else %> - <%= f.text_field :name %> - <% end %> - <% if f.object.errors[:name].present? %> -

<%= f.object.errors[:name].join(_(" and ")) %>

- <% end %> -
- <% end %> - + <%= form_for @contact, url: contacts_path, html: {class: "roadmap-form"} do |f| %> +
+ <% if ContactUs.require_name %>
- <%= f.label :email, (_('Email') + content_tag(:abbr, "*", class: "required")).html_safe %> + <%= f.label :name, (_('Name') + content_tag(:abbr, "*", class: "required")).html_safe %> <% if user_signed_in? then %> - <%= f.email_field :email, value: current_user.email %> + <%= f.text_field :name, value: current_user.name(false) %> <% else %> - <%= f.email_field :email %> + <%= f.text_field :name %> <% end %> - <% if f.object.errors[:email].present? %> -

<%= f.object.errors[:email].join(_(" and ")) %>

+ <% if f.object.errors[:name].present? %> +

<%= f.object.errors[:name].join(_(" and ")) %>

<% end %>
- - <% if ContactUs.require_subject %> -
- <%= f.label :subject, (_('Subject') + content_tag(:abbr, "*", class: "required")).html_safe %> - <%= f.text_field :subject %> - <% if f.object.errors[:subject].present? %> -

<%= f.object.errors[:subject].join(_(" and ")) %>

- <% end %> -
+ <% end %> + +
+ <%= f.label :email, (_('Email') + content_tag(:abbr, "*", class: "required")).html_safe %> + <% if user_signed_in? then %> + <%= f.email_field :email, value: current_user.email %> + <% else %> + <%= f.email_field :email %> <% end %> - + <% if f.object.errors[:email].present? %> +

<%= f.object.errors[:email].join(_(" and ")) %>

+ <% end %> +
+ + <% if ContactUs.require_subject %>
- <%= f.label :message, (_('Message') + content_tag(:abbr, "*", class: "required")).html_safe %> - <%= f.text_area :message, rows: 10, class: "input-large" %> - <% if f.object.errors[:message].present? %> -

<%= f.object.errors[:message].join(_(" and ")) %>

+ <%= f.label :subject, (_('Subject') + content_tag(:abbr, "*", class: "required")).html_safe %> + <%= f.text_field :subject %> + <% if f.object.errors[:subject].present? %> +

<%= f.object.errors[:subject].join(_(" and ")) %>

<% end %>
- - <% if !user_signed_in? then %> -
- <%= t('helpers.security_check') %> - <%= recaptcha_tags %> -
+ <% end %> + +
+ <%= f.label :message, (_('Message') + content_tag(:abbr, "*", class: "required")).html_safe %> + <%= f.text_area :message, rows: 10, class: "input-large" %> + <% if f.object.errors[:message].present? %> +

<%= f.object.errors[:message].join(_(" and ")) %>

<% end %> -
-
- -
- +
+ + <% if !user_signed_in? then %> +
+ <%= t('helpers.security_check') %> + <%= recaptcha_tags %> +
+ <% end %> + +
+
+ <%= render partial: 'shared/accessible_submit_button', + locals: {id: 'create_contact_submit', + val: 'Submit', + disabled_initially: true, + tooltip: _('Fill in required fields')} %> +
+ + <% end %>
diff --git a/app/views/plans/new.html.erb b/app/views/plans/new.html.erb index 11f8356..ea291b9 100644 --- a/app/views/plans/new.html.erb +++ b/app/views/plans/new.html.erb @@ -1,4 +1,4 @@ -<% javascript "plans/create_plan.js" %> +<% javascript "plans/new_plan.js" %>

<%= _('Create a new plan') %>

@@ -80,7 +80,10 @@ <%= render partial: 'shared/accessible_submit_button', - locals: {id: 'create_plan_submit', val: 'Create Plan', disabled_initially: true} %> + locals: {id: 'create_plan_submit', + val: 'Create Plan', + disabled_initially: true, + tooltip: _('You can not continue until you have filled in all of the required information.')} %> <% end %>
diff --git a/app/views/shared/_accessible_submit_button.html.erb b/app/views/shared/_accessible_submit_button.html.erb index d3a48ec..2966a91 100644 --- a/app/views/shared/_accessible_submit_button.html.erb +++ b/app/views/shared/_accessible_submit_button.html.erb @@ -7,9 +7,7 @@