public function actionEditGlobalCss() { $formModel = new GlobalCSSFormModel(); if (isset($_POST['GlobalCSSFormModel'])) { $formModel->setAttributes($_POST['GlobalCSSFormModel']); if ($formModel->save()) { $formModel->css = GlobalCSSFormModel::getGlobalCss(); X2Flashes::addFlash('success', Yii::t('app', 'CSS saved')); } } else { $formModel->css = GlobalCSSFormModel::getGlobalCss(); if (!$formModel->css) { X2Flashes::addFlash('error', Yii::t('app', 'Could not read file ' . GlobalCSSFormModel::getGlobalCssPath())); } } $this->render('editGlobalCss', array('formModel' => $formModel)); }
* * The interactive user interfaces in modified source and object code versions * of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU Affero General Public License version 3. * * In accordance with Section 7(b) of the GNU Affero General Public License version 3, * these Appropriate Legal Notices must retain the display of the "Powered by * X2Engine" logo. If the display of the logo is not reasonably feasible for * technical reasons, the Appropriate Legal Notices must display the words * "Powered by X2Engine". *****************************************************************************************/ $this->beginContent('//layouts/main'); Yii::import('application.components.leftWidget.*'); LeftWidget::registerScript(); $noBackdrop = isset($this->noBackdrop) && $this->noBackdrop ? 'no-backdrop' : ''; X2Flashes::renderTopFlashes('top-error'); ?> <div id='sidebar-left-widget-box'> <?php if (!Yii::app()->user->isGuest) { $layout = Yii::app()->params->profile->getLayout(); // $defaults = array ('RecentItems', 'ActionMenu', 'TopContacts'); // default order $defaults = array('ActionMenu', 'RecentItems', 'TopContacts'); $keys = array_merge(array_keys($this->leftWidgets), $defaults); $leftWidgetOrder = array_intersect_key($layout['left'], array_flip($keys)); //Default Left Widgets; $leftWidgets = array('TopContacts' => array(), 'RecentItems' => array()); $leftWidgets = array_merge($leftWidgets, $this->leftWidgets); // render the left widgets in order
* You can contact X2Engine, Inc. P.O. Box 66752, Scotts Valley, * California 95067, USA. or at email address contact@x2engine.com. * * The interactive user interfaces in modified source and object code versions * of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU Affero General Public License version 3. * * In accordance with Section 7(b) of the GNU Affero General Public License version 3, * these Appropriate Legal Notices must retain the display of the "Powered by * X2Engine" logo. If the display of the logo is not reasonably feasible for * technical reasons, the Appropriate Legal Notices must display the words * "Powered by X2Engine". *****************************************************************************************/ $folderForm = $this->beginWidget('X2ActiveForm', array('formModel' => $model, 'id' => 'folder-form-inner')); X2Flashes::renderFlashes('error'); X2Flashes::renderFlashes('success'); echo $folderForm->labelEx($model, 'name'); echo $folderForm->textField($model, 'name'); echo $folderForm->hiddenField($model, 'parentFolder'); echo $folderForm->labelEx($model, 'visibility'); echo $folderForm->dropDownList($model, 'visibility', X2PermissionsBehavior::getVisibilityOptions(), array('data-default' => 1)); echo X2Html::ajaxSubmitButton('', '', array('dataType' => 'json', 'success' => 'function(data){ var folderForm$ = $("#folder-form") if (data.success) { folderForm$.dialog("close"); x2.forms.clearForm ($("#folder-form form"), true); x2.flashes.displayFlashes({ success:[' . CJSON::encode(Yii::t('docs', 'Folder created.')) . ']}); $.fn.yiiGridView.update("folder-contents", {complete:function(){ x2.folderManager.setUpDragAndDrop(); }});
public function renderConvertedNotice() { $convertedTo = $this->getConvertedTo(); if ($convertedTo) { Yii::app()->user->setFlash('notice', Yii::t('x2Leads', 'This record has been converted. ' . 'To view the new record, click {here}.', array('{here}' => CHtml::link(Yii::t('x2Leads', 'here'), $convertedTo->getUrl())))); X2Flashes::renderTopFlashes('notice'); } }
public static function setFlashes($flashes) { self::$_flashes = $flashes; }