Browse Source

Improvements to the contact form

development
Godwin 8 years ago
parent
commit
46c8443bc6
  1. 14
      app/assets/stylesheets/_application.scss
  2. 2
      app/views/application/_contact.html.haml
  3. 54
      app/views/layouts/application.html.haml

14
app/assets/stylesheets/_application.scss

@ -2193,6 +2193,20 @@ body {
font-size: 2em;
margin-bottom: 1em;
}
#contact-dlg {
.title {
background-color: $colour-4;
}
.email-field {
margin-top: 2em;
}
textarea {
min-height: 7.5em;
}
}
}
@include keyframes(fade-out) {

2
app/views/application/_contact.html.haml

@ -1,4 +1,4 @@
= form_tag contact_send_path do
= form_tag contact_send_path, class: 'contact-form' do
= emailfield :email, nil, big: true, required: true unless logged_in?
= contact_reason_select
= textfield :subject, nil, required: true, big: true

54
app/views/layouts/application.html.haml

@ -46,33 +46,33 @@
.dlg-content
%h2.title=_'articles.contact.headings.contact'
.dlg-inner= render 'contact', cancel_btn: true
- if @confirmation_dlg.present?
.dlg#confirmation-dlg
.dlg-content
%h2.title=_'modals.confirm'
.dlg-inner
%p.message=''
%a.button.confirm=_'modals.yes_button'
%button.delete.close=_'modals.no_button'
- if @info_dlg.present?
.dlg#info-dlg
.dlg-content
%h2.title=_'modals.info'
.dlg-inner
%p.message=''
%button.close=_'modals.done_button'
- if @login_dlg.present?
.dlg#login-dlg
.dlg-content
%h2.title=_'forms.actions.generic.login'
.dlg-inner
= form_tag do_confirm_path, class: 'flex-form' do
= hidden_field_tag :dest, settings_path
= emailfield :email, nil, big: true
= button_tag :continue, :value => :confirm_email
.flex-form
= link_to (_'forms.actions.generic.facebook_sign_in','Facebook Sign In'), auth_at_provider_path(provider: :facebook, dest: settings_path), class: [:button, :facebook]
%button.close.subdued=_'forms.actions.generic.cancel'
- if @confirmation_dlg.present?
.dlg#confirmation-dlg
.dlg-content
%h2.title=_'modals.confirm'
.dlg-inner
%p.message=''
%a.button.confirm=_'modals.yes_button'
%button.delete.close=_'modals.no_button'
- if @info_dlg.present?
.dlg#info-dlg
.dlg-content
%h2.title=_'modals.info'
.dlg-inner
%p.message=''
%button.close=_'modals.done_button'
- if @login_dlg.present?
.dlg#login-dlg
.dlg-content
%h2.title=_'forms.actions.generic.login'
.dlg-inner
= form_tag do_confirm_path, class: 'flex-form' do
= hidden_field_tag :dest, settings_path
= emailfield :email, nil, big: true
= button_tag :continue, :value => :confirm_email
.flex-form
= link_to (_'forms.actions.generic.facebook_sign_in','Facebook Sign In'), auth_at_provider_path(provider: :facebook, dest: settings_path), class: [:button, :facebook]
%button.close.subdued=_'forms.actions.generic.cancel'
= yield :footer_scripts if content_for?(:footer_scripts)
= inline_scripts

Loading…
Cancel
Save