From 6903e961140c3f26452bd5ec12cdfc3f08bed4a8 Mon Sep 17 00:00:00 2001 From: Tim Mallezie Date: Sun, 17 May 2015 16:06:08 +0200 Subject: [PATCH] addfield in IM form --- CRM/Contact/Form/Edit/IM.php | 14 +++----------- xml/schema/Core/IM.xml | 6 ++++++ 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/CRM/Contact/Form/Edit/IM.php b/CRM/Contact/Form/Edit/IM.php index 80028fa494..a5a808bda7 100644 --- a/CRM/Contact/Form/Edit/IM.php +++ b/CRM/Contact/Form/Edit/IM.php @@ -60,20 +60,12 @@ class CRM_Contact_Form_Edit_IM { $form->applyFilter('__ALL__', 'trim'); //IM provider select - $form->addSelect("im[$blockId][provider_id]", array('entity' => 'im', 'class' => 'eight', 'placeholder' => NULL)); - + $form->addField("im[$blockId][provider_id]", array('entity' => 'im', 'class' => 'eight', 'placeholder' => NULL)); //Block type select - $form->addSelect("im[$blockId][location_type_id]", array( - 'entity' => 'im', - 'class' => 'eight', - 'placeholder' => NULL, - )); + $form->addField("im[$blockId][location_type_id]", array('entity' => 'im', 'class' => 'eight', 'placeholder' => NULL)); //IM box - $form->addElement('text', "im[$blockId][name]", ts('Instant Messenger'), - CRM_Core_DAO::getAttribute('CRM_Core_DAO_IM', 'name') - ); - + $form->addField("im[$blockId][name]", array('entity' => 'im')); //is_Primary radio $js = array('id' => 'IM_' . $blockId . '_IsPrimary'); if (!$blockEdit) { diff --git a/xml/schema/Core/IM.xml b/xml/schema/Core/IM.xml index 0b2675395b..ce4e3961e6 100644 --- a/xml/schema/Core/IM.xml +++ b/xml/schema/Core/IM.xml @@ -44,6 +44,9 @@ display_name 2.0 + + Select + index_location_type @@ -60,6 +63,9 @@ /^[A-Za-z][0-9A-Za-z]{20,}$/ IM screen name 1.1 + + Text + provider_id -- 2.25.1