removed bugs
This commit is contained in:
parent
f1154d6c37
commit
5c96331c7f
|
@ -16,10 +16,16 @@ class Admin::ClientManagementsController < OrbitAdminController
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_contract
|
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
|
redirect_to admin_client_managements_path
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def edit_contract
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def contract_params
|
def contract_params
|
||||||
|
|
|
@ -12,7 +12,6 @@ class ResetCPanelPasswordMailer < ActionMailer::Base
|
||||||
def send_user_confirmation(user)
|
def send_user_confirmation(user)
|
||||||
@confirmation_token = user.confirmation_token
|
@confirmation_token = user.confirmation_token
|
||||||
@user_id = user.id
|
@user_id = user.id
|
||||||
confirm_email
|
|
||||||
@url = "http://storedemo.pending.rulingcom.com/cpanel/confirm_email?id=#{@user_id}&token=#{@confirmation_token}"
|
@url = "http://storedemo.pending.rulingcom.com/cpanel/confirm_email?id=#{@user_id}&token=#{@confirmation_token}"
|
||||||
mail(:to => user.email, :subject => "Orbit - Confirm Email")
|
mail(:to => user.email, :subject => "Orbit - Confirm Email")
|
||||||
end
|
end
|
||||||
|
|
|
@ -54,11 +54,19 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<% case @site_request.type %>
|
<% if @site_request.request_contract %>
|
||||||
<% when "newsite" %>
|
<% case @site_request.type %>
|
||||||
|
<% when "newsite" %>
|
||||||
<a class="btn btn-primary" href="<%= make_contract_admin_client_management_path(@site_request.id) %>">Make Contract</a>
|
<a class="btn btn-primary" href="<%= make_contract_admin_client_management_path(@site_request.id) %>">Make Contract</a>
|
||||||
<% when "existing" %>
|
<% when "existing" %>
|
||||||
<a class="btn btn-primary" href="<%= make_contract_admin_client_management_path(@site_request.id) %>">Make Contract</a>
|
<a class="btn btn-primary" href="<%= make_contract_admin_client_management_path(@site_request.id) %>">Make Contract</a>
|
||||||
<% when "addsites" %>
|
<% 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 %>
|
<% end %>
|
|
@ -7,6 +7,7 @@ Rails.application.routes.draw do
|
||||||
member do
|
member do
|
||||||
get "make_contract"
|
get "make_contract"
|
||||||
post "create_contract"
|
post "create_contract"
|
||||||
|
get "edit_contract"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue