?> <!-- create contenteditable div for HEditorWidget to place the data --> <div id="comment_input_<?php echo $comment->id; ?> _contenteditable" class="form-control atwho-input" contenteditable="true"><?php echo \humhub\widgets\RichText::widget(['text' => $comment->message, 'edit' => true]); ?> </div> <?php /* Modify textarea for mention input */ echo \humhub\widgets\RichTextEditor::widget(array('id' => 'comment_input_' . $comment->id, 'inputContent' => $comment->message, 'record' => $comment)); ?> <div class="comment-buttons"> <?php // Creates Uploading Button echo humhub\modules\file\widgets\FileUploadButton::widget(array('uploaderId' => 'comment_upload_' . $comment->id, 'fileListFieldName' => 'fileList', 'object' => $comment)); ?> <?php echo \humhub\widgets\AjaxButton::widget(['label' => Yii::t('CommentModule.views_edit', 'Save'), 'ajaxOptions' => ['type' => 'POST', 'beforeSend' => new yii\web\JsExpression('function(html){ $("#comment_input_' . $comment->id . '_contenteditable").hide(); showLoader("' . $comment->id . '"); }'), 'success' => new yii\web\JsExpression('function(html){ $("#comment_' . $comment->id . '").replaceWith(html); }'), 'url' => Url::to(['/comment/comment/edit', 'id' => $comment->id, 'contentModel' => $comment->object_model, 'contentId' => $comment->object_id])], 'htmlOptions' => ['class' => 'btn btn-default btn-sm btn-comment-submit', 'id' => 'comment_edit_post_' . $comment->id, 'type' => 'submit']]); ?> </div>
<!-- create contenteditable div for HEditorWidget to place the data --> <div id="cfiles_file_description_<?php echo $file->id; ?> _contenteditable" class="form-control atwho-input" contenteditable="true"><?php echo \humhub\widgets\RichText::widget(['text' => $file->description, 'edit' => true]); ?> </div> <?php echo $form->field($file, 'description')->label(false)->textArea(array('class' => 'form-control', 'id' => 'cfiles_file_description_' . $file->id, 'placeholder' => Yii::t('CfilesModule.base', 'Edit the file description...'))); ?> <?php echo \humhub\widgets\RichTextEditor::widget(['id' => 'cfiles_file_description_' . $file->id, 'inputContent' => $file->description, 'record' => $file]); ?> <?php //echo $form->field($file, 'description'); ?> <?php echo \humhub\widgets\AjaxButton::widget(['label' => Yii::t('PostModule.views_edit', 'Save'), 'ajaxOptions' => ['type' => 'POST', 'beforeSend' => new yii\web\JsExpression('function(html){ }'), 'success' => new yii\web\JsExpression('function(html){$(".wall_' . $file->getUniqueId() . '").replaceWith(html); }'), 'statusCode' => ['400' => new yii\web\JsExpression('function(xhr) { }')], 'url' => $contentContainer->createUrl('/cfiles/edit/file', ['fid' => $currentFolderId, 'id' => $file->getItemId(), 'fromWall' => 1])], 'htmlOptions' => ['class' => 'btn btn-primary']]); ?> <?php echo \humhub\widgets\AjaxButton::widget(['label' => Yii::t('CfilesModule.base', 'Close'), 'ajaxOptions' => ['type' => 'GET', 'success' => new yii\web\JsExpression('function(html){$(".wall_' . $file->getUniqueId() . '").replaceWith(html); }'), 'statusCode' => ['400' => new yii\web\JsExpression('function(xhr) { }')], 'url' => $contentContainer->createUrl('/cfiles/edit/file', ['fid' => $currentFolderId, 'id' => $file->getItemId(), 'fromWall' => 1, 'cancel' => 1])], 'htmlOptions' => ['class' => 'btn btn-primary']]); ?>
<?php echo $form->textArea($post, 'message', array('class' => 'form-control', 'id' => 'post_input_' . $post->id, 'placeholder' => Yii::t('PostModule.views_edit', 'Edit your post...'))); ?> <!-- create contenteditable div for HEditorWidget to place the data --> <div id="post_input_<?php echo $post->id; ?> _contenteditable" class="form-control atwho-input" contenteditable="true"><?php echo \humhub\widgets\RichText::widget(['text' => $post->message]); ?> </div> <?php echo \humhub\widgets\RichTextEditor::widget(['id' => 'post_input_' . $post->id, 'inputContent' => $post->message]); ?> <?php // Creates Uploading Button echo humhub\modules\file\widgets\FileUploadButton::widget(array('uploaderId' => 'post_upload_' . $post->id, 'object' => $post)); ?> <?php echo \humhub\widgets\AjaxButton::widget(['label' => 'Save', 'ajaxOptions' => ['type' => 'POST', 'beforeSend' => new yii\web\JsExpression('function(html){ $("#post_input_' . $post->id . '_contenteditable").hide(); showLoader("' . $post->id . '"); }'), 'success' => new yii\web\JsExpression('function(html){ $(".wall_' . $post->getUniqueId() . '").replaceWith(html); }'), 'url' => Url::to(['/post/post/edit', 'id' => $post->id])], 'htmlOptions' => ['class' => 'btn btn-primary', 'id' => 'post_edit_post_' . $post->id, 'style' => 'position: absolute; left: -90000000px; opacity: 0;']]); ?> <?php // Creates a list of already uploaded Files echo \humhub\modules\file\widgets\FileUploadList::widget(array('uploaderId' => 'post_upload_' . $post->id, 'object' => $post));
<div class="panel-body" id="contentFormBody"> <?php echo Html::beginForm('', 'POST'); ?> <ul id="contentFormError"> </ul> <?php echo $form; ?> <?php /* Modify textarea for mention input */ echo \humhub\widgets\RichTextEditor::widget(array('id' => 'contentForm_message')); ?> <div id="notifyUserContainer" class="form-group hidden" style="margin-top: 15px;"> <input type="text" value="" id="notifyUserInput" name="notifyUserInput"/> <?php $userSearchUrl = Url::toRoute(['/user/search/json', 'keyword' => '-keywordPlaceholder-']); if ($contentContainer instanceof Space) { $userSearchUrl = $contentContainer->createUrl('/space/membership/search', array('keyword' => '-keywordPlaceholder-')); } /* add UserPickerWidget to notify members */ echo \humhub\modules\user\widgets\UserPicker::widget(array('inputId' => 'notifyUserInput', 'userSearchUrl' => $userSearchUrl, 'maxUsers' => 10, 'userGuid' => Yii::$app->user->guid, 'placeholderText' => Yii::t('ContentModule.widgets_views_contentForm', 'Add a member to notify'), 'focus' => true)); ?> </div>