small html fix

This commit is contained in:
rulingcom 2025-04-17 01:13:36 +08:00
parent 2db0db7aef
commit 3bd2ad8590
1 changed files with 1 additions and 1 deletions

View File

@ -366,7 +366,7 @@ module Admin::AsksHelper
file_value = value[0] rescue nil
file_path = value[1] rescue nil
file_required = v['required']=='true'
readonly ? (file_value ? "<img src=\"#{file_path}\" alt=\"#{file_value}\">" : "") : "<div class=\"file-selector\"><label class=\"ui-button\">
readonly ? (file_value ? "<img src=\"#{file_path}\" alt=\"#{file_value}\">".html_safe : "") : "<div class=\"file-selector\"><label class=\"ui-button\">
#{file_field_tag(field_name, {:data => {'image-src' => file_path}, style: "position: absolute;width:0.1em;padding: 0;border: 0;opacity: 0;left: 50%;top: 0;", :class => 'upload', :required => file_required, value: file_value, accept: "image/*"})}
<i class=\"fa fa-photo\"></i> #{t('ask.upload_image')}
</label><div class=\"filename\"></div></div>"