Fix bug.
This commit is contained in:
parent
0f348008d8
commit
22c37e3cb8
|
@ -436,6 +436,7 @@ class Admin::ApplicationFormsController < OrbitAdminController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
def copy
|
def copy
|
||||||
|
@application_form_setting = ApplicationFormSetting.first
|
||||||
@application_form = ApplicationFormMain.find(params[:id]).clone_new
|
@application_form = ApplicationFormMain.find(params[:id]).clone_new
|
||||||
@members = @application_form.reviewer_ids_list.collect{|r_ids| MemberProfile.where(:id.in=>Array(r_ids)).to_a}
|
@members = @application_form.reviewer_ids_list.collect{|r_ids| MemberProfile.where(:id.in=>Array(r_ids)).to_a}
|
||||||
|
|
||||||
|
@ -863,9 +864,15 @@ class Admin::ApplicationFormsController < OrbitAdminController
|
||||||
params.require(:application_form_template_setting).permit!
|
params.require(:application_form_template_setting).permit!
|
||||||
end
|
end
|
||||||
def application_form_params
|
def application_form_params
|
||||||
|
if params.has_key?(:application_form_main)
|
||||||
tmp = params.require(:application_form_main).permit!
|
tmp = params.require(:application_form_main).permit!
|
||||||
|
if tmp['reviewer_enables']
|
||||||
tmp['reviewer_ids_list'] = tmp['reviewer_enables'].map{|k,i| Array((tmp['reviewer_ids_list'][k] rescue []))}
|
tmp['reviewer_ids_list'] = tmp['reviewer_enables'].map{|k,i| Array((tmp['reviewer_ids_list'][k] rescue []))}
|
||||||
tmp['reviewer_enables'] = tmp['reviewer_enables'].map{|k,v| v.to_i != 0 ? true : false}
|
tmp['reviewer_enables'] = tmp['reviewer_enables'].map{|k,v| v.to_i != 0 ? true : false}
|
||||||
|
end
|
||||||
|
else
|
||||||
|
tmp = {}
|
||||||
|
end
|
||||||
tmp
|
tmp
|
||||||
end
|
end
|
||||||
def create_set (save_flag)
|
def create_set (save_flag)
|
||||||
|
|
Loading…
Reference in New Issue