Added contact forms to error pages

This commit is contained in:
Godwin
2016-07-19 19:01:11 -07:00
parent 4e6559d18b
commit 32a0f02db2
6 changed files with 21 additions and 9 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
= render :partial => 'application/header', :locals => {:image_file => nil}
= row do
= columns(medium: 12) do
= paragraph(_'error.404.description', :p)
%p= _'error.404.description', :p
= render 'contact', cancel_btn: false, contact_reason: :website
+3 -1
View File
@@ -1,4 +1,6 @@
= render :partial => 'application/header', :locals => {:image_file => 'parts.jpg'}
= row do
= columns(medium: 12) do
= paragraph(_'error.500.description', :p)
%p= _'error.500.description', :p
= render 'contact', cancel_btn: false, contact_reason: :website
+5 -1
View File
@@ -1,6 +1,10 @@
- contact_reason ||= nil
= form_tag contact_send_path, class: 'contact-form' do
= emailfield :email, nil, big: true, required: true unless logged_in?
= contact_reason_select
- if contact_reason.present?
= hidden_field_tag :reason, contact_reason
- else
= contact_reason_select
= textfield :subject, nil, required: true, big: true
= textarea :message, nil, required: true, plain: true
.actions
@@ -1,10 +1,13 @@
= render :partial => 'application/header', :locals => {:image_file => 'runes.jpg'}
= row do
= columns(medium: 12) do
= paragraph(_'error.locale_not_available.description', :p, @main_title_vars)
%p= _'error.locale_not_available.description', :p, @main_title_vars
%ul.locales
- @alt_lang_urls.each do |locale, url|
%li
- locale_translation = language(locale, true)
%a.button{href: url, lang: locale}
=_'translate.content.change_locale', "Read in #{locale_translation}", vars: {language: locale_translation}, locale: locale
%h2= _'error.locale_not_available.volunteer.title'
%p= _'error.locale_not_available.volunteer.description'
= render 'contact', cancel_btn: false, contact_reason: :website
@@ -7,3 +7,4 @@
= columns do
%h2=_'error.403.title','Sorry, you currently don\'t have access to this page'
%p=_'error.403.description', :p
= render 'contact', cancel_btn: false, contact_reason: :website