<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.3 |
+ | CiviCRM version 4.5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* $Id$
*
*/
}
/**
- * Function to build the form
+ * Build the form object
*
- * @return None
+ * @return void
* @access public
*/
public function buildQuickForm() {
+ CRM_Core_Resources::singleton()
+ ->addScriptFile('civicrm', 'packages/jquery/plugins/jstree/jquery.jstree.js', 0, 'html-header', FALSE)
+ ->addStyleFile('civicrm', 'packages/jquery/plugins/jstree/themes/default/style.css', 0, 'html-header');
// get categories for the contact id
$entityTag = CRM_Core_BAO_EntityTag::getTag($this->_entityID, $this->_entityTable);
$this->assign('tagged', $entityTag);
foreach ($allTag as $tagID => $varValue) {
if (in_array($tagID, $entityTag)) {
$tagAttribute = array(
- 'onclick' => "return changeRowColor(\"rowidtag_$tagID\")",
'checked' => 'checked',
'id' => "tag_{$tagID}",
);
}
else {
$tagAttribute = array(
- 'onclick' => "return changeRowColor(\"rowidtag_$tagID\")",
'id' => "tag_{$tagID}",
);
}
//build tag widget
$parentNames = CRM_Core_BAO_Tag::getTagSet('civicrm_contact');
CRM_Core_Form_Tag::buildQuickForm($this, $parentNames, $this->_entityTable, $this->_entityID);
-
- if ($this->_action & CRM_Core_Action::BROWSE) {
- $this->freeze();
- }
- else {
- $this->addButtons(array(
- array(
- 'type' => 'next',
- 'name' => ts('Update Tags'),
- 'isDefault' => TRUE,
- ),
- array(
- 'type' => 'cancel',
- 'name' => ts('Cancel'),
- ),
- )
- );
- }
}
/**
- *
* @access public
*
- * @return None
+ * @return void
*/
public function postProcess() {
CRM_Utils_System::flushCache('CRM_Core_DAO_Tag');
CRM_Core_Session::setStatus(ts('Your update(s) have been saved.'), ts('Saved'), 'success');
}
- //end of function
}