From 64276c2d305576373e9715fc99f9a4326999e886 Mon Sep 17 00:00:00 2001 From: Jagadedes Date: Tue, 21 Oct 2014 16:08:42 +0530 Subject: [PATCH] #29759 edit, template becomes empty --- CRM/Wci/Form/CreateWidget.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CRM/Wci/Form/CreateWidget.php b/CRM/Wci/Form/CreateWidget.php index 4315bd5..bbf4b93 100644 --- a/CRM/Wci/Form/CreateWidget.php +++ b/CRM/Wci/Form/CreateWidget.php @@ -211,6 +211,10 @@ where w.id=" . $this->_id; $cust_templ = base64_decode($wid_page[$dao->id]['custom_template']); $this->setDefaults(array( 'custom_template' => $cust_templ)); + } else { + $output = file_get_contents('templates/CRM/Wci/Page/wciwidget.tpl',FILE_USE_INCLUDE_PATH); + $elem = $this->getElement('custom_template'); + $elem->setValue($output); } } // $widget_controller_path = getWciWidgetControllerPath(); @@ -230,7 +234,7 @@ where w.id=" . $this->_id; /** Keep template in civicrm-wci/templates folder*/ $output = file_get_contents('templates/CRM/Wci/Page/wciwidget.tpl',FILE_USE_INCLUDE_PATH); $elem = $this->getElement('custom_template'); - $elem->setValue($output); + $elem->setValue($output); } parent::buildQuickForm(); } -- 2.25.1