Skip to content
Snippets Groups Projects
Commit 50f179d2 authored by NGUYEN Bao's avatar NGUYEN Bao
Browse files

Issue #3446590: Support multi-value image/file fields

parent 61edf396
Branches
Tags
No related merge requests found
Pipeline #170376 passed with warnings
......@@ -3,9 +3,11 @@
let field = drupalSettings.ocr_field_widget.field;
let ocr = drupalSettings.ocr_field_widget.ocr;
if(field != '' && $("input[name*='" + field + "[0][value]']").length){
ocr = $.trim($("input[name*='" + field + "[0][value]']").val() + ' ' + orc);
$("input[name*='" + field + "[0][value]']").val(ocr);
}
if(field != '' && $("textarea[name*='" + field + "[0][value]']").length){
ocr = $.trim($("textarea[name*='" + field + "[0][value]']").val() + ' ' + ocr);
$("textarea[name*='" + field + "[0][value]']").val(ocr);
let editorId = $("textarea[name*='" + field + "[0][value]']").prop("id");
if(typeof CKEDITOR !== 'undefined' && CKEDITOR.instances[editorId] != undefined){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment