fix employers account_settings form
This commit is contained in:
parent
069adb6c7b
commit
87682c2cf4
|
@ -644,7 +644,9 @@ class RecruitmentsController < PseudoSessionController
|
||||||
if params[:password].present?
|
if params[:password].present?
|
||||||
if pu.update_password(params[:password],params[:password_confirmation])
|
if pu.update_password(params[:password],params[:password_confirmation])
|
||||||
profile = @profile.profile
|
profile = @profile.profile
|
||||||
profile.active = params[:active].present?
|
if @profile.is_employee?
|
||||||
|
profile.active = params[:active].present?
|
||||||
|
end
|
||||||
profile.save
|
profile.save
|
||||||
redirect_to mydashboard_path
|
redirect_to mydashboard_path
|
||||||
else
|
else
|
||||||
|
@ -652,7 +654,9 @@ class RecruitmentsController < PseudoSessionController
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
profile = @profile.profile
|
profile = @profile.profile
|
||||||
profile.active = params[:active].present?
|
if @profile.is_employee?
|
||||||
|
profile.active = params[:active].present?
|
||||||
|
end
|
||||||
profile.save
|
profile.save
|
||||||
redirect_to mydashboard_path
|
redirect_to mydashboard_path
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,12 +6,14 @@
|
||||||
<div class="alert alert-danger"><%= t("recruitment.pass_confirm_pass_do_not_match") %></div>
|
<div class="alert alert-danger"><%= t("recruitment.pass_confirm_pass_do_not_match") %></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<form class="form-horizontal" action="/recruit/update_settings" method="post">
|
<form class="form-horizontal" action="/recruit/update_settings" method="post">
|
||||||
|
<% if @profile.is_employee? %>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-2 control-label"><%= t("recruitment.search_active") %></label>
|
<label class="col-sm-2 control-label"><%= t("recruitment.search_active") %></label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="checkbox" name="active" value="true" <%= @profile.profile.active ? "checked" : "" %> />
|
<input type="checkbox" name="active" value="true" <%= @profile.profile.active ? "checked" : "" %> />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<% end %>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="password" class="col-sm-2 control-label"><%= t("pseudo_members.password") %></label>
|
<label for="password" class="col-sm-2 control-label"><%= t("pseudo_members.password") %></label>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
|
|
Loading…
Reference in New Issue