fix for next and save employee portfolio

This commit is contained in:
Harry Bomrah 2018-01-22 17:28:14 +08:00
parent 50d98ae5b9
commit 78f412e50c
3 changed files with 9 additions and 7 deletions

View File

@ -467,13 +467,13 @@ class RecruitmentsController < PseudoSessionController
if @profile.is_employer?
redirect_to mydashboard_path
elsif @profile.is_employee?
if params[:commit] == "Next"
if params[:commit] == "Next" || params[:commit] == "下一個"
if params[:step] == "step3"
redirect_to employee_experience_path
elsif params[:step] == "step1"
redirect_to employee_academics_path
end
elsif params[:commit] == "Save"
elsif params[:commit] == "Save" || params[:commit] == "儲存"
redirect_to mydashboard_path
end
end

View File

@ -180,9 +180,11 @@
</div>
<script type="text/javascript">
$(function() {
// $("#portfolioForm").submit(function() {
// $(this).find(":input").filter(function(){ return !this.value; }).attr("disabled", "disabled");
// return true; // ensure form still submits
// });
$("#portfolioForm").submit(function() {
$(this).find(":input").not("textarea.ckeditor").filter(function(){
return !this.value;
}).attr("disabled", "disabled");
return true; // ensure form still submits
});
});
</script>

View File

@ -91,7 +91,7 @@
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<a data-method="delete" data-confirm="Are you sure?" href="/recruit/<%= rec.id.to_s %>/delete_employee_recommendation" class="btn btn-danger"><%= t("recruitment.delete") %></a>
<a data-method="delete" data-confirm="Are you sure?" href="/recruit/<%= rec.id.to_s %>/delete_employee_recommendation" class="btn btn-danger"><%= t("delete_") %></a>
</div>
</div>
</div>