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


PHP Html::textArea方法代码示例

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


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

示例1: renderInput

 /**
  * Render the text area input
  */
 protected function renderInput()
 {
     if ($this->hasModel()) {
         $input = Html::activeTextArea($this->model, $this->attribute, $this->options);
     } else {
         $input = Html::textArea($this->name, $this->value, $this->options);
     }
     return $input;
 }
开发者ID:altiore,项目名称:yii2-markdown,代码行数:12,代码来源:MarkdownEditor.php

示例2: run

 /**
  * @inheritdoc
  */
 public function run()
 {
     if ($this->hasModel()) {
         echo Html::activeTextArea($this->model, $this->attribute, $this->options);
     } else {
         echo Html::textArea($this->name, $this->value, $this->options);
     }
     $this->registerClientScript();
 }
开发者ID:webtoolsnz,项目名称:yii2-widgets,代码行数:12,代码来源:Wysihtml5.php

示例3: run

 /**
  * @inheritdoc
  */
 public function run()
 {
     MarkdownAsset::register($this->view);
     $this->registerScripts();
     $this->options['id'] = $this->id;
     if ($this->hasModel()) {
         echo Html::activeTextArea($this->model, $this->attribute, $this->options);
     } else {
         echo Html::textArea($this->name, $this->value, $this->options);
     }
 }
开发者ID:iisns,项目名称:yii2-simplemde-markdown,代码行数:14,代码来源:Markdown.php

示例4: run

 public function run()
 {
     LeptureEditorAsset::register($this->view);
     $this->registerScripts();
     $this->options['id'] = $this->id;
     if ($this->hasModel()) {
         $textarea = Html::activeTextArea($this->model, $this->attribute, $this->options);
     } else {
         $textarea = Html::textArea($this->name, $this->value, $this->options);
     }
     echo '<div class="lepture">' . $textarea . '</div>';
 }
开发者ID:dungphanxuan,项目名称:yii2-lepture-editor,代码行数:12,代码来源:LeptureEditorWidget.php

示例5: run

 /**
  * @return string
  */
 public function run()
 {
     $this->registerAsset();
     $this->registerCsrf();
     $this->registerPlugins();
     $this->registerLanguage();
     $this->registerClientScript();
     if ($this->hasModel()) {
         return Html::activeTextArea($this->model, $this->attribute, $this->options);
     } else {
         return Html::textArea($this->name, $this->value, $this->options);
     }
 }
开发者ID:apurey,项目名称:cmf,代码行数:16,代码来源:ImperaviWidget.php

示例6: run

 public function run()
 {
     EpiceditorAssets::register($this->view);
     $this->registerScripts();
     //text area should be hidden, and DIV should be shown
     $this->textareaHtmlOptions = ArrayHelper::merge($this->textareaHtmlOptions, ['style' => 'display:none']);
     $this->textareaHtmlOptions['id'] = $this->options['textarea'];
     if ($this->hasModel()) {
         echo Html::activeTextArea($this->model, $this->attribute, $this->textareaHtmlOptions);
     } else {
         echo Html::textArea($this->name, $this->value, $this->textareaHtmlOptions);
     }
     $this->divHtmlOptions = ArrayHelper::merge($this->divHtmlOptions, ['id' => $this->options['container']]);
     echo Html::tag('div', '', $this->divHtmlOptions);
 }
开发者ID:ijackua,项目名称:yii2-epiceditor-widget,代码行数:15,代码来源:Epiceditor.php

示例7: run

 public function run()
 {
     if ($this->hasModel()) {
         echo Html::activeTextArea($this->model, $this->attribute, $this->options);
     } else {
         echo Html::textArea($this->name, $this->value, $this->options);
     }
     if (!isset($this->options['id'])) {
         $id = $this->hasModel() ? Html::getInputId($this->model, $this->attribute) : $this->getId();
     } else {
         $id = $this->options['id'];
     }
     $this->setOptions();
     $options = Json::encode($this->options);
     $this->registerEditorJs($id, $options);
 }
开发者ID:anandhugopi,项目名称:helpsystem,代码行数:16,代码来源:DMEditor.php

示例8: function

$script = " \najax_pagination();\nfunction ajax_pagination(){\n\t\$( '.pagination a' ).bind( 'click' , function (){  \n\t\t\$.post(\$( this ).attr( 'href' )," . Json::encode($query) . ",function(data){ \n\t\t \t\$( '#" . $paginatFormId . "' ).html(data); \n\t\t \tajax_pagination();\n\t\t}); \n\t\treturn  false ; \n\t});\n}";
UI::ajax(url('comment/ajax/index'), $query, "#" . $paginatFormId, $script);
if ($top === true) {
    echo "<div id='" . $paginatFormId . "'></div>";
}
if (true === Auth::check()) {
    ?>
	<div id="<?php 
    echo $infoMessage;
    ?>
" class="alert" style="display:none"></div>
	<?php 
    $form = ActiveForm::begin(array('options' => array('class' => 'form-horizontal', 'id' => $formId), 'fieldConfig' => array('inputOptions' => array('class' => 'input-xlarge'))));
    ?>
	<?php 
    echo Html::textArea('Comment[body]', null, array('required' => 'required', 'id' => 'Comment_body'));
    ?>
	 
	<p style='margin-top:10px;'>
		<?php 
    echo Html::button(__('comment'), null, null, array('class' => 'btn'));
    ?>
	</p>

	<?php 
    ActiveForm::end();
    UI::ajaxForm($formId, "\n\t\tif(data){\n\t\t\t\$('#" . $infoMessage . "').addClass('alert-error')\n\t\t\t\t.html(data).fadeIn();\n\t\t\t\$('#" . $formId . " .btn').html('" . __('comment') . "')\n\t\t\t\t\t.removeAttr('disabled','disabled');\n\t\t\n\t\t}else{\n\t\t\t\$('#" . $infoMessage . "').removeClass('alert-error')\n\t\t\t\t\t.addClass('alert-success')\n\t\t\t\t\t.html('" . __('commit success') . "')\n\t\t\t\t\t.fadeIn();\n\t\t\t\$('#" . $formId . " .btn').html('" . __('commented') . "');\n\t\t\t" . UI::ajax(url('comment/ajax/index'), $query, "#" . $paginatFormId, $script, false) . "\n\t\t}\n\t \n\t");
    js("\$('#" . $formId . " .btn').click(function(){\n\t\t\$('#" . $formId . "').submit();\n\t\t\$(this).html('" . __('commenting') . "……');\n\t\t\$(this).attr('disabled','disabled');\n\t\treturn false;\n\t});");
} else {
    ?>
	<div class='alert alert-waring'><?php 
开发者ID:rocketyang,项目名称:mincms,代码行数:31,代码来源:form.php

示例9: function

    $html = Yii::t("app", "Order Details:");
    $html .= "<h5>" . Yii::t("app", "Cart") . " <small>" . $cm . "</small></h5>";
    if ($shipping) {
        $html .= "<h5>" . Yii::t("app", "Shipping Cost") . " <small><i>" . Html::encode($shipping->provider . ' ' . $shipping->code) . '</i> ' . Yii::t("app", "destination ") . Html::encode($shipping->city . ' (' . $shipping->area . ")") . "</small></h5>";
    }
    return $html;
}], ['attribute' => 'total', 'value' => function ($data) {
    $module = Yii::$app->getModule('yes');
    return number_format($data->total, 2, $module->currency["decimal_separator"], $module->currency["thousand_separator"]);
}, 'hAlign' => 'right', 'pageSummary' => function ($summary, $data, $widget) {
    $module = Yii::$app->getModule('yes');
    $r = 0;
    foreach ($data as $d) {
        $r += floatval(str_replace($module->currency["thousand_separator"], "", $d));
    }
    return number_format($r, 2, $module->currency["decimal_separator"], $module->currency["thousand_separator"]);
}, 'pageSummaryFunc' => 'sum'], ['class' => 'kartik\\grid\\EditableColumn', 'attribute' => 'status', 'filterType' => GridView::FILTER_SELECT2, 'filterWidgetOptions' => ['data' => $searchModel->itemAlias('status'), 'options' => ['placeholder' => Yii::t('app', 'Filter by status...')], 'pluginOptions' => ['allowClear' => true]], 'value' => function ($data) {
    return $data->itemAlias('status', $data->status);
}, 'editableOptions' => function ($model, $key, $index) {
    return ['header' => Yii::t('app', 'Status'), 'size' => 'sm', 'inputType' => \kartik\editable\Editable::INPUT_SELECT2, 'options' => ['data' => $model->itemAlias('status'), 'options' => ['placeholder' => Yii::t('app', 'Filter by status...')], 'pluginOptions' => ['allowClear' => false]], 'placement' => 'left', 'showButtons' => false, 'resetButton' => false, 'afterInput' => function ($form, $widget) use($model, $index) {
        echo '<div class="form-group">';
        echo Html::textArea(substr($model->className(), strrpos($model->className(), "\\") + 1) . "[" . $index . "][complete_reference]", $model->complete_reference, ["class" => "form-control", "placeholder" => Yii::t("app", "Complete Reference")]);
        echo '</div>';
    }, 'pluginEvents' => ['editableSuccess' => "function(event, val, form, data) { \n\t\t\t\t\t\t\t\t\t\t\t\t\tvar model = JSON.parse(data.data);\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor (m in model)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\$('tr[data-key='+data.id+'] td').each(function(n,d){\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (n == m) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\$(d).html(model[m]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t}"]];
}, 'hAlign' => 'right'], 'complete_reference', ['class' => 'kartik\\grid\\ActionColumn', 'buttons' => ['view' => function ($url, $model, $key) {
    return Html::a('<span class="glyphicon glyphicon-eye-open"></span>', ["view", "reference" => $model->reference], ["title" => Yii::t("yii", "View")]);
}]]]]);
?>

</div>
开发者ID:highestgoodlikewater,项目名称:yes,代码行数:30,代码来源:admin.php

示例10: renderExport

 /**
  * Renders the export menu
  *
  * @return string
  */
 public function renderExport()
 {
     if ($this->export === false || !is_array($this->export)) {
         return '';
     }
     $formats = $this->exportConfig;
     if (empty($formats) || !is_array($formats)) {
         return '';
     }
     $title = $this->export['label'];
     $icon = $this->export['icon'];
     $options = $this->export['options'];
     $items = [];
     foreach ($formats as $format => $setting) {
         $label = empty($setting['icon']) || $setting['icon'] == '' ? $setting['label'] : '<i class="glyphicon glyphicon-' . $setting['icon'] . '"></i> ' . $setting['label'];
         $items[] = ['label' => $label, 'url' => '#', 'linkOptions' => ['class' => 'export-' . $format], 'options' => $setting['options']];
     }
     $title = $icon == '' ? $title : "<i class='glyphicon glyphicon-{$icon}'></i> {$title}";
     $action = Yii::$app->getModule('gridview')->downloadAction;
     if (!is_array($action)) {
         $action = [$action];
     }
     $frameId = $this->options['id'] . '_export';
     $form = Html::beginForm($action, 'post', ['class' => 'kv-export-form', 'style' => 'display:none', 'target' => '_blank']) . Html::textInput('export_filetype') . Html::textInput('export_filename') . Html::textArea('export_content') . '</form>';
     return ButtonDropdown::widget(['label' => $title, 'dropdown' => ['items' => $items, 'encodeLabels' => false], 'options' => $options, 'encodeLabel' => false]) . $form;
 }
开发者ID:pipekung,项目名称:yii2-grid,代码行数:31,代码来源:GridView.php

示例11: function

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>
    <p>
        <?php 
echo Html::a(Yii::t('app', 'Create {modelClass}', ['modelClass' => Yii::t('app', 'Customer')]), ['create'], ['class' => 'btn btn-success']);
?>
    </p>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'containerOptions' => ['style' => 'overflow: auto'], 'caption' => Yii::t('app', 'Customer'), 'headerRowOptions' => ['class' => 'kartik-sheet-style', 'style' => 'background-color: #fdfdfd'], 'filterRowOptions' => ['class' => 'kartik-sheet-style skip-export', 'style' => 'background-color: #fdfdfd'], 'pjax' => false, 'bordered' => true, 'striped' => true, 'condensed' => true, 'responsive' => true, 'hover' => true, 'showPageSummary' => true, 'pageSummaryRowOptions' => ['class' => 'kv-page-summary', 'style' => 'background-color: #fdfdfd'], 'tableOptions' => ["style" => "margin-bottom:50px;"], 'panel' => ['type' => GridView::TYPE_DEFAULT, 'heading' => false], 'toolbar' => [['content' => Html::a('<i class="glyphicon glyphicon-repeat"></i>', ['index'], ['data-pjax' => false, 'class' => 'btn btn-default', 'title' => Yii::t('app', 'Reset Grid')])], '{export}', '{toggleData}'], 'beforeHeader' => [['options' => ['class' => 'skip-export']]], 'floatHeader' => true, 'filterModel' => $searchModel, 'columns' => [['class' => 'kartik\\grid\\SerialColumn'], 'name', 'email:email', ['attribute' => 'phones', 'value' => function ($data) {
    return Html::encode(str_replace(",", ", ", $data->phones));
}], 'addresses:ntext', ['attribute' => 'last_time', 'value' => 'last_time', 'filterType' => GridView::FILTER_DATE_RANGE, 'filterWidgetOptions' => ['pluginOptions' => ['format' => 'YYYY-MM-DD HH:mm:ss', 'todayHighlight' => true, 'timePicker' => true, 'timePickerIncrement' => 15, 'opens' => 'left'], 'pluginEvents' => ["apply.daterangepicker" => 'function() {									
									$(this).change();
								}']]], ['class' => 'kartik\\grid\\EditableColumn', 'attribute' => 'last_action', 'filterType' => GridView::FILTER_SELECT2, 'filterWidgetOptions' => ['data' => $searchModel->itemAlias('last_action'), 'options' => ['placeholder' => Yii::t('app', 'Last action...')], 'pluginOptions' => ['allowClear' => true]], 'value' => function ($data) {
    return $data->itemAlias('last_action', $data->last_action);
}, 'editableOptions' => function ($model, $key, $index) {
    return ['header' => Yii::t('app', 'Last action'), 'size' => 'sm', 'inputType' => \kartik\editable\Editable::INPUT_SELECT2, 'options' => ['data' => $model->itemAlias('last_action'), 'options' => ['placeholder' => Yii::t('app', 'Last action...')], 'pluginOptions' => ['allowClear' => false]], 'placement' => 'left', 'showButtons' => false, 'resetButton' => false, 'afterInput' => function ($form, $widget) use($model, $index) {
        echo '<div class="form-group">';
        echo Html::textArea(substr($model->className(), strrpos($model->className(), "\\") + 1) . "[" . $index . "][remarks]", $model->remarks, ["class" => "form-control", "placeholder" => Yii::t("app", "Remarks")]);
        echo '</div>';
    }, 'pluginEvents' => ['editableSuccess' => "function(event, val, form, data) { \n\t\t\t\t\t\t\t\t\t\t\t\t\tvar model = JSON.parse(data.data);\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor (m in model)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\$('tr[data-key='+data.id+'] td').each(function(n,d){\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (n == m) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\$(d).html(model[m]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t}"]];
}, 'hAlign' => 'right'], 'remarks', ['class' => 'kartik\\grid\\ActionColumn']]]);
?>

</div>
开发者ID:highestgoodlikewater,项目名称:yes,代码行数:30,代码来源:index.php

示例12:

    echo "</ul>";
} else {
    echo "<p>Нет записей</p>";
}
?>
</div>
<div class="artclCrt">
<?php 
ActiveForm::begin(['method' => 'post', 'action' => ['']]);
?>
<p>
<?php 
echo Html::textInput('name_article', null, ['class' => 'name_article']);
?>
</p>
<p>
<?php 
echo Html::textArea('body_article', '', ['class' => 'body_article']);
?>
</p>
<p class="submit_button">
<?php 
echo Html::submitButton('Создать', ['type' => 'submit', 'class' => 'btn btn-default']);
?>
</p>
<?php 
ActiveForm::end();
?>
</div>
</div>
开发者ID:rkashapov2015,项目名称:rinatk-yii,代码行数:30,代码来源:blog.php

示例13: run

 public function run()
 {
     $input = $this->hasModel() ? Html::activeTextArea($this->model, $this->attribute, $this->options) : Html::textArea($this->name, $this->value, $this->options);
     echo $input;
     $this->registerClientScript();
 }
开发者ID:claudejanz,项目名称:yii2-wysihtml5,代码行数:6,代码来源:Wysihtml5.php

示例14: array

echo $id;
?>
" class="comment_create">

    <?php 
echo Html::beginForm("#");
?>
    <?php 
echo Html::hiddenInput('contentModel', $modelName);
?>
    <?php 
echo Html::hiddenInput('contentId', $modelId);
?>

    <?php 
echo Html::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 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    }";
开发者ID:SimonBaeumer,项目名称:humhub,代码行数:31,代码来源:form.php

示例15: Date

');
?>

<div class="yboard-ban-form">

    <?php 
echo Html::beginForm();
?>
    <div class="form-group">
        <div class="form-label pad5 header3"> 
            <?php 
echo YBoard::t('yboard', 'Ban Reason');
?>
        </div>
        <?php 
echo Html::textArea('message', null, ['id' => 'ban-message', 'maxlength' => 255, 'class' => 'form-control']);
?>
    </div>
    
    <div class="form-group">
        <div class="form-label pad5 header3"> 
            <?php 
echo YBoard::t('yboard', 'Ban Expiry Date ({format})', ['format' => 'YYYY-MM-DD']);
?>
        </div>
        <?php 
echo Html::textInput('expires', null, ['id' => 'ban-expires', 'maxlength' => 255, 'class' => 'form-control']);
?>
 
    </div>
开发者ID:dextercool,项目名称:yii2-yiiboard,代码行数:30,代码来源:_banForm.php


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