From f93a11d638bab2e1bcb98f7ec81259891591d69a Mon Sep 17 00:00:00 2001 From: BOHUNG Date: Wed, 4 Mar 2020 12:07:05 +0800 Subject: [PATCH] fix bugs(choose float field will get no value) in version 1. --- .../admin/cancerpredicts_controller.rb | 90 +++++++++++-------- 1 file changed, 51 insertions(+), 39 deletions(-) diff --git a/app/controllers/admin/cancerpredicts_controller.rb b/app/controllers/admin/cancerpredicts_controller.rb index df2b65e..cc6daf2 100644 --- a/app/controllers/admin/cancerpredicts_controller.rb +++ b/app/controllers/admin/cancerpredicts_controller.rb @@ -265,22 +265,26 @@ class Admin::CancerpredictsController < OrbitAdminController end if @field_property["is_num"] == 1 if @field_property["is_float"] == 1 - @table_str_left += '
' + @table_str_left += '
' else - @table_str_left += '
' - @table_str_left += '' - @table_str_left += '' - @please_choice = (current_locale.to_s == "zh_tw") ? "請選擇" : "Please choice" - @table_str_left += '
' + else + @table_str_left += '
' + @table_str_left += '' + @table_str_left += '' + @please_choice = (current_locale.to_s == "zh_tw") ? "請選擇" : "Please choice" + @table_str_left += '
' end - for @num in @field_property["range"][0] .. @field_property["range"][1] - @table_str_left += ('') - end - @table_str_left += '' end else @table_str_left += '
' @@ -320,22 +324,26 @@ class Admin::CancerpredictsController < OrbitAdminController end if @field_property["is_num"] == 1 if @field_property["is_float"] == 1 - @table_str_right += '
' + @table_str_right += '
' else - @table_str_right += '
' - @table_str_right += '' - @table_str_right += '' - @please_choice = (current_locale.to_s == "zh_tw") ? "請選擇" : "Please choice" - @table_str_right += '
' + else + @table_str_right += '
' + @table_str_right += '' + @table_str_right += '' + @please_choice = (current_locale.to_s == "zh_tw") ? "請選擇" : "Please choice" + @table_str_right += '
' end - for @num in @field_property["range"][0] .. @field_property["range"][1] - @table_str_right += ('') - end - @table_str_right += '
' end else @table_str_right += '
' @@ -407,22 +415,26 @@ class Admin::CancerpredictsController < OrbitAdminController end if @field_property["is_num"] == 1 if @field_property["is_float"] == 1 - @table_result_choice_fileds += '
' + @table_result_choice_fileds += '
' else - @table_result_choice_fileds += '
' - @table_result_choice_fileds += '
' - @table_str_left += '' - @please_choice = (current_locale.to_s == "zh_tw") ? "請選擇" : "Please choice" - @table_result_choice_fileds += '
' + else + @table_result_choice_fileds += '
' + @table_result_choice_fileds += '
' + @table_str_left += '' + @please_choice = (current_locale.to_s == "zh_tw") ? "請選擇" : "Please choice" + @table_result_choice_fileds += '
' end - for @num in @field_property["range"][0] .. @field_property["range"][1] - @table_result_choice_fileds += ('') - end - @table_result_choice_fileds += '
' end else @table_result_choice_fileds += '
'