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


PHP X2Html::submitButton方法代码示例

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


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

示例1: submitButton

 public function submitButton(array $htmlOptions = array())
 {
     $html = '<div class="row button-row">';
     $htmlOptions = X2Html::mergeHtmlOptions($htmlOptions, array('class' => 'x2-button'));
     $html .= X2Html::submitButton(Yii::t('actions', 'Save'), $htmlOptions);
     $html .= '</div>';
     return $html;
 }
开发者ID:shuvro35,项目名称:X2CRM,代码行数:8,代码来源:ActionActiveFormBase.php

示例2: array

                    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>
开发者ID:tymiles003,项目名称:X2CRM,代码行数:30,代码来源:_topicReplyForm.php

示例3: function

 * 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".
 *****************************************************************************************/
Yii::app()->clientScript->registerCss('editGlobalCssCSS', "\n\n#global-css-editor + .CodeMirror {\n    height: 500px;\n}\n\n");
Yii::app()->clientScript->registerScript('editGlobalCssJS', "\n\$(window).on ('resize', function () {\n    var editor\$ = \$('#global-css-editor').next ();\n    editor\$.height (\$(window).height () - editor\$.offset ().top - 100);\n}).resize ();\n", CClientScript::POS_READY);
?>
<div class="page-title"><h2><?php 
echo CHtml::encode(Yii::t('admin', 'Edit Global CSS'));
?>
</h2></div>
<div class='form' id='global-css-edit-form-outer'>
<?php 
if (!X2Flashes::hasFlashes('error')) {
    $form = $this->beginWidget('X2ActiveForm', array('formModel' => $formModel));
    X2Flashes::renderFlashes('error');
    X2Flashes::renderFlashes('success');
    echo $form->labelEx($formModel, 'css');
    echo $form->codeEditor($formModel, 'css', array('id' => 'global-css-editor'));
    echo X2Html::submitButton(Yii::t('app', 'Save Stylesheet'), array('class' => 'x2-button'));
    $this->endWidget();
}
?>
</div>
开发者ID:dsyman2,项目名称:X2CRM,代码行数:30,代码来源:editGlobalCss.php

示例4: run

 public function run()
 {
     // If form is empty, we will not add the form wrappers
     if (!empty($this->form)) {
         parent::run();
         return;
     }
     $this->form = $this->beginWidget('CActiveForm', array('id' => $this->modelName . '-form', 'enableAjaxValidation' => false));
     parent::run();
     echo X2Html::tag('div', array('class' => 'row buttons save-button-row'));
     $text = $this->model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Save');
     echo X2Html::submitButton($text, array('class' => 'x2-button', 'id' => 'save-button', 'tabindex' => 24));
     echo '</div>';
     $this->endWidget();
 }
开发者ID:tymiles003,项目名称:X2CRM,代码行数:15,代码来源:FormView.php


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