diff --git a/app/controllers/admin/client_managements_controller.rb b/app/controllers/admin/client_managements_controller.rb index 4327c90..3e01075 100644 --- a/app/controllers/admin/client_managements_controller.rb +++ b/app/controllers/admin/client_managements_controller.rb @@ -16,10 +16,16 @@ class Admin::ClientManagementsController < OrbitAdminController end def create_contract - RequestContract.create(contract_params) + rc = RequestContract.create(contract_params) + sr = SiteRequest.find(contract_params[:site_request]) + sr.request_contract = rc + sr.save redirect_to admin_client_managements_path end + def edit_contract + end + private def contract_params diff --git a/app/mailers/reset_c_panel_password_mailer.rb b/app/mailers/reset_c_panel_password_mailer.rb index e2f0c1f..18b0824 100644 --- a/app/mailers/reset_c_panel_password_mailer.rb +++ b/app/mailers/reset_c_panel_password_mailer.rb @@ -12,7 +12,6 @@ class ResetCPanelPasswordMailer < ActionMailer::Base def send_user_confirmation(user) @confirmation_token = user.confirmation_token @user_id = user.id - confirm_email @url = "http://storedemo.pending.rulingcom.com/cpanel/confirm_email?id=#{@user_id}&token=#{@confirmation_token}" mail(:to => user.email, :subject => "Orbit - Confirm Email") end diff --git a/app/views/admin/client_managements/show.html.erb b/app/views/admin/client_managements/show.html.erb index b51f489..e938b24 100644 --- a/app/views/admin/client_managements/show.html.erb +++ b/app/views/admin/client_managements/show.html.erb @@ -54,11 +54,19 @@ <% end %> -<% case @site_request.type %> -<% when "newsite" %> - Make Contract -<% when "existing" %> - Make Contract -<% when "addsites" %> - <%= render :partial => "add_site_spec" %> +<% if @site_request.request_contract %> + <% case @site_request.type %> + <% when "newsite" %> + Make Contract + <% when "existing" %> + Make Contract + <% when "addsites" %> + <% end %> +<% else %> + <% when "newsite" %> + Edit Contract + <% when "existing" %> + Edit Contract + <% when "addsites" %> + <% end %> <% end %> \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index f1a8c2a..a4b8d22 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -7,6 +7,7 @@ Rails.application.routes.draw do member do get "make_contract" post "create_contract" + get "edit_contract" end end end