diff --git a/app/controllers/rsvps_controller.rb b/app/controllers/rsvps_controller.rb index 82d9f0e2d..32cfc9881 100644 --- a/app/controllers/rsvps_controller.rb +++ b/app/controllers/rsvps_controller.rb @@ -55,23 +55,8 @@ def update return end - @questionnaire.acc_status_date = Time.now if @questionnaire.acc_status != params[:questionnaire][:acc_status] - @questionnaire.acc_status = params[:questionnaire][:acc_status] - @questionnaire.acc_status_author_id = current_user.id - - new_bus_list_id = params[:questionnaire][:bus_list_id].presence - new_bus_list = new_bus_list_id && BusList.find(new_bus_list_id) - is_joining_bus = new_bus_list.present? && @questionnaire.bus_list != new_bus_list - if is_joining_bus && new_bus_list.full? - if @questionnaire.bus_list_id? - flash[:alert] = "Sorry, that bus is full. You are still signed up for the '#{@questionnaire.bus_list.name}' bus." - else - flash[:alert] = "Sorry, that bus is full. You may need to arrange other plans for transportation." - end - else - @questionnaire.bus_list = new_bus_list - @questionnaire.bus_captain_interest = params[:questionnaire][:bus_captain_interest] - end + update_acc_status + update_bus_list unless @questionnaire.save flash[:alert] = @questionnaire.errors.full_message.join(", ") @@ -91,6 +76,28 @@ def update private + def update_acc_status + @questionnaire.acc_status_date = Time.now if @questionnaire.acc_status != params[:questionnaire][:acc_status] + @questionnaire.acc_status = params[:questionnaire][:acc_status] + @questionnaire.acc_status_author_id = current_user.id + end + + def update_bus_list + new_bus_list_id = params[:questionnaire][:bus_list_id].presence + new_bus_list = new_bus_list_id && BusList.find(new_bus_list_id) + is_joining_bus = new_bus_list.present? && @questionnaire.bus_list != new_bus_list + if is_joining_bus && new_bus_list.full? + if @questionnaire.bus_list_id? + flash[:alert] = "Sorry, that bus is full. You are still signed up for the '#{@questionnaire.bus_list.name}' bus." + else + flash[:alert] = "Sorry, that bus is full. You may need to arrange other plans for transportation." + end + else + @questionnaire.bus_list = new_bus_list + @questionnaire.bus_captain_interest = params[:questionnaire][:bus_captain_interest] + end + end + def rsvp_error_notice hackathon_name = HackathonConfig['name'] "There was an error submitting your response, please check over your application and try again. Did you accept the #{hackathon_name} Agreement?" diff --git a/db/seed_messages/questionnaire--denied.md b/db/seed_messages/questionnaire--denied.md index b9449ae53..8763f3ea7 100644 --- a/db/seed_messages/questionnaire--denied.md +++ b/db/seed_messages/questionnaire--denied.md @@ -1,9 +1,3 @@ - diff --git a/docs/customization.md b/docs/customization.md index bfdfd60d2..205361771 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -9,11 +9,13 @@ Be sure to review all of these before going live! Various settings are available at http://your-site/manage/configs - be sure to review all of them! -## Emails +## Default Messages -Default automated emails are loaded into http://your-site/manage/messages. +Default automated Messages (or emails) are loaded into http://your-site/manage/messages. Please note some of the default Messages supplied are **awaiting content to be entered**. It is critical that all default Messages be reviewed to fit the needs of a particular hackathon. -The default email layout/template can also be customized if desired. Scroll to the bottom of http://your-site/manage/messages to customize. +The default Message layout/template can also be customized if desired. Scroll to the bottom of http://your-site/manage/messages to customize. + +To learn more about Messages and its capabilities, review the [Messages Guide](messages). ## Styling diff --git a/docs/getting-help.md b/docs/getting-help.md new file mode 100755 index 000000000..d17ff9e11 --- /dev/null +++ b/docs/getting-help.md @@ -0,0 +1,15 @@ +--- +id: resources +title: Resources +--- + +The HackathonManager community is here to help. While these docs are very much a work in progress, a lot of effort has gone into making HackathonManager as simple as possible to setup. If additional help is needed, resources can be found on this page. There is a large community of developers who want to see HackathonManager succeed so all questions are welcomed! + +> See an area in the docs we can improve on? Click the `EDIT` button on any page and open a pull request with the changes! Feedback from the community on our docs is **greatly appreciated**. + +## codeRIT Engineering +While outside development and collaboration on HackathonManager is much encouraged and appreciated, codeRIT oversees the development of the project. + +[Email codeRIT](mailto:engineering@coderit.org) - Send the codeRIT Engineering team an email with any questions or issues! + +> RIT organization using HackathonManager? We have a Slack for members of the RIT community! Ping codeRIT Engineering in #engineering at slack.coderit.org \ No newline at end of file diff --git a/website/sidebars.json b/website/sidebars.json index f030ac1aa..f4bc34a69 100755 --- a/website/sidebars.json +++ b/website/sidebars.json @@ -12,6 +12,7 @@ "updating-hm" ], "Guides": ["running-a-hackathon", "questionnaires", "messages", "busses"], - "Development": ["api"] + "Development": ["api"], + "Getting Help": ["resources"] } }