Fixes email settings form

This commit is contained in:
Chrisbr 2014-04-28 20:31:44 +02:00
parent 810908089e
commit ba2051afc7
4 changed files with 8 additions and 7 deletions

View file

@ -3,10 +3,10 @@ class Admin::EmailsController < ApplicationController
def update
@conference.email_settings.update_attributes(params[:email_settings])
redirect_to(admin_conference_email_settings_path(@conference.short_title), :notice => 'Settings have been successfully updated.')
redirect_to(admin_conference_emails_path(@conference.short_title), :notice => 'Settings have been successfully updated.')
end
def show
def index
@settings = @conference.email_settings
end

View file

@ -18,8 +18,8 @@
= link_to "Social Events", admin_conference_social_events_path(@conference.short_title)
%li{:class=> active_nav_li(admin_conference_supporter_levels_path(@conference.short_title))}
= link_to "Supporter Levels", admin_conference_supporter_levels_path(@conference.short_title)
%li{:class=> active_nav_li(admin_conference_email_settings_path(@conference.short_title))}
= link_to "Emails", admin_conference_email_settings_path(@conference.short_title)
%li{:class=> active_nav_li(admin_conference_emails_path(@conference.short_title))}
= link_to "Emails", admin_conference_emails_path(@conference.short_title)
%li{:class=> active_nav_li(admin_conference_questions_path(@conference.short_title))}
= link_to "Questions", admin_conference_questions_path(@conference.short_title)
%li{:class=> active_nav_li(admin_conference_volunteers_info_path(@conference.short_title))}

View file

@ -24,7 +24,7 @@
%tr
%td {eventtitle}
%td The title of an accepted or rejected proposal
= semantic_form_for(@settings, :url => admin_conference_email_settings_path(@conference.short_title),:html => {:multipart => true}) do |f|
= semantic_form_for(@settings, :url => admin_conference_email_path(@conference.short_title, @conference.email_settings),:html => {:multipart => true}) do |f|
= f.input :send_on_registration, :label => false, :hint => "Send an email when the user registers for the conference?"
= f.input :registration_subject
= f.input :registration_email_template, :input_html => { :rows => 10, :cols => 20}

View file

@ -16,8 +16,8 @@ Osem::Application.routes.draw do
put "/registrations/edit" => "registrations#update"
delete "/registrations" => "registrations#delete"
put "/registrations/change_field" => "registrations#change_field"
get "/emailsettings" => "emails#show", :as => "email_settings"
put "/emailsettings" => "emails#update"
#get "/emailsettings" => "emails#show", :as => "email_settings"
#put "/emailsettings" => "emails#update"
get "/venue" => "venue#show", :as => "venue_info"
put "/venue" => "venue#update", :as => "venue_update"
get "/dietary_choices" => "dietchoices#show", :as => "dietary_list"
@ -35,6 +35,7 @@ Osem::Application.routes.draw do
resources :eventtype, :only => [ :show, :update, :index ]
resources :social_events, :only => [ :show, :update, :index ]
resources :supporter_levels, :only => [ :show, :update, :index ]
resources :emails, :only => [ :show, :update, :index ]
put "/questions/update_conference" => "questions#update_conference"
resources :questions
resources :events do