Example #1
0
 /**
  * @inheritdoc
  */
 protected function renderMoreButton()
 {
     $pageCount = $this->pagination->getPageCount();
     $currentPage = $this->pagination->getPage() + 1;
     if ($currentPage >= $pageCount) {
         return '';
     }
     if (!isset($this->ajaxButtonOptions['ajaxOptions']['url'])) {
         $this->ajaxButtonOptions['ajaxOptions']['url'] = $this->pagination->createUrl($currentPage);
     }
     $moreButton = AjaxButton::widget($this->ajaxButtonOptions);
     return Html::tag('div', Html::tag('br') . $moreButton . LoaderWidget::widget(['id' => $this->id . '_loader', 'cssClass' => 'hidden']), ['id' => $this->id, 'class' => 'pagination-container']);
 }
Example #2
0
 /**
  * @inheritdoc
  */
 protected function renderPageButton($label, $page, $class, $disabled, $active)
 {
     $options = ['class' => $class === '' ? null : $class];
     if ($active) {
         Html::addCssClass($options, $this->activePageCssClass);
     }
     if ($disabled) {
         Html::addCssClass($options, $this->disabledPageCssClass);
         return Html::tag('li', Html::tag('span', $label), $options);
     }
     $linkOptions = $this->linkOptions;
     $linkOptions['data-page'] = $page;
     return Html::tag('li', AjaxButton::widget(['label' => $label, 'tag' => 'a', 'ajaxOptions' => ['type' => 'POST', 'beforeSend' => new JsExpression($this->jsBeforeSend), 'success' => new JsExpression($this->jsSuccess), 'url' => $this->pagination->createUrl($page)], 'htmlOptions' => $linkOptions]), $options);
 }
Example #3
0
        <div class="modal-body">

            <br/>

            <?php 
echo Yii::t('UserModule.invite', 'Please add the email addresses of people you want to invite below.');
?>
            <br/><br/>
            <div class="form-group">
                <?php 
echo $form->field($model, 'emails')->textArea(['rows' => '3', 'placeholder' => Yii::t('UserModule.invite', 'Email address(es)'), 'id' => 'emails'])->label(false)->hint(Yii::t('UserModule.invite', 'Separate multiple email addresses by comma.'));
?>
            </div>
        </div>
        <div class="modal-footer">

            <?php 
echo \humhub\widgets\AjaxButton::widget(['label' => Yii::t('UserModule.invite', 'Send invite'), 'ajaxOptions' => ['type' => 'POST', 'beforeSend' => new yii\web\JsExpression('function(){ setModalLoader(); }'), 'success' => new yii\web\JsExpression('function(html){ $("#globalModal").html(html); }'), 'url' => Url::to(['/user/invite'])], 'htmlOptions' => ['class' => 'btn btn-primary']]);
?>

            <?php 
echo \humhub\widgets\LoaderWidget::widget(['id' => 'invite-loader', 'cssClass' => 'loader-modal hidden']);
?>
        </div>

        <?php 
ActiveForm::end();
?>
    </div>

</div>
Example #4
0
                        <p><?php 
    echo Yii::t('UserModule.views_auth_login', "Don't have an account? Join the network by entering your e-mail address.");
    ?>
</p>
                        <?php 
    $form = ActiveForm::begin();
    ?>

                        <?php 
    echo $form->field($invite, 'email')->textInput(['id' => 'register-email', 'placeholder' => Yii::t('UserModule.views_auth_login', 'email')]);
    ?>
                        <hr>

                        <?php 
    echo \humhub\widgets\AjaxButton::widget(['label' => Yii::t('UserModule.views_auth_login', 'Register'), 'ajaxOptions' => ['type' => 'POST', 'beforeSend' => new yii\web\JsExpression('function(){ setModalLoader(); }'), 'success' => 'function(html){ $("#globalModal").html(html); }', 'url' => Url::to(['/user/auth/login'])], 'htmlOptions' => ['class' => 'btn btn-primary', 'id' => 'registerBtn']]);
    ?>

                        <?php 
    ActiveForm::end();
    ?>

                    </div>
                <?php 
}
?>
            </div>
        </div>

    </div>
Example #5
0
    <?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>

    <?php 
// Creates a list of already uploaded Files
echo \humhub\modules\file\widgets\FileUploadList::widget(array('uploaderId' => 'comment_upload_' . $comment->id, 'object' => $comment));
?>

    <?php 
CActiveForm::end();
?>
</div>

<script type="text/javascript">
Example #6
0
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));
?>

    <?php 
CActiveForm::end();
?>
</div>

<script type="text/javascript">

    $('#post_input_<?php 
            </div>
            <div class="form-group" id="selectedUsersField">
                <?php 
echo $form->labelEx($calendarEntry, 'selected_participants');
?>
                <?php 
echo $form->textField($calendarEntry, 'selected_participants', array('class' => 'form-control', 'placeholder' => Yii::t('CalendarModule.views_entry_edit', 'Participants')));
?>
            </div>
        </div>

        <div class="modal-footer">
            <div class="row">
                <div class="col-md-8 text-left">
                    <?php 
echo \humhub\widgets\AjaxButton::widget(['label' => Yii::t('CalendarModule.views_entry_edit', 'Save'), 'ajaxOptions' => ['type' => 'POST', 'beforeSend' => new yii\web\JsExpression('function(){ setModalLoader(); }'), 'success' => new yii\web\JsExpression('function(html){ $("#globalModal").html(html); }'), 'url' => $contentContainer->createUrl('/calendar/entry/edit', ['id' => $calendarEntry->id])], 'htmlOptions' => ['class' => 'btn btn-primary']]);
?>
                    <button type="button" class="btn btn-primary"
                            data-dismiss="modal"><?php 
echo Yii::t('CalendarModule.views_entry_edit', 'Close');
?>
</button>
                </div>
                <div class="col-md-4 text-right">
                    <?php 
if (!$calendarEntry->isNewRecord) {
    echo Html::a(Yii::t('CalendarModule.views_entry_edit', 'Delete'), $contentContainer->createUrl('//calendar/entry/delete', array('id' => $calendarEntry->id)), array('class' => 'btn btn-danger'));
}
?>

                </div>
Example #8
0
                        </div>
                        <div class="col-md-6">
                            <?php 
echo $form->field($user->profile, 'mobile')->textInput(['placeholder' => Yii::t('TourModule.views_tour_welcome', 'Your mobild phone number')]);
?>
                        </div>
                    </div>


                    <div class="row">
                        <div class="col-md-12 text-right">
                            <hr>
                            <br>

                            <?php 
echo \humhub\widgets\AjaxButton::widget(['label' => Yii::t('TourModule.views_tour_welcome', 'Save and close'), 'ajaxOptions' => ['type' => 'POST', 'beforeSend' => new yii\web\JsExpression('function(){ setModalLoader(); }'), 'success' => new yii\web\JsExpression('function(html){ $("#globalModal").html(html); }'), 'url' => Url::to(['/tour/tour/welcome'])], 'htmlOptions' => ['class' => 'btn btn-primary']]);
?>

                            <?php 
echo \humhub\widgets\LoaderWidget::widget(['id' => 'invite-loader', 'cssClass' => 'loader-modal hidden']);
?>
                        </div>
                    </div>


                    <?php 
ActiveForm::end();
?>
                </div>

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 
CActiveForm::end();
?>
    </div>
    
    <div class="preview">
            <?php 
echo FilePreview::widget(['file' => $file, 'width' => 600, 'height' => 350, 'htmlConf' => ['class' => 'preview', 'id' => 'cfiles-wallout-file-preview-' . $file->id]]);
?>
    </div>
</div>
Example #10
0
echo $title;
?>
</h4>
            </div>
            <div class="modal-body text-center">
                <?php 
echo $message;
?>
            </div>
            <div class="modal-footer">
                <?php 
if ($buttonTrue != "") {
    ?>

                    <?php 
    echo \humhub\widgets\AjaxButton::widget(['label' => $buttonTrue, 'ajaxOptions' => ['type' => 'POST', 'success' => $confirm, 'url' => $linkHref], 'htmlOptions' => ['return' => 'true', 'class' => 'btn btn-primary', 'data-dismiss' => 'modal']]);
    ?>
                <?php 
}
?>
                <?php 
if ($buttonFalse != "") {
    ?>
                    <button type="button" class="btn btn-primary"
                            data-dismiss="modal"><?php 
    echo $buttonFalse;
    ?>
</button>
                        <?php 
}
?>
Example #11
0
?>
                    </div>
                    <div class="col-md-6">
                        <?php 
echo $form->field($model, 'visibility')->radioList($visibilityOptions);
?>
                    </div>
                </div>
            </div>
        </div>

        <div class="modal-footer">
            <hr>
            <br>
            <?php 
echo \humhub\widgets\AjaxButton::widget(['label' => Yii::t('SpaceModule.views_create_create', 'Next'), 'ajaxOptions' => ['type' => 'POST', 'beforeSend' => new yii\web\JsExpression('function(){ setModalLoader(); }'), 'success' => new yii\web\JsExpression('function(html){ $("#globalModal").html(html); }'), 'url' => Url::to(['/space/create/create'])], 'htmlOptions' => ['class' => 'btn btn-primary', 'id' => 'space-create-submit-button']]);
?>

            <?php 
echo \humhub\widgets\LoaderWidget::widget(['id' => 'create-loader', 'cssClass' => 'loader-modal hidden']);
?>
        </div>

        <?php 
ActiveForm::end();
?>
    </div>

</div>

Example #12
0
">
    <div class="comment <?php 
if (Yii::$app->user->isGuest) {
    ?>
guest-mode<?php 
}
?>
" id="comments_area_<?php 
echo $id;
?>
">
        <?php 
if ($isLimited) {
    ?>
            <?php 
    echo AjaxButton::widget(['label' => Yii::t('CommentModule.widgets_views_comments', 'Show all {total} comments.', array('{total}' => $total)), 'ajaxOptions' => ['type' => 'POST', 'success' => new yii\web\JsExpression("function(html) { \$('#comments_area_" . $id . "').html(html); }"), 'url' => Url::to(['/comment/comment/show', 'contentModel' => $modelName, 'contentId' => $modelId])], 'htmlOptions' => ['id' => $id . "_showAllLink", 'class' => 'show show-all-link'], 'tag' => 'a']);
    ?>
            <hr>
        <?php 
}
?>

        <?php 
foreach ($comments as $comment) {
    ?>
            <?php 
    echo \humhub\modules\comment\widgets\Comment::widget(['comment' => $comment]);
    ?>
        <?php 
}
?>
Example #13
0
                                <?php 
    echo Yii::t('AdminModule.views_module_setAsDefault', 'Always activated');
    ?>
                            </label>
                        </div>
                        <br/>
                    </div>
                <?php 
}
?>
            </div>
        </div>
        <div class="modal-footer">

            <?php 
echo \humhub\widgets\AjaxButton::widget(['label' => Yii::t('AdminModule.views_module_setAsDefault', 'Save'), 'ajaxOptions' => ['type' => 'POST', 'beforeSend' => new yii\web\JsExpression('function(){ setModalLoader(); }'), 'success' => new yii\web\JsExpression('function(html){ $("#globalModal").html(html); }'), 'url' => \yii\helpers\Url::to(['/admin/module/set-as-default', 'moduleId' => $module->id])], 'htmlOptions' => ['class' => 'btn btn-primary']]);
?>
            <button type="button" class="btn btn-primary"
                    data-dismiss="modal"><?php 
echo Yii::t('AdminModule.views_module_setAsDefault', 'Close');
?>
</button>


            <div id="default-loader" class="loader loader-modal hidden">
                <div class="sk-spinner sk-spinner-three-bounce">
                    <div class="sk-bounce1"></div>
                    <div class="sk-bounce2"></div>
                    <div class="sk-bounce3"></div>
                </div>
            </div>
echo $form->textArea($entry, 'content', array('class' => 'form-control', 'rows' => '7', 'id' => 'newMessageEntryText'));
?>
                <?php 
echo humhub\widgets\MarkdownEditor::widget(array('fieldId' => 'newMessageEntryText'));
?>
                <?php 
echo $form->error($entry, 'content');
?>
            </div>

        </div>
        <div class="modal-footer">
            <div class="row">
                <div class="col-md-6 text-left">
                    <?php 
echo \humhub\widgets\AjaxButton::widget(['label' => Yii::t('MailModule.views_mail_edit', 'Save'), 'ajaxOptions' => ['type' => 'POST', 'beforeSend' => 'function(){ $("#create-message-loader").removeClass("hidden"); }', 'success' => 'function(html){ $("#globalModal").html(html); }', 'url' => Url::to(['/mail/mail/edit-entry', 'messageEntryId' => $entry->id])], 'htmlOptions' => ['class' => 'btn btn-primary']]);
?>

                    <button type="button" class="btn btn-primary" data-dismiss="modal"><?php 
echo Yii::t('MailModule.views_mail_create', 'Close');
?>
</button>

                </div>
                <div class="col-md-6 text-right">
                    <?php 
echo humhub\widgets\ModalConfirm::widget(array('uniqueID' => 'modal_maildelete_' . $entry->id, 'title' => Yii::t('MailModule.views_mail_show', '<strong>Confirm</strong> message deletion'), 'message' => Yii::t('MailModule.views_mail_show', 'Do you really want to delete this message?'), 'buttonTrue' => Yii::t('MailModule.views_mail_show', 'Delete'), 'buttonFalse' => Yii::t('MailModule.views_mail_show', 'Cancel'), 'linkContent' => Yii::t('MailModule.views_mail_show', 'Delete'), 'cssClass' => 'btn btn-danger', 'linkHref' => Url::to(["/mail/mail/delete-entry", 'messageEntryId' => $entry->id])));
?>
                </div>
            </div>
    ?>
                <?php 
}
?>
            </h4>
        </div>

        <div class="modal-body">
            <br />
            <?php 
echo $form->field($folder, 'title');
?>
        </div>

        <div class="modal-footer">
            <?php 
echo \humhub\widgets\AjaxButton::widget(['label' => Yii::t('CfilesModule.base', 'Save'), 'ajaxOptions' => ['type' => 'POST', 'beforeSend' => new yii\web\JsExpression('function(){ setModalLoader(); }'), 'success' => new yii\web\JsExpression('function(html){ $("#globalModal").html(html); }'), 'url' => $contentContainer->createUrl('/cfiles/browse/edit-folder', ['fid' => $currentFolderId, 'id' => $folder->id])], 'htmlOptions' => ['class' => 'btn btn-primary']]);
?>
            <button type="button" class="btn btn-primary"
                data-dismiss="modal">
                <?php 
echo Yii::t('CfilesModule.base', 'Close');
?>
            </button>

        </div>
        <?php 
CActiveForm::end();
?>
    </div>
</div>
Example #16
0
    <?php 
if ($canWrite || $canDelete) {
    ?>

        <ul class="nav nav-pills preferences">
            <li class="dropdown ">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#"><i class="fa fa-angle-down"></i></a>

                <ul class="dropdown-menu pull-right">

                    <?php 
    if ($canWrite) {
        ?>
                        <li>
                            <?php 
        echo AjaxButton::widget(['label' => '<i class="fa fa-pencil"></i> ' . Yii::t('CommentModule.widgets_views_showComment', 'Edit'), 'ajaxOptions' => ['type' => 'POST', 'success' => new yii\web\JsExpression("function(html){ \$('.preferences .dropdown').removeClass('open'); \$('#comment_editarea_" . $comment->id . "').replaceWith(html); \$('#comment_input_" . $comment->id . "_contenteditable').focus(); }"), 'url' => Url::to(['/comment/comment/edit', 'contentModel' => $comment->object_model, 'contentId' => $comment->object_id, 'id' => $comment->id])], 'tag' => 'a']);
        ?>

                        </li>
                    <?php 
    }
    ?>

                    <?php 
    if ($canDelete) {
        ?>
                        <li>

                            <!-- load modal confirm widget -->
                            <?php 
        echo humhub\widgets\ModalConfirm::widget(array('uniqueID' => 'modal_commentdelete_' . $comment->id, 'linkOutput' => 'a', 'title' => Yii::t('CommentModule.widgets_views_showComment', '<strong>Confirm</strong> comment deleting'), 'message' => Yii::t('CommentModule.widgets_views_showComment', 'Do you really want to delete this comment?'), 'buttonTrue' => Yii::t('CommentModule.widgets_views_showComment', 'Delete'), 'buttonFalse' => Yii::t('CommentModule.widgets_views_showComment', 'Cancel'), 'linkContent' => '<i class="fa fa-trash-o"></i> ' . Yii::t('CommentModule.widgets_views_showComment', 'Delete'), 'linkHref' => Url::to(["/comment/comment/delete", 'contentModel' => $comment->object_model, 'contentId' => $comment->object_id, 'id' => $comment->id]), 'confirmJS' => "function(html) { \$('#comment_" . $comment->id . "').slideUp(); }"));
Example #17
0
?>
</div>

    <?php 
echo \humhub\widgets\RichTextEditor::widget(['id' => 'post_input_' . $post->id, 'inputContent' => $post->message, 'record' => $post]);
?>

    <div class="comment-buttons">

    <?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' => $post->content->container->createUrl('/post/post/edit', ['id' => $post->id])], 'htmlOptions' => ['class' => 'btn btn-default btn-sm btn-comment-submit', 'id' => 'post_edit_post_' . $post->id, 'type' => 'submit']]);
?>

    </div>

        <?php 
// Creates a list of already uploaded Files
echo \humhub\modules\file\widgets\FileUploadList::widget(array('uploaderId' => 'post_upload_' . $post->id, 'object' => $post));
?>


    <?php 
CActiveForm::end();
?>
</div>
Example #18
0
                    display: none !important;
                }

            </style>

            <div id="cropimage">
                <?php 
echo \yii\helpers\Html::img($profileImage->getUrl('_org'), ['id' => 'foobar']);
echo raoul2000\jcrop\JCropWidget::widget(['selector' => '#foobar', 'pluginOptions' => ['aspectRatio' => 1, 'minSize' => [50, 50], 'setSelect' => [0, 0, 100, 100], 'bgColor' => 'black', 'bgOpacity' => '0.5', 'onChange' => new yii\web\JsExpression('function(c){ console.log("fooo"); $("#cropX").val(c.x);$("#cropY").val(c.y);$("#cropW").val(c.w);$("#cropH").val(c.h); }')]]);
?>
            </div>
        </div>
        <div class="modal-footer">

            <?php 
echo \humhub\widgets\AjaxButton::widget(['label' => Yii::t('UserModule.views_profile_cropProfileImage', 'Save'), 'ajaxOptions' => ['type' => 'POST', 'id' => 'blabla', 'beforeSend' => new yii\web\JsExpression('function(){ setModalLoader(); }'), 'success' => new yii\web\JsExpression('function(html){ $("#globalModal").html(html); }'), 'url' => Url::toRoute('/user/account/crop-profile-image')], 'htmlOptions' => ['class' => 'btn btn-primary']]);
?>

            <?php 
//echo CHtml::submitButton(Yii::t('UserModule.views_profile_cropProfileImage', 'Save'), array('class' => 'btn btn-primary'));
?>

            <button type="button" class="btn btn-primary"
                    data-dismiss="modal"><?php 
echo Yii::t('UserModule.views_profile_cropProfileImage', 'Close');
?>
</button>

            <div id="crop-loader" class="loader loader-modal hidden">
                <div class="sk-spinner sk-spinner-three-bounce">
                    <div class="sk-bounce1"></div>
Example #19
0
            </style>

            <div id="cropimage">
                <?php 
echo \yii\helpers\Html::img($profileImage->getUrl('_org'), ['id' => 'foobar']);
echo raoul2000\jcrop\JCropWidget::widget(['selector' => '#foobar', 'pluginOptions' => ['aspectRatio' => 6.3, 'minSize' => [50, 50], 'setSelect' => [0, 0, 267, 48], 'bgColor' => 'black', 'bgOpacity' => '0.5', 'boxWidth' => '440', 'onChange' => new yii\web\JsExpression('function(c){ $("#cropX").val(c.x);$("#cropY").val(c.y);$("#cropW").val(c.w);$("#cropH").val(c.h); }')]]);
?>
            </div>


        </div>
        <div class="modal-footer">

            <?php 
echo \humhub\widgets\AjaxButton::widget(['label' => Yii::t('UserModule.views_profile_cropProfileImage', 'Save'), 'ajaxOptions' => ['type' => 'POST', 'beforeSend' => new yii\web\JsExpression('function(){ setModalLoader(); }'), 'success' => new yii\web\JsExpression('function(html){ $("#globalModal").html(html); }'), 'url' => $space->createUrl('/space/admin/crop-banner-image')], 'htmlOptions' => ['class' => 'btn btn-primary']]);
?>

            <button type="button" class="btn btn-primary"
                    data-dismiss="modal"><?php 
echo Yii::t('UserModule.views_profile_cropBannerImage', 'Close');
?>
</button>


            <div id="crop-loader" class="loader loader-modal hidden">
                <div class="sk-spinner sk-spinner-three-bounce">
                    <div class="sk-bounce1"></div>
                    <div class="sk-bounce2"></div>
                    <div class="sk-bounce3"></div>
                </div>
<?php

use yii\helpers\Url;
use yii\web\JsExpression;
/* @var $this humhub\components\View */
?>
<li>
    <?php 
echo \humhub\widgets\AjaxButton::widget(['label' => '<i class="fa fa-pencil"></i> ' . Yii::t('ContentModule.widgets_views_editLink', 'Edit'), 'tag' => 'a', 'ajaxOptions' => ['type' => 'POST', 'success' => new JsExpression('function(html){ $(".preferences .dropdown").removeClass("open"); $("#wall_content_' . $content->getUniqueId() . '").replaceWith(html); }'), 'url' => $editUrl], 'htmlOptions' => ['href' => '#']]);
?>
</li>
<?php

use yii\helpers\Url;
?>
<li>
    <?php 
$offLinkId = 'notification_off_' . $content->id;
$onLinkId = 'notification_on_' . $content->id;
echo \humhub\widgets\AjaxButton::widget(['tag' => 'a', 'label' => '<i class="fa fa-bell-slash-o"></i> ' . Yii::t('ContentModule.widgets_views_notificationSwitchLink', 'Turn off notifications'), 'ajaxOptions' => ['type' => 'POST', 'success' => "function(res){ if (res.success) { \$('#" . $offLinkId . "').hide(); \$('#" . $onLinkId . "').show(); } }", 'url' => Url::to(['/content/content/notification-switch', 'id' => $content->id, 'switch' => 0])], 'htmlOptions' => ['style' => 'display: ' . ($state ? 'block' : 'none'), 'href' => '#', 'id' => $offLinkId]]);
echo \humhub\widgets\AjaxButton::widget(['tag' => 'a', 'label' => '<i class="fa fa-bell-o"></i> ' . Yii::t('ContentModule.widgets_views_notificationSwitchLink', 'Turn on notifications'), 'ajaxOptions' => ['type' => 'POST', 'success' => "function(res){ if (res.success) { \$('#" . $onLinkId . "').hide(); \$('#" . $offLinkId . "').show(); } }", 'url' => Url::to(['/content/content/notification-switch', 'id' => $content->id, 'switch' => 1])], 'htmlOptions' => ['style' => 'display: ' . ($state ? 'none' : 'block'), 'href' => '#', 'id' => $onLinkId]]);
?>
</li>
Example #22
0
?>

    <?php 
echo humhub\widgets\RichTextEditor::widget(['id' => 'newCommentForm_' . $id]);
?>

    <div class="comment-buttons">

    <?php 
// Creates Uploading Button
echo humhub\modules\file\widgets\FileUploadButton::widget(array('uploaderId' => 'comment_upload_' . $id, 'fileListFieldName' => 'fileList'));
?>

    <?php 
$jsSuccess = "function(html) {\n            \$('#comments_area_" . $id . "').append(html);\n            \$('#newCommentForm_" . $id . "').val('').trigger('autosize.resize');\n            \$('#newCommentForm_" . $id . "_contenteditable').html('" . Html::encode(Yii::t('CommentModule.widgets_views_form', 'Write a new comment...')) . "');\n            \$('#newCommentForm_" . $id . "_contenteditable').addClass('atwho-placeholder');\n            \$('#loader-" . $id . "').remove();\n            \$('#newCommentForm_" . $id . "_contenteditable').show();\n            \$('.comment-buttons').show();\n            resetUploader('comment_upload_" . $id . "');\n    }";
echo AjaxButton::widget(['label' => Yii::t('CommentModule.widgets_views_form', 'Send'), 'ajaxOptions' => ['type' => 'POST', 'beforeSend' => new yii\web\JsExpression("function(html){  \$('#newCommentForm_" . $id . "_contenteditable').hide(); \$('.comment-buttons').hide(); showLoader('" . $id . "'); }"), 'success' => new yii\web\JsExpression($jsSuccess), 'url' => Url::to(['/comment/comment/post'])], 'htmlOptions' => ['id' => "comment_create_post_" . $id, 'class' => 'btn btn-sm btn-default btn-comment-submit pull-left', 'type' => 'submit']]);
?>

    </div>

    <?php 
echo Html::endForm();
?>


    <?php 
// Creates a list of already uploaded Files
echo \humhub\modules\file\widgets\FileUploadList::widget(array('uploaderId' => 'comment_upload_' . $id));
?>
</div>
Example #23
0
?>
            </div>

            <div class="form-group">
                <?php 
echo $form->field($model, 'message', ['inputOptions' => ['class' => 'form-control', 'id' => 'newMessageText']])->textarea();
?>
                <?php 
echo \humhub\widgets\MarkdownEditor::widget(array('fieldId' => 'newMessageText'));
?>
            </div>

        </div>
        <div class="modal-footer">
            <?php 
echo \humhub\widgets\AjaxButton::widget(['label' => Yii::t('MailModule.views_mail_create', 'Send'), 'ajaxOptions' => ['type' => 'POST', 'success' => 'function(html){ $("#globalModal").html(html); }', 'url' => Url::to(['/mail/mail/create'])], 'htmlOptions' => ['class' => 'btn btn-primary']]);
?>

            <button type="button" class="btn btn-primary" data-dismiss="modal"><?php 
echo Yii::t('MailModule.views_mail_create', 'Close');
?>
</button>

        </div>

        <?php 
ActiveForm::end();
?>
    </div>

</div>
Example #24
0
        echo DropdownButton::widget(['label' => \Yii::t('CfilesModule.base', 'Folder options'), 'buttons' => $buttons, 'icon' => $icon, 'options' => ['class' => 'btn btn-default overflow-ellipsis']]);
        ?>
            </div>
            <?php 
    }
    ?>
            <?php 
    if ($this->context->canWrite() || !Setting::Get('disableZipSupport', 'cfiles')) {
        ?>
            <div class="col-sm-4 selectedOnly">
                <?php 
        $icon = '';
        $buttons = [];
        if ($this->context->canWrite()) {
            $buttons[] = \humhub\widgets\AjaxButton::widget(['label' => '<i class="fa fa-trash"></i> ' . Yii::t('CfilesModule.base', 'Delete'), 'tag' => 'button', 'ajaxOptions' => ['type' => 'POST', 'success' => new yii\web\JsExpression('function(html){ $("#globalModal").html(html); $("#globalModal").modal("show");}'), 'url' => $contentContainer->createUrl('/cfiles/delete', ['fid' => $currentFolder->id])], 'htmlOptions' => ['class' => 'btn btn-danger selectedOnly filedelete-button overflow-ellipsis', 'style' => 'display:none']]);
            $buttons[] = \humhub\widgets\AjaxButton::widget(['label' => '<i class="fa fa-arrows"></i> ' . Yii::t('CfilesModule.base', 'Move'), 'tag' => 'button', 'ajaxOptions' => ['type' => 'POST', 'success' => new yii\web\JsExpression('function(html){ $("#globalModal").html(html); $("#globalModal").modal("show"); openDirectory(' . $currentFolder->id . '); selectDirectory(' . $currentFolder->id . ');}'), 'url' => $contentContainer->createUrl('/cfiles/move', ['init' => 1, 'fid' => $currentFolder->id])], 'htmlOptions' => ['class' => 'btn btn-default filemove-button overflow-ellipsis']]);
        }
        if (!Setting::Get('disableZipSupport', 'cfiles')) {
            $buttons[] = Html::a('<i class="fa fa-download"></i> ' . Yii::t('CfilesModule.base', 'ZIP selected'), $contentContainer->createUrl('/cfiles/zip/download-archive'), array('class' => 'btn btn-default overflow-ellipsis', 'id' => 'zip-selected-button'));
        }
        echo DropdownButton::widget(['label' => "(<span class='chkCnt'></span>) " . \Yii::t('CfilesModule.base', 'Selected items...'), 'buttons' => $buttons, 'icon' => $icon, 'split' => false, 'options' => ['class' => 'btn btn-default overflow-ellipsis']]);
        ?>
            </div>
            <?php 
    }
    ?>
            <?php 
}
?>
        </div>
        <hr id="files-action-menu-divider">
                    <br />
                    <?php 
echo $form->radioButtonList($model, 'reason', array('1' => Yii::t('ReportcontentModule.widgets_views_reportSpamLink', 'Does not belong to this space'), '2' => Yii::t('ReportcontentModule.widgets_views_reportSpamLink', 'It\'s offensive'), '3' => Yii::t('ReportcontentModule.widgets_views_reportSpamLink', 'It\'s spam')));
?>
                    <?php 
echo $form->error($model, 'reason');
?>



                </div>
                <hr />
                <div class="modal-footer">

                    <?php 
echo \humhub\widgets\AjaxButton::widget(['label' => Yii::t('ReportcontentModule.widgets_views_reportSpamLink', 'Submit'), 'tag' => 'button', 'ajaxOptions' => ['type' => 'POST', 'beforeSend' => new yii\web\JsExpression('function(){ setModalLoader(); }'), 'success' => new yii\web\JsExpression('function(data){ if(data.success) $("#reportLinkPost_modal_postreport_' . $object->id . '").hide(); }'), 'url' => \yii\helpers\Url::to(['/reportcontent/report-content/report'])], 'htmlOptions' => ['return' => 'true', 'class' => 'btn btn-primary', 'data-dismiss' => "modal", 'disabled' => 'disabled']]);
?>
                </div>
                <?php 
CActiveForm::end();
?>
            </div>
        </div>
    </div>
</li>


<script type="text/javascript">

    $(document).ready(function () {
        // move modal to body
Example #26
0
?>
        </li>
        <?php 
echo humhub\modules\dropbox\widgets\DropboxFileListerWidget::widget(array('inputId' => 'dropbox_files_list_' . $id, 'model' => $model, 'attribute' => 'dropboxFileId', 'openIcon' => 'dropbox-open_' . $id));
?>
    </ul>

</div>


</div>


<div>
    <?php 
echo \humhub\widgets\AjaxButton::widget(['label' => "Save", 'ajaxOptions' => ['type' => 'POST', 'success' => 'function(html){ $(".wall_' . $dropboxPost->getUniqueId() . '").replaceWith(html); }', 'url' => \yii\helpers\Url::to(['/dropbox/index/edit', 'id' => $id])], 'htmlOptions' => ['class' => 'btn btn-primary', 'id' => 'post_edit_post_' . $id]]);
?>
</div>

<?php 
CActiveForm::end();
?>

<script type="text/javascript">
    // set the size for one row (Firefox)
    $('#CreateDropboxPostForm_message').css({height: '36px'});

    // add autosize function to input
    $('.autosize').autosize();

</script>
                <?php 
    echo $form->errorSummary($replyForm);
    ?>
                <div class="form-group">
                    <?php 
    echo $form->textArea($replyForm, 'message', array('class' => 'form-control', 'id' => 'newMessage', 'rows' => '4', 'placeholder' => Yii::t('MailModule.views_mail_show', 'Write an answer...')));
    ?>
                    <?php 
    echo humhub\widgets\MarkdownEditor::widget(array('fieldId' => 'newMessage'));
    ?>
                </div>
                <hr>

                <?php 
    echo \humhub\widgets\AjaxButton::widget(['label' => Yii::t('MailModule.views_mail_show', 'Send'), 'ajaxOptions' => ['type' => 'POST', 'success' => 'function(html){ $("#mail_message_details").html(html); }', 'url' => Url::to(['/mail/mail/show', 'id' => $message->id])], 'htmlOptions' => ['class' => 'btn btn-primary']]);
    ?>


                <div class="pull-right">

                    <!-- Button to trigger modal to add user to conversation -->
                    <?php 
    echo Html::a('<i class="fa fa-plus"></i> ' . Yii::t('MailModule.views_mail_show', 'Add user'), ['/mail/mail/add-user', 'id' => $message->id, 'ajax' => 1], array('class' => 'btn btn-info', 'data-target' => '#globalModal'));
    ?>

                    <?php 
    if (count($message->users) > 2 && $message->originator->id != Yii::$app->user->id) {
        ?>
                        <a class="btn btn-danger"
                           href="<?php 
echo Html::hiddenInput("containerGuid", $contentContainer->guid);
echo Html::hiddenInput("containerClass", get_class($contentContainer));
?>

        <div class="contentForm_options">

            <hr>

            <div class="btn_container">

                <?php 
echo \humhub\widgets\LoaderWidget::widget(['id' => 'postform-loader', 'cssClass' => 'loader-postform hidden']);
?>

                <?php 
echo \humhub\widgets\AjaxButton::widget(['label' => $submitButtonText, 'ajaxOptions' => ['url' => $submitUrl, 'type' => 'POST', 'dataType' => 'json', 'beforeSend' => "function() { \$('.contentForm').removeClass('error'); \$('#contentFormError').hide(); \$('#contentFormError').empty(); }", 'beforeSend' => 'function(){ $("#contentFormError").hide(); $("#contentFormError li").remove(); $(".contentForm_options .btn").hide(); $("#postform-loader").removeClass("hidden"); }', 'success' => "function(response) { handleResponse(response);}"], 'htmlOptions' => ['id' => "post_submit_button", 'class' => 'btn btn-info', 'type' => 'submit']]);
?>
                <?php 
// Creates Uploading Button
echo humhub\modules\file\widgets\FileUploadButton::widget(array('uploaderId' => 'contentFormFiles', 'fileListFieldName' => 'fileList'));
?>
                <script>
                    $('#fileUploaderButton_contentFormFiles').bind('fileuploaddone', function (e, data) {
                        $('.btn_container').show();
                    });
                    $('#fileUploaderButton_contentFormFiles').bind('fileuploadprogressall', function (e, data) {
                        var progress = parseInt(data.loaded / data.total * 100, 10);
                        if (progress != 100) {
                            // Fix: remove focus from upload button to hide tooltip
                            $('#post_submit_button').focus();
                            // hide form buttons
                            <?php 
    echo $form->field($model, 'inviteExternal')->textArea(['rows' => '3', 'placeholder' => Yii::t('SpaceModule.views_space_invite', 'Email addresses'), 'id' => 'email_invite'])->label(false);
    ?>
                        </div>
                    </div>
                <?php 
}
?>
            </div>


        </div>
        <div class="modal-footer">

            <?php 
echo \humhub\widgets\AjaxButton::widget(['label' => Yii::t('SpaceModule.views_space_invite', 'Send'), 'ajaxOptions' => ['type' => 'POST', 'beforeSend' => new yii\web\JsExpression('function(){ setModalLoader(); }'), 'success' => new yii\web\JsExpression('function(html){ $("#globalModal").html(html); }'), 'url' => $space->createUrl('/space/membership/invite')], 'htmlOptions' => ['class' => 'btn btn-primary']]);
?>
            <button type="button" class="btn btn-primary"
                    data-dismiss="modal"><?php 
echo Yii::t('SpaceModule.views_space_invite', 'Close');
?>
</button>

            <?php 
echo \humhub\widgets\LoaderWidget::widget(['id' => 'invite-loader', 'cssClass' => 'loader-modal hidden']);
?>
        </div>

        <?php 
ActiveForm::end();
?>
            <input id="input-hidden-selectedFolder" type="hidden"
                name="destfid" value="<?php 
echo $selectedFolderId;
?>
" />
            
            <?php 
if (is_array($selectedItems)) {
    foreach ($selectedItems as $index => $item) {
        echo "<input class='input-hidden-selectedItem' type='hidden' name='selected[]' value='{$item}'/>";
    }
}
?>
            <div class="modal-footer">
            <?php 
echo \humhub\widgets\AjaxButton::widget(['label' => Yii::t('CfilesModule.base', 'Save'), 'ajaxOptions' => ['type' => 'POST', 'beforeSend' => new yii\web\JsExpression('function(){ setModalLoader(); }'), 'success' => new yii\web\JsExpression('function(html){ $("#globalModal").html(html); openDirectory($("#input-hidden-selectedFolder").val()); selectDirectory($("#input-hidden-selectedFolder").val()); }'), 'url' => $contentContainer->createUrl('/cfiles/browse/move-files', [])], 'htmlOptions' => ['class' => 'btn btn-primary']]);
?>
            <button type="button" class="btn btn-primary"
                    data-dismiss="modal"><?php 
echo Yii::t('CfilesModule.base', 'Close');
?>
</button>

            </div>
        <?php 
CActiveForm::end();
?>
    </div>
    </div>
</div>