fix next line and carriage

This commit is contained in:
rulingcom 2025-07-31 22:56:22 +08:00
parent 5c143daab1
commit d7882b83d6
5 changed files with 4 additions and 5 deletions

View File

@ -364,7 +364,6 @@ class Admin::AsksController < OrbitAdminController
def update def update
locale = I18n.locale locale = I18n.locale
temp_params = params.require(:ask_question).permit! temp_params = params.require(:ask_question).permit!
all_to_save = [] all_to_save = []
ask_setting = AskCategorySetting.where(category_id: params['ask_question']['category_id']).first ask_setting = AskCategorySetting.where(category_id: params['ask_question']['category_id']).first
if ask_setting.nil? if ask_setting.nil?

View File

@ -492,7 +492,7 @@ class AsksController < ApplicationController
acknowledgement = AskAcknowledgement.where(:category_id => params['category']).first rescue nil acknowledgement = AskAcknowledgement.where(:category_id => params['category']).first rescue nil
content = acknowledgement.nil? ? t('ask.thank_text') : acknowledgement.content content = acknowledgement.nil? ? t('ask.thank_text') : acknowledgement.content
{ {
"content" => content #[I18n.locale] "content" => content[I18n.locale]
} }
end end

View File

@ -307,7 +307,7 @@ module Admin::AsksHelper
end end
end end
when 'text_area' when 'text_area'
readonly ? value : text_area_tag(field_name,value,{:required => v['required']=='true',:placeholder=> v['prompt_word'][I18n.locale],:title=> v['prompt_word'][I18n.locale],:class=>'ckeditor'}) readonly ? value.to_s.gsub("\n", "<br/>").gsub("\r", "").html_safe : text_area_tag(field_name,value,{:required => v['required']=='true',:placeholder=> v['prompt_word'][I18n.locale],:title=> v['prompt_word'][I18n.locale],:class=>'ckeditor'})
when 'radio_button' when 'radio_button'
options_hash = Hash(v['options']) options_hash = Hash(v['options'])
if lock if lock

View File

@ -95,7 +95,7 @@
end end
%> %>
<th><%= trans %></th> <th><%= trans %></th>
<td><%= val %></td> <td><%= val.to_s.gsub("\n", "<br/>").gsub("\r", "").html_safe %></td>
</tr> </tr>
<% end %> <% end %>
<% else %> <% else %>

View File

@ -5,7 +5,7 @@
</head> </head>
<body> <body>
<p> <p>
<%= @data['validation_email_content'].to_s.gsub(/[(\n)(\r)]/, "\n" => "<br/>", "\r" => "" ).html_safe %> <%= @data['validation_email_content'].to_s.gsub("\n", "<br/>").gsub("\r", "").html_safe %>
</p> </p>
<br /> <br />
<% if @data['referer_link'] %> <% if @data['referer_link'] %>