From: Jagadedes Date: Tue, 21 Oct 2014 10:38:42 +0000 (+0530) Subject: #29759 edit, template becomes empty X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=64276c2d305576373e9715fc99f9a4326999e886;p=com.zyxware.civiwci.git #29759 edit, template becomes empty --- 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(); }