当前位置: 首页>>代码示例>>PHP>>正文


PHP HHtml::ajaxSubmitButton方法代码示例

本文整理汇总了PHP中HHtml::ajaxSubmitButton方法的典型用法代码示例。如果您正苦于以下问题:PHP HHtml::ajaxSubmitButton方法的具体用法?PHP HHtml::ajaxSubmitButton怎么用?PHP HHtml::ajaxSubmitButton使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HHtml的用法示例。


在下文中一共展示了HHtml::ajaxSubmitButton方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array



            </div>
            <div class="clearFloats"></div>
        <?php 
}
?>


        <?php 
if (!$poll->hasUserVoted()) {
    ?>
            <br>
            <?php 
    $voteUrl = CHtml::normalizeUrl(array('/polls/poll/answer', 'sguid' => $space->guid, 'pollId' => $poll->id, 'wallType' => Wall::$currentType));
    echo HHtml::ajaxSubmitButton(Yii::t('PollsModule.widgets_views_entry', 'Vote'), $voteUrl, array('dataType' => 'json', 'success' => "function(json) {  \$('#wallEntry_'+json.wallEntryId).html(parseHtml(json.output)); }"), array('id' => "PollAnswerButton_" . $poll->id, 'class' => 'btn btn-primary'));
    ?>
            <br>
        <?php 
}
?>

        <div class="clearFloats"></div>

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

        <?php 
if ($poll->hasUserVoted()) {
    ?>
开发者ID:nilBora,项目名称:MVC_teaching_Yii,代码行数:29,代码来源:entry.php

示例2: array

                                <?php 
    echo Yii::t('AdminModule.views_module_setAsDefault', 'Always activated');
    ?>
                            </label>
                        </div>
                        <br/>
                    </div>
                <?php 
}
?>
            </div>            
        </div>
        <div class="modal-footer">

            <?php 
echo HHtml::ajaxSubmitButton(Yii::t('AdminModule.views_module_setAsDefault', 'Save'), array('//admin/module/setAsDefault', 'moduleId' => $module->getId()), array('type' => 'POST', 'beforeSend' => 'function(){ $("#invite-loader").removeClass("hidden"); }', 'success' => 'function(html){ $("#globalModal").html(html); }'), array('class' => 'btn btn-primary', 'id' => 'inviteBtn'));
?>
            <button type="button" class="btn btn-primary"
                    data-dismiss="modal"><?php 
echo Yii::t('AdminModule.views_module_setAsDefault', 'Close');
?>
</button>

            <div class="col-md-1 modal-loader">
                <div id="invite-loader" class="loader loader-small hidden"></div>
            </div>
        </div>

        <?php 
$this->endWidget();
?>
开发者ID:ahdail,项目名称:humhub,代码行数:31,代码来源:setAsDefault.php

示例3: array

                <?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 
    $this->widget('application.widgets.MarkdownEditorWidget', array('fieldId' => 'newMessage'));
    ?>
                </div>
                <hr>

                <?php 
    echo HHtml::ajaxSubmitButton(Yii::t('MailModule.views_mail_show', 'Send'), $this->createUrl('//mail/mail/show', array('id' => $message->id)), array('type' => 'POST', 'success' => 'function(html){ $("#mail_message_details").html(html); }'), array('class' => 'btn btn-primary'));
    ?>


                <div class="pull-right">

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

    <?php 
    if (count($message->users) > 2 && $message->originator->id != Yii::app()->user->id) {
        ?>
                        <a class="btn btn-danger"
                           href="<?php 
开发者ID:byronmejia,项目名称:humhub-themes-tq,代码行数:30,代码来源:show.php

示例4: array

    <?php 
echo CHtml::textArea("message", "", array('id' => 'newCommentForm_' . $id, 'rows' => '1', 'class' => 'form-control autosize commentForm', 'placeholder' => Yii::t('CommentModule.widgets_views_form', 'Write a new comment...')));
?>

    <?php 
$this->widget('application.widgets.HEditorWidget', array('id' => 'newCommentForm_' . $id));
?>

    <?php 
// Creates Uploading Button
$this->widget('application.modules_core.file.widgets.FileUploadButtonWidget', array('uploaderId' => 'comment_upload_' . $id, 'fileListFieldName' => 'fileList'));
?>

    <?php 
echo HHtml::ajaxSubmitButton(Yii::t('CommentModule.widgets_views_form', 'Post'), CHtml::normalizeUrl(array('/comment/comment/post')), array('type' => 'POST', 'success' => "function(html) {\n            \n            \$('#comments_area_" . $id . "').html(html);\n            \$('#newCommentForm_" . $id . "').val('').trigger('autosize.resize');\n            \$('#newCommentForm_" . $id . "_contenteditable').html('" . Yii::t('CommentModule.widgets_views_form', 'Write a new comment...') . "');\n            \$('#newCommentForm_" . $id . "_contenteditable').addClass('atwho-placeholder');\n            resetUploader('comment_upload_" . $id . "');\n\n        }"), array('id' => "comment_create_post_" . $id, 'class' => 'btn btn-small btn-primary', 'style' => 'position: absolute; left: -90000000px; opacity: 0;'));
?>

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


    <?php 
// Creates a list of already uploaded Files
$this->widget('application.modules_core.file.widgets.FileUploadListWidget', array('uploaderId' => 'comment_upload_' . $id));
?>
</div>

<script>
开发者ID:alefernie,项目名称:intranet,代码行数:29,代码来源:form.php

示例5: array

        <div class="contentForm_options">
            <p id="post_to_space_message" style="display:none; color:red;">Select a circle to post your message into.</p>
            <hr>
            <div class="btn_container">

                <div id="postform-loader" class="loader loader-postform 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>

                <?php 
$url = CHtml::normalizeUrl(Yii::app()->createUrl($submitUrl));
echo HHtml::ajaxSubmitButton($submitButtonText, $url, array('type' => 'POST', 'dataType' => 'json', 'beforeSend' => "function() {\n                    \$('.contentForm').removeClass('error');\n                    \$('#contentFormError').hide();\n                    \$('#contentFormError').empty();\n                }", 'beforeSend' => 'function(){ $("#contentFormError").hide(); $("#contentFormError li").remove(); $(".contentForm_options .btn").hide(); $("#postform-loader").removeClass("hidden"); }', 'success' => "function(response) {\n                    if (response.success) {\n\n                        // application.modules_core.wall function\n                        currentStream.prependEntry(response.wallEntryId);\n\n                        // Reset Form (Empty State)\n                        jQuery('.contentForm_options').hide();\n                        \$('.contentForm').filter(':text').val('');\n                        \$('.contentForm').filter('textarea').val('').trigger('autosize.resize');\n                        \$('.contentForm').attr('checked', false);\n                        \$('.userInput').remove(); // used by UserPickerWidget\n                        \$('#notifyUserContainer').addClass('hidden');\n                        \$('#notifyUserInput').val('');\n                        \$('.label-public').addClass('hidden');\n                        \$('#contentFrom_files').val('');\n                        \$('#public').attr('checked', false);\n                        \$('#contentForm_message_contenteditable').html('" . CHtml::encode(Yii::t("WallModule.widgets_views_contentForm", "What's on your mind?")) . "');\n                        \$('#contentForm_message_contenteditable').addClass('atwho-placeholder');\n\n                        // Notify FileUploadButtonWidget to clear (by providing uploaderId)\n                        resetUploader('contentFormFiles');\n\n                    } else {\n\n                        \$('#contentFormError').show();\n\n                        \$.each(response.errors, function(fieldName, errorMessage){\n\n                            // Mark Fields as Error\n                            fieldId = 'contentForm_'+fieldName;\n                            \$('#'+fieldId).addClass('error');\n\n                            \$.each(errorMessage, function(key, msg) {\n                                \$('#contentFormError').append('<li><i class=\"icon-warning-sign\"></i> '+msg+'</li>');\n                            });\n\n                        });\n\n                    }\n\n                     \$('.contentForm_options .btn').show(); \$('#postform-loader').addClass('hidden');\n             }"), array('id' => "post_submit_button", 'class' => 'btn btn-info'));
?>
                <?php 
// Creates Uploading Button
$this->widget('application.modules_core.file.widgets.FileUploadButtonWidget', 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();
开发者ID:byronmejia,项目名称:humhub-themes-tq,代码行数:31,代码来源:contentForm.php

示例6: array

                        <?php 
    $form = $this->beginWidget('CActiveForm', array('id' => 'account-register-form', 'enableAjaxValidation' => false));
    ?>

                        <div class="form-group">
                            <?php 
    echo $form->textField($registerModel, 'email', array('class' => 'form-control', 'id' => 'register-email', 'placeholder' => Yii::t('UserModule.views_auth_login', 'E-Mail Address')));
    ?>
                            <?php 
    echo $form->error($registerModel, 'email');
    ?>
                        </div>
                        <hr>

                        <?php 
    echo HHtml::ajaxSubmitButton(Yii::t('UserModule.views_auth_login', 'Register'), array('//user/auth/login'), array('type' => 'POST', 'success' => 'function(html){ $("#globalModal").html(html); }'), array('class' => 'btn btn-primary', 'id' => 'registerBtn'));
    ?>

                        <?php 
    $this->endWidget();
    ?>

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

    </div>
开发者ID:skapl,项目名称:design,代码行数:30,代码来源:login_modal.php

示例7: array

    <?php 
echo CHtml::form("#");
?>
    <?php 
echo CHtml::hiddenField('model', $modelName);
?>
    <?php 
echo CHtml::hiddenField('id', $modelId);
?>

    <?php 
echo CHtml::textArea("message", "", array('id' => 'newCommentForm_' . $id, 'rows' => '1', 'class' => 'form-control autosize commentForm', 'placeholder' => Yii::t('CommentModule.widgets_views_form', 'Write a new comment...')));
?>

    <?php 
echo HHtml::ajaxSubmitButton(Yii::t('CommentModule.widgets_views_form', 'Post'), CHtml::normalizeUrl(array('/comment/comment/post')), array('beforeSend' => "function() {\n                \$('#newCommentForm_" . $id . "').blur();\n                }", 'success' => "function(html) {\n            \n            \$('#comments_area_" . $id . "').html(html);\n            \$('#newCommentForm_" . $id . "').val('').trigger('autosize.resize');\n\n        }"), array('id' => "comment_create_post_" . $id, 'class' => 'btn btn-small btn-primary', 'style' => 'display: none;'));
?>

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

</div>

<script>
    // Fire click event for comment button by typing enter
    $('#newCommentForm_<?php 
echo $id;
?>
').keydown(function (event) {
开发者ID:crankyolditguy,项目名称:humhub,代码行数:30,代码来源:form.php

示例8: array

                    <br />
                    <?php 
echo $form->radioButtonList($model, 'reason', array('1' => Yii::t('ReportContent.widgets_views_reportSpamLink', 'Does not belong to this space'), '2' => Yii::t('ReportContent.widgets_views_reportSpamLink', 'It\'s offensive'), '3' => Yii::t('ReportContent.widgets_views_reportSpamLink', 'It\'s spam')));
?>
                    <?php 
echo $form->error($model, 'reason');
?>



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

                    <?php 
echo HHtml::ajaxSubmitButton(Yii::t('ReportContent.widgets_views_reportSpamLink', 'Submit'), $this->createUrl("//questionanswer/question/report", array()), array('type' => 'POST', 'success' => 'function(data) {data = JSON.parse(data); if(data.success) $("#reportLinkPost_modal_postreport_' . $object->id . '").hide();}'), array('class' => 'btn btn-primary', 'data-dismiss' => "modal", 'disabled' => 'disabled'));
?>
                </div>
                <?php 
$this->endWidget();
?>
            </div>
        </div>
    </div>

<script type="text/javascript">

    $(document).ready(function () {
        // move modal to body
        $('#submitReportContent_<?php 
echo $object->id;
开发者ID:tejrajs,项目名称:humhub-modules-questionanswer,代码行数:31,代码来源:reportSpamLink.php

示例9: array

?>
            </div>

        </div>
        <div class="modal-footer">
            <hr/>
            <div class="row">
				 <div class="col-sm-6">
					<?php 
$this->widget('application.widgets.ModalConfirmWidget', 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'), 'class' => 'btn btn-danger', 'linkHref' => $this->createUrl("//mail/mail/deleteEntry", array('messageEntryId' => $entry->id))));
?>
 
                 </div>
                 <div class="col-sm-6">
					<?php 
echo HHtml::ajaxSubmitButton(Yii::t('MailModule.views_mail_edit', 'Save'), $this->createUrl('//mail/mail/editEntry', array('messageEntryId' => $entry->id)), array('type' => 'POST', 'beforeSend' => 'function(){ $("#create-message-loader").removeClass("hidden"); }', 'success' => 'function(html){ $("#globalModal").html(html); }'), array('class' => 'btn btn-primary'));
?>
                 </div>
              </div>           

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


            <div class="col-md-1 modal-loader">
                <div id="create-message-loader" class="loader loader-small hidden"></div>
            </div>
        </div>
开发者ID:byronmejia,项目名称:humhub-themes-tq,代码行数:30,代码来源:editEntry.php

示例10: array

            <div class="form-group">
                <?php 
$this->widget('CCaptcha');
?>
                            
                <?php 
echo $form->textField($model, 'verifyCode', array('class' => 'form-control', 'placeholder' => Yii::t('UserModule.views_auth_recoverPassword', 'enter security code above')));
?>
                <?php 
echo $form->error($model, 'verifyCode');
?>
            </div>

            <hr>
            <?php 
echo HHtml::ajaxSubmitButton(Yii::t('UserModule.views_auth_recoverPassword', 'Reset password'), array('//user/auth/recoverPassword'), array('type' => 'POST', 'success' => 'function(html){ $("#globalModal").html(html); }'), array('class' => 'btn btn-primary', 'id' => 'recoverPasswordBtn'));
?>
            
            <?php 
echo HHtml::ajaxLink(Yii::t('UserModule.views_auth_recoverPassword', 'Back'), array('//user/auth/login'), array('type' => 'POST', 'success' => 'function(html){ $("#globalModal").html(html); }'), array('class' => 'btn btn-primary', 'id' => 'backBtn'));
?>
            <?php 
$this->endWidget();
?>
        </div>

    </div>
</div>    


<script type="text/javascript">
开发者ID:skapl,项目名称:design,代码行数:31,代码来源:recoverPassword_modal.php


注:本文中的HHtml::ajaxSubmitButton方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。