removed bugs

This commit is contained in:
Harry Bomrah 2017-03-08 15:06:40 +08:00
parent f1154d6c37
commit 5c96331c7f
4 changed files with 23 additions and 9 deletions

View File

@ -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

View File

@ -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

View File

@ -54,11 +54,19 @@
<% end %>
</table>
<% if @site_request.request_contract %>
<% case @site_request.type %>
<% when "newsite" %>
<a class="btn btn-primary" href="<%= make_contract_admin_client_management_path(@site_request.id) %>">Make Contract</a>
<% when "existing" %>
<a class="btn btn-primary" href="<%= make_contract_admin_client_management_path(@site_request.id) %>">Make Contract</a>
<% when "addsites" %>
<%= render :partial => "add_site_spec" %>
<% end %>
<% else %>
<% when "newsite" %>
<a class="btn btn-primary" href="<%= edit_contract_admin_client_management_path(@site_request.id) %>">Edit Contract</a>
<% when "existing" %>
<a class="btn btn-primary" href="<%= edit_contract_admin_client_management_path(@site_request.id) %>">Edit Contract</a>
<% when "addsites" %>
<% end %>
<% end %>

View File

@ -7,6 +7,7 @@ Rails.application.routes.draw do
member do
get "make_contract"
post "create_contract"
get "edit_contract"
end
end
end