mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
Fix single-field customfields widgets not setting value properly
This commit is contained in:
parent
9fc67020cc
commit
1f88ddf303
@ -63,7 +63,7 @@
|
||||
<menulist>
|
||||
<menupopup id="${row}[cf_type2]" no_lang="1" multiple="true" empty_label="All"/>
|
||||
</menulist>
|
||||
<description id="${row}[cf_name]" />
|
||||
<description id="${row}[cf_name]" no_lang="1" />
|
||||
<vbox>
|
||||
<description id="${row}[cf_label]" no_lang="1"/>
|
||||
<description id="${row}[cf_label]"/>
|
||||
|
@ -371,7 +371,7 @@ class etemplate_widget_customfields extends etemplate_widget_transformer
|
||||
{
|
||||
self::set_validation_error($field,lang('Field must not be empty !!!'),'');
|
||||
}
|
||||
$field_name = self::form_name($form_name != self::GLOBAL_ID ? $form_name : $cname, $field);
|
||||
$field_name = $this->id[0] == self::$prefix && $customfields[substr($this->id,1)] ? $this->id : self::form_name($form_name != self::GLOBAL_ID ? $form_name : $cname, $field);
|
||||
$valid =& self::get_array($validated, $field_name, true);
|
||||
|
||||
if (is_array($valid)) $valid = implode(',', $valid);
|
||||
|
@ -290,6 +290,12 @@ var et2_customfields_list = et2_valueWidget.extend([et2_IDetachedDOM, et2_IInput
|
||||
var val = contentMgr.getEntry(this.id);
|
||||
_attrs["value"] = {};
|
||||
if (val !== null)
|
||||
{
|
||||
if(this.id.indexOf(this.prefix) === 0 && data.fields[this.id.replace(this.prefix,'')] === true)
|
||||
{
|
||||
_attrs['value'][this.id] = val;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Only set the values that match desired custom fields
|
||||
for(var key in val)
|
||||
@ -298,6 +304,7 @@ var et2_customfields_list = et2_valueWidget.extend([et2_IDetachedDOM, et2_IInput
|
||||
_attrs["value"][key] = val[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
//_attrs["value"] = val;
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user