* 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(); }}); } else { folderForm$.find ("form").replaceWith (data.form); } }'), array('class' => 'x2-button', 'live' => false, 'style' => 'display: none;')); $this->endWidget();
window.location = "' . $this->createUrl('/topics/topics/view', array('id' => $topic->id, 'latest' => true)) . '"; } }); return false; } }); $(document).on("ready",function(){ x2.topicReplyForm.setUpFileUpload(); }); ', CClientScript::POS_READY); ?> <div class='form'> <?php $form = $this->beginWidget('X2ActiveForm', array('formModel' => $model)); echo $form->textArea($model, 'text'); $model->topicId = isset($topic->id) ? $topic->id : null; echo $form->hiddenField($model, 'topicId'); echo '<div id="topic-reply-submit-buttons">'; if ($method !== 'new-reply') { echo X2Html::submitButton($topic->isNewRecord ? Yii::t('topics', 'Create') : Yii::t('topics', 'Update'), array('class' => 'x2-button highlight', 'id' => 'topic-save-button')); $this->widget('FileUploader', array('id' => 'topic-reply-attachment', 'url' => '/topics/create', 'viewParams' => array('showButton' => false))); } else { echo X2Html::ajaxSubmitButton('Post', $this->createUrl('/topics/newReply'), array('beforeSend' => 'function(){x2.forms.inputLoading($("#topic-reply-submit"));}', 'method' => 'POST', 'success' => 'function(data){ window.location = "' . $this->createUrl('/topics/view', array('id' => $topic->id)) . '?replyId="+data }'), array('class' => 'x2-button highlight', 'id' => 'topic-reply-submit')); $this->widget('FileUploader', array('id' => 'topic-reply-attachment', 'url' => '/site/upload', 'mediaParams' => array('associationType' => 'topicReply', 'TopicReplies[topicId]' => $topic->id), 'viewParams' => array('showButton' => false))); } echo CHtml::button(Yii::t('app', 'Attach A File/Photo'), array('class' => 'x2-button', 'onclick' => 'x2.topicReplyForm.fileUploader.toggle ()', 'id' => "toggle-attachment-menu-button")); echo '</div>'; $this->endWidget(); ?> </div>
* * 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); $.fn.yiiListView.update("folder-contents", {complete:function(){ x2.foldersManager.setUpDragAndDrop(); }}); } else { folderForm$.find ("form").replaceWith (data.form); } }'), array('class' => 'x2-button', 'live' => false, 'style' => 'display: none;')); $this->endWidget();