CRM_Core_DAO::executeQuery($sql);
CRM_Core_DAO::executeQuery("SET foreign_key_checks = 1;");
$transaction->commit();
-
+ CRM_Core_Session::setStatus(ts('Widget created successfuly'), '', 'success');
if(isset($_REQUEST['_qf_CreateWidget_next'])) {
(isset($this->_id)) ? $widget_id = $this->_id :
$widget_id = CRM_Core_DAO::singleValueQuery('SELECT LAST_INSERT_ID()');
}
}
catch (Exception $e) {
- //TODO
- print_r($e->getMessage());
+ CRM_Core_Session::setStatus(ts('Failed to create widget'), '', 'error');
$transaction->rollback();
}
}
$transaction->commit();
-
+ CRM_Core_Session::setStatus(ts('Progress bar created successfuly'), '', 'success');
CRM_Utils_System::redirect('progress-bar?reset=1');
}
catch (Exception $e) {
- //TODO
- print_r($e->getMessage());
+ CRM_Core_Session::setStatus(ts('Failed to create progress bar'), '', 'error');
$transaction->rollback();
}
$this->addButtons(array(
array(
'type' => 'submit',
- 'name' => ts('Submit'),
+ 'name' => ts('Save'),
'isDefault' => TRUE,
),
));
// export form elements
$this->assign('elementNames', $this->getRenderableElementNames());
- CRM_Utils_System::setTitle(ts('WCI Settings'));
+ CRM_Utils_System::setTitle(ts('Widget Settings'));
parent::buildQuickForm();
}
$values = $this->exportValues();
civicrm_api3('setting', 'create', array('domain_id' => 1, 'default_wci_widget' => $values['default_widget'],));
civicrm_api3('setting', 'create', array('domain_id' => 1, 'default_wci_profile' => $values['default_profile'],));
+ CRM_Core_Session::setStatus(ts('Widget settings are saved to database'), '', 'success');
parent::postProcess();
}
{* HEADER *}
-
+<div class="crm-block crm-form-block">
<div class="crm-submit-buttons">
{include file="CRM/common/formButtons.tpl" location="top"}
</div>
<div class="crm-submit-buttons">
{include file="CRM/common/formButtons.tpl" location="bottom"}
</div>
+</div>