From d57bcd12ac5ab1f43330500e4a8ec1573f7ded15 Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 24 Apr 2023 13:27:57 -0600 Subject: [PATCH] Fix missing entry values --- api/js/etemplate/et2_widget_entry.ts | 2 +- api/src/Etemplate/Widget/Contact.php | 21 ++++++++++----------- api/src/Etemplate/Widget/Entry.php | 4 ++-- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/api/js/etemplate/et2_widget_entry.ts b/api/js/etemplate/et2_widget_entry.ts index f926e18ee8..b4eb0ba9a5 100644 --- a/api/js/etemplate/et2_widget_entry.ts +++ b/api/js/etemplate/et2_widget_entry.ts @@ -90,7 +90,7 @@ export class et2_entry extends et2_valueWidget // Often the ID conflicts, so check prefix if(_attrs.id && _attrs.id.indexOf(et2_entry.prefix) < 0) { - _attrs.id = et2_entry.prefix + _attrs.id; + this.id = _attrs.id = et2_entry.prefix + _attrs.id; } let value = _attrs.value; diff --git a/api/src/Etemplate/Widget/Contact.php b/api/src/Etemplate/Widget/Contact.php index c9e43a32f2..1b65a4b7cd 100644 --- a/api/src/Etemplate/Widget/Contact.php +++ b/api/src/Etemplate/Widget/Contact.php @@ -68,26 +68,25 @@ class Contact extends Entry 'contact-fields' => array( // contact-fields widget 'sel_options' => array('__callback__' => 'get_contact_fields'), 'type' => 'select', - 'no_lang' => true, - 'options' => 'None', + 'noLang' => true, + 'emptyLabel' => 'None', ), 'contact-template' => array( 'type' => 'template', - 'options' => '', 'template' => array('__callback__' => 'parse_template'), ), '__default__' => array( 'options' => array( - 'bday' => array('type' => 'date', 'options' => 'Y-m-d'), - 'owner' => array('type' => 'select-account', 'options' => ''), - 'modifier' => array('type' => 'select-account', 'options' => ''), - 'creator' => array('type' => 'select-account', 'options' => ''), - 'modifed' => array('type' => 'date-time', 'options' => ''), - 'created' => array('type' => 'date-time', 'options' => ''), - 'cat_id' => array('type' => 'select-cat', 'options' => ''), + 'bday' => array('type' => 'date', 'options' => 'Y-m-d'), + 'owner' => array('type' => 'select-account', 'options' => ''), + 'modifier' => array('type' => 'select-account', 'options' => ''), + 'creator' => array('type' => 'select-account', 'options' => ''), + 'modifed' => array('type' => 'date-time', 'options' => ''), + 'created' => array('type' => 'date-time', 'options' => ''), + 'cat_id' => array('type' => 'select-cat', 'options' => ''), '__default__' => array('type' => 'label', 'options' => ''), ), - 'no_lang' => 1, + 'noLang' => true, ), ), ); diff --git a/api/src/Etemplate/Widget/Entry.php b/api/src/Etemplate/Widget/Entry.php index f6cb1a4d5b..1aa73d5217 100644 --- a/api/src/Etemplate/Widget/Entry.php +++ b/api/src/Etemplate/Widget/Entry.php @@ -49,8 +49,8 @@ abstract class Entry extends Transformer 'entry-fields' => array( // List of fields 'sel_options' => array('__callback__' => 'get_field_list'), 'type' => 'select', - 'no_lang' => true, - 'options' => 'None', + 'noLang' => true, + 'emptyLabel' => 'None', ), ) );