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

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

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

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

View File

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

View File

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

View File

@ -5855,19 +5855,20 @@ en:
Translate: Edit %{language} version
error:
'403':
description: You do not currently have sufficient permissions to access this page. If you believe this is an error, please contact us or file an issue.
description: You do not currently have sufficient permissions to access this page. If you believe this is an error, please contact us.
title: You do not have access to this page
'404':
description: Sorry, we couldn't find the page you were looking for. If you really
believe that it should exist please contact admin@bikebike.org or file an
issue on github: https://github.com/bikebike/BikeBike/issues
description: The page you are looking for could not be found. If you think this was in error, please contact us.
title: '404: This page doesn''t exist'
locale_not_available:
description: This site has yet to be translated into %{language}. We are actively looking for volunteers who can translate existing copy and new copy as we add new features. If you think you can help, please contact us!
title: '404: %{language} Translations Missing'
volunteer:
title: Can you help us translate?
description: 'If you can help us translate this or any other language, please let us know by contacting us using the form below:'
'500':
title: There is a problem
description: 'An error has occurred, details about the error have been sent to our development team. In addition, you may contact us or report an issue.'
description: 'An error has occurred, details about the error have been sent to our development team. In addition, you may contact us using the form below to let us better understand what happened and how you were affected.'
roles:
workshops:
facilitator: