Fixed NPE on schedule

This commit is contained in:
Godwin
2016-12-11 21:30:08 -08:00
parent c85d6c7d75
commit b89fa43b0e
4 changed files with 63 additions and 61 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
= render :partial => 'application/header', :locals => {:image_file => 'parts.jpg'}
= row do
= columns(medium: 12) do
%p= _'error.500.description', :p
= render 'contact', cancel_btn: false, contact_reason: :website
= columns(medium: 12) do
%p= _'error.500.description', :p
= render 'contact', cancel_btn: false, contact_reason: :website
+11 -11
View File
@@ -1,14 +1,14 @@
- contact_reason ||= nil
- locale ||= nil
= form_tag (locale.present? ? contact_send_url : url_for_locale(locale, contact_send_path)), class: 'contact-form' do
= emailfield :email, nil, big: true, required: true unless logged_in?
- 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
= button_tag :send, value: :send
- if cancel_btn
%button.close.subdued=_'forms.actions.generic.cancel'
= emailfield :email, nil, big: true, required: true unless logged_in?
- 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
= button_tag :send, value: :send
- if cancel_btn
%button.close.subdued=_'forms.actions.generic.cancel'