From 4fe4916ed38c3cb735b36b925cd41fdab23fc22a Mon Sep 17 00:00:00 2001 From: bmv root Date: Thu, 4 May 2017 12:56:41 -0400 Subject: [PATCH] New grade form added --- .../app/controllers/grades_controller.rb | 4 + .../controllers/registrations_controller.rb | 8 +- Pearlception/app/views/grades/new.html.erb | 122 ++++++++++++++++++ 3 files changed, 130 insertions(+), 4 deletions(-) create mode 100644 Pearlception/app/views/grades/new.html.erb diff --git a/Pearlception/app/controllers/grades_controller.rb b/Pearlception/app/controllers/grades_controller.rb index 2d197f1..b62cf36 100644 --- a/Pearlception/app/controllers/grades_controller.rb +++ b/Pearlception/app/controllers/grades_controller.rb @@ -1,6 +1,10 @@ class GradesController < ApplicationController before_filter :deny_to_visitors + def new + + end + def index @grades = Grade.all end diff --git a/Pearlception/app/controllers/registrations_controller.rb b/Pearlception/app/controllers/registrations_controller.rb index 3b8ced9..6a70f42 100644 --- a/Pearlception/app/controllers/registrations_controller.rb +++ b/Pearlception/app/controllers/registrations_controller.rb @@ -25,16 +25,16 @@ class RegistrationsController < Devise::RegistrationsController end else flash[:alert] = "The serial key provided was invalid." - redirect_to '/' + redirect_to '/signin' end else flash[:alert] = "A company serial key must be provided to register." - redirect_to '/' + redirect_to '/signin' end if @user == "" flash[:alert] = "Please provide a password to register with." - redirect_to '/' + redirect_to '/signin' else @user.save begin @@ -46,7 +46,7 @@ class RegistrationsController < Devise::RegistrationsController if !@user.admin Apartment::Tenant.switch(Company.find(@user.company_id).company_name.gsub(/'/,'').gsub(/\s/,'')) end - redirect_to "/" and return + redirect_to "/pearlception" and return end end diff --git a/Pearlception/app/views/grades/new.html.erb b/Pearlception/app/views/grades/new.html.erb new file mode 100644 index 0000000..f9cea75 --- /dev/null +++ b/Pearlception/app/views/grades/new.html.erb @@ -0,0 +1,122 @@ +<%= stylesheet_link_tag "dashboard" %>_ + + + + +
+
+ +
+
+ + +
+
+ <%=csrf_meta_tag%> +
+ + +
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+ + +
+
+
+ +
+
+ + <%= javascript_include_tag "bootstrap.min" %>_ +