mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-21 18:31:37 +02:00
Fix filemanager customfield was not handling required properly, blocking submit
This commit is contained in:
parent
e70974a8e5
commit
559099ee05
@ -798,23 +798,28 @@ export class et2_customfields_list extends et2_valueWidget implements et2_IDetac
|
|||||||
.appendTo(row);
|
.appendTo(row);
|
||||||
|
|
||||||
// Create upload widget
|
// Create upload widget
|
||||||
let widget = this.widgets[field_name] = <et2_DOMWidget>et2_createWidget(attrs.type ? attrs.type : field.type, attrs, this);
|
let widget = this.widgets[field_name] = <et2_DOMWidget>et2_createWidget(attrs.type ? attrs.type : field.type, {...attrs}, this);
|
||||||
|
|
||||||
// This controls where the widget is placed in the DOM
|
// This controls where the widget is placed in the DOM
|
||||||
this.rows[attrs.id] = cf[0];
|
this.rows[attrs.id] = cf[0];
|
||||||
jQuery(widget.getDOMNode(widget)).css('vertical-align','top');
|
jQuery(widget.getDOMNode(widget)).css('vertical-align','top');
|
||||||
|
|
||||||
// Add a link to existing VFS file
|
// Add a link to existing VFS file
|
||||||
const select_attrs = jQuery.extend({},
|
const required = attrs.needed ?? attrs.required;
|
||||||
attrs,
|
delete attrs.needed;
|
||||||
|
const select_attrs = {
|
||||||
|
...attrs,
|
||||||
// Filemanager select
|
// Filemanager select
|
||||||
{
|
...{
|
||||||
path: '~',
|
path: '~',
|
||||||
mode: widget.options.multiple ? 'open-multiple' : 'open',
|
mode: widget.options.multiple ? 'open-multiple' : 'open',
|
||||||
method: 'EGroupware\\Api\\Etemplate\\Widget\\Link::ajax_link_existing',
|
method: 'EGroupware\\Api\\Etemplate\\Widget\\Link::ajax_link_existing',
|
||||||
methodId: attrs.path,
|
methodId: attrs.path,
|
||||||
buttonLabel: this.egw().lang('Link')
|
buttonLabel: this.egw().lang('Link')
|
||||||
}, {type: 'et2-vfs-select'});
|
},
|
||||||
|
type: 'et2-vfs-select',
|
||||||
|
required: required
|
||||||
|
}
|
||||||
select_attrs.id = attrs.id + '_vfs_select';
|
select_attrs.id = attrs.id + '_vfs_select';
|
||||||
|
|
||||||
// This controls where the button is placed in the DOM
|
// This controls where the button is placed in the DOM
|
||||||
|
Loading…
x
Reference in New Issue
Block a user