本文整理汇总了PHP中CHtml::Button方法的典型用法代码示例。如果您正苦于以下问题:PHP CHtml::Button方法的具体用法?PHP CHtml::Button怎么用?PHP CHtml::Button使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CHtml
的用法示例。
在下文中一共展示了CHtml::Button方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<input type="text" name="product_name" id="paycode" readonly />
<?php
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'paymentmethod_dialog', 'options' => array('title' => Yii::t('app', 'Payment Method'), 'width' => 'auto', 'autoOpen' => false, 'modal' => true)));
$paymentmethod = new Paymentmethod('search');
$paymentmethod->unsetAttributes();
// clear any default values
if (isset($_GET['Paymentmethod'])) {
$paymentmethod->attributes = $_GET['Paymentmethod'];
}
$this->widget('zii.widgets.grid.CGridView', array('id' => 'paymentmethod-grid', 'dataProvider' => $paymentmethod->Searchwstatus(), 'filter' => $paymentmethod, 'template' => '{summary}{pager}<br>{items}{pager}{summary}', 'columns' => array(array('header' => '', 'type' => 'raw', 'value' => 'CHtml::Button("+",
array("name" => "send_absschedule",
"id" => "send_absschedule",
"onClick" => "$(\\"#paymentmethod_dialog\\").dialog(\\"close\\");$(\\"#paycode\\").val(\\"$data->paycode\\");$(\\"#Soheader_paymentmethodid\\").val(\\"$data->paymentmethodid\\");
"))'), array('name' => 'paymentmethodid', 'visible' => false, 'value' => '$data->paymentmethodid'), 'paycode', 'paydays')));
$this->endWidget('zii.widgets.jui.CJuiDialog');
echo CHtml::Button('...', array('onclick' => '$.fn.yiiGridView.update("paymentmethod-grid");$("#paymentmethod_dialog").dialog("open"); return false;'));
?>
<?php
echo $form->error($model, 'paymentmethodid');
?>
</div>
</td>
<td>
<div class="row">
<?php
echo $form->labelEx($model, 'headernote');
?>
<?php
echo $form->textArea($model, 'headernote', array('rows' => 6, 'cols' => 50));
?>
<?php
示例2: array
Yum::t('Yum Text Settings')=>array(Yii::t('app', 'index')),
Yum::t('Create'),
);
?>
<h1> <? echo Yum::t('New text Configuration'); ?></h1>
<div class="form">
<? $form=$this->beginWidget('CActiveForm', array(
'id'=>'yum-text-settings-form',
'enableAjaxValidation'=>true,
));
echo $this->renderPartial('/settings/_form', array(
'model'=>$model,
'form' =>$form
)); ?>
<div class="row buttons">
<?
$url = array(Yii::app()->request->getQuery('returnTo'));
if(empty($url[0]))
$url = array('/textsettings/admin');
echo CHtml::Button(Yii::t('app', 'Cancel'), array('submit' => $url)); ?>
<? echo CHtml::submitButton(Yii::t('app', 'Create')); ?>
</div>
<? $this->endWidget(); ?>
</div>
示例3: function
},
dataType: "text"
});
},
"Cancel" : function() {
$(this).dialog("close");
}
});
}
</script>
<div id="listOptions" width="100%">
<table id="optionsList" width="100%" border="0" cellspacing="0" cellpadding="0">
<thead>
<tr>
<th title = "Name">Name</th>
<th title = "Edit">Edit</th>
<th title = "Delete">Delete</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div class="row">
<?php
echo CHtml::Button(Yii::t("translation", 'Add Option'), array('id' => 'load', 'submit' => array('options/addOption'), 'type' => 'submit'));
?>
</div>
示例4: array
<p> The Country <?php
echo $model;
?>
has been successfully
created </p>
<?php
echo CHtml::Button(Yii::t('app', 'Back'), array('id' => $relation . '_done'));
echo CHtml::Button(Yii::t('app', 'Add another Country'), array('id' => $relation . '_create'));
示例5: array
$this->breadcrumbs=array(
'Manage text settings'=>array('index'),
$model->id=>array('view','id'=>$model->id),
Yii::t('app', 'Update'),
);
?>
<div class="form">
<? $form=$this->beginWidget('CActiveForm', array(
'id'=>'yum-text-settings-form',
'enableAjaxValidation'=>true,
));
echo $this->renderPartial('/textsettings/_form', array(
'model'=>$model,
'form' =>$form
)); ?>
<div class="row buttons">
<?
$url = array('yumTextSettings/admin');
echo CHtml::Button(Yum::t( 'Cancel'), array('submit' => $url)); ?>
<? echo CHtml::submitButton(Yum::t( 'Update')); ?>
</div>
<? $this->endWidget(); ?>
</div><!-- form -->
示例6: array
<div class="row">
<?php
echo $form->labelEx($model, 'age');
?>
<?php
echo $form->textField($model, 'age');
?>
<?php
echo $form->error($model, 'age');
?>
</div>
<div class="row buttons">
<?php
echo CHtml::Button('SUBMIT', array('onclick' => 'send();'));
?>
</div>
<?php
$this->endWidget();
?>
</div><!-- form -->
<script type="text/javascript">
function send()
{
var data=$("#person-form-edit_person-form").serialize();
示例7: array
}
echo $form->error($profile, $field->varname);
/* lomake */
}
?>
<div class="row form">
<div class="col-sm-3">
<div class="row">
<?php
echo CHtml::Button('Jäädytä tunnuksesi', array('submit' => array('/site/myyjan_tilanne', "id" => $model->id, "tila" => 4), 'confirm' => 'Haluatko varmasti jäädyttää myyjä tunnuksesi? Aktivoidaksesi tunnus uudelleen sinun täytyy ottaa yhteyttä sähköpostiin asiakaspalvelu@miinus.fi.', 'class' => 'btn btn-warning btn-block'));
?>
<br>
<?php
echo CHtml::Button('Poista tunnuksesi', array('submit' => array('/site/myyjan_tilanne', "id" => $model->id, "tila" => 5), 'confirm' => 'Haluatko varmasti poistaa myyjä tunnuksesi? Poistamisen jälkeen tunnukset eivät enää toimi.', 'class' => 'btn btn-danger btn-block'));
?>
<br>
<?php
echo CHtml::link('Vaihda salasana', 'changepassword', array('class' => 'btn btn-primary btn-block'));
?>
<br>
<?php
echo CHtml::submitButton($model->isNewRecord ? UserModule::t('Luo') : UserModule::t('Tallenna'), array('class' => 'btn btn-primary btn-block'));
?>
</div>
<?php
$this->endWidget();
?>
</div>
示例8: array
?>
<div class='hint'><?php
if ('hint.Language.name' != ($hint = Yii::t('app', 'name'))) {
echo $hint;
}
?>
</div>
</div>
<div class="row">
<?php
echo $form->labelEx($model, 'last_update');
echo $form->textField($model, 'last_update');
echo $form->error($model, 'last_update');
?>
<div class='hint'><?php
if ('hint.Language.last_update' != ($hint = Yii::t('app', 'last_update'))) {
echo $hint;
}
?>
</div>
</div>
<?php
echo CHtml::Button(Yii::t('app', 'Cancel'), array('submit' => array('language/admin')));
echo CHtml::submitButton(Yii::t('app', 'Save'));
$this->endWidget();
?>
</div> <!-- form -->
示例9: array
<img src="images/note.png" alt="Note" />
<p style="margin-top:10px"><?php
echo Yii::t('feedback', 'Note');
?>
</p>
</div>
</div>
<div id="note_text">
<textarea id="note_textarea" rows="5" cols="35"></textarea>
</div>
<div class="jFormComponent button" style="width:90%; text-align:center">
<?php
echo CHtml::Button(Yii::t('feedback', 'Cancel'), array('onclick' => 'closePanel();', 'onmouseover' => 'overButton();', 'onmouseout' => 'outButton();', 'class' => 'buttonFeed'));
?>
<?php
echo CHtml::Button(Yii::t('feedback', 'Send'), array('onclick' => 'sendFeedback();', 'onmouseover' => 'overButton();', 'onmouseout' => 'outButton();', 'class' => 'buttonFeed'));
?>
</div>
</div>
<?php
$this->endWidget();
?>
</div>
</div><!-- page -->
</div> <!-- ie6-container-wrap-->
<div id="screen_draw" class="black_overlay"></div>
<div id="screen_draw_loader"></div>
</body>
示例10: array
?>
'>
<?php
echo $form->textField($model, 'phone', array('size' => 50, 'maxlength' => 50));
echo $form->error($model, 'phone');
?>
</span>
</div>
</div>
</div>
</div>
</div>
<p class="alert">
<?php
echo Yii::t('PersonModule.crud_static', 'Fields with <span class="required">*</span> are required.');
?>
</p>
<div class="form-actions">
<?php
echo CHtml::Button(Yii::t('D2companyModule.crud_static', 'Cancel'), array('class' => 'btn cancel'));
echo ' ' . CHtml::submitButton(Yii::t('PersonModule.crud_static', 'Save'), array('class' => 'btn btn-primary'));
?>
</div>
<?php
$this->endWidget();
?>
</div>
示例11: array
<?php
$this->title = Yum::t('{role}', array('{role}' => $model->title));
$this->breadcrumbs = array(Yum::t('Roles') => array('index'), Yum::t('View'), $model->title);
echo $model->description;
?>
<br />
<?php
echo Yum::p('This users have been assigned to this role');
?>
<?php
if ($assignedUsers) {
}
$this->widget('zii.widgets.grid.CGridView', array('dataProvider' => $assignedUsers, 'columns' => array('username', 'status')));
?>
<br />
<?php
if (Yum::hasModule('membership')) {
echo Yum::p('This users have a ordered memberships of this role');
if ($activeMemberships) {
$this->widget('zii.widgets.grid.CGridView', array('dataProvider' => $activeMemberships, 'columns' => array('id', 'user.username', array('name' => 'order_date', 'value' => 'date("Y. m. d G:i:s", $data->order_date)'), array('name' => 'end_date', 'value' => 'date("Y. m. d G:i:s", $data->end_date)'), array('name' => 'payment_date', 'value' => 'date("Y. m. d G:i:s", $data->payment_date)'), 'role.price', 'payment.title')));
}
}
if (Yii::app()->user->isAdmin()) {
echo CHtml::Button(Yum::t('Update role'), array('submit' => array('role/update', 'id' => $model->id)));
}
示例12: array
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'invacccurrency_dialog', 'options' => array('title' => Yii::t('app', 'Currency'), 'width' => 'auto', 'autoOpen' => false, 'modal' => true)));
$currency = new Currency('searchwstatus');
$currency->unsetAttributes();
// clear any default values
if (isset($_GET['Currency'])) {
$currency->attributes = $_GET['Currency'];
}
$this->widget('zii.widgets.grid.CGridView', array('id' => 'invacccurrency-grid', 'dataProvider' => $currency->Searchwstatus(), 'filter' => $currency, 'template' => '{summary}{pager}<br>{items}{pager}{summary}', 'columns' => array(array('header' => '', 'type' => 'raw', 'value' => 'CHtml::Button("V",
array("name" => "send_absschedule",
"id" => "send_absschedule",
"onClick" => "$(\\"#invacccurrency_dialog\\").dialog(\\"close\\");
$(\\"#invacccurrencyname\\").val(\\"$data->currencyname\\");
$(\\"#Invoiceacc_currencyid\\").val(\\"$data->currencyid\\");
"))'), array('name' => 'currencyid', 'visible' => false, 'value' => '$data->currencyid', 'htmlOptions' => array('width' => '1%')), 'currencyname', 'symbol')));
$this->endWidget('zii.widgets.jui.CJuiDialog');
echo CHtml::Button('...', array('onclick' => '$("#invacccurrency_dialog").dialog("open"); return false;'));
?>
<?php
echo $form->error($model, 'currencyid');
?>
</div>
<div class="row">
<?php
echo $form->labelEx($model, 'currencyrate');
?>
<?php
echo $form->textField($model, 'currencyrate');
?>
<?php
echo $form->error($model, 'currencyrate');
示例13: foreach
$result = Yii::app()->db->createCommand("SELECT id_kri FROM kartu_rawat_inap WHERE `id_pasien`= '{$data}'")->queryAll();
//var_dump($result);
foreach ($result as $zz) {
$nomorkartu = $zz['id_kri'];
}
if (sizeof($result) == 0) {
?>
<font color="#999999" size="6">Tidak mempunyai Nomor Kartu</b></font><br><br>
<?php
echo CHtml::Button('Daftar Sebagai Rawat Inap Baru', array('submit' => array('/trawatinap/CreateNotExisting', 'id' => $data)));
?>
<?php
} else {
?>
<font color="#999999" size="6">Nomor Kartu <b><?php
echo $nomorkartu;
?>
</b></font><hr>
<font color="#999999" size="4">Daftar Rekam medis Rawat Inap Pasien</font>
<?php
$gridDataProvider = new CActiveDataProvider('Trawatinap', array('criteria' => array('condition' => 'id_kri like "%' . $nomorkartu . '%"')));
?>
<?php
$this->widget('booster.widgets.TbGridView', array('id' => 'trawatinap-grid', 'dataProvider' => $gridDataProvider, 'columns' => array('tgl', array('class' => 'booster.widgets.TbButtonColumn', 'template' => '{viewedit}{updateedit}{deleteedit}', 'buttons' => array('viewedit' => array('label' => 'View', 'imageUrl' => Yii::app()->request->baseUrl . '/images/view.png', 'url' => "CHtml::normalizeUrl(array('trawatinap/view','id'=>\$data->id_rawat_inap))"), 'updateedit' => array('label' => 'Update', 'imageUrl' => Yii::app()->request->baseUrl . '/images/create.png', 'url' => "CHtml::normalizeUrl(array('trawatinap/update','id'=>\$data->id_rawat_inap,'id_pasien'=>{$data}))"), 'deleteedit' => array('label' => 'Delete', 'imageUrl' => Yii::app()->request->baseUrl . '/images/delete.png', 'url' => "CHtml::normalizeUrl(array('trawatinap/delete','id'=>\$data->id_rawat_inap,'id_pasien'=>{$data}))"))))));
echo CHtml::Button('Tambah Rawat Inap Baru', array('submit' => array('/trawatinap/CreateExisting', 'id' => $nomorkartu, 'id_pasien' => $data)));
}
?>
示例14: array
<div class="form">
<?php
$form = $this->beginWidget('CActiveForm', array('id' => 'payment-form', 'enableAjaxValidation' => true));
echo $form->errorSummary($model);
?>
<div class="row">
<?php
echo $form->labelEx($model, 'title');
echo $form->textField($model, 'title', array('size' => 60, 'maxlength' => 255));
echo $form->error($model, 'title');
?>
</div>
<div class="row">
<?php
echo $form->labelEx($model, 'text');
echo $form->textArea($model, 'text', array('rows' => 6, 'cols' => 50));
echo $form->error($model, 'text');
?>
</div>
<?php
echo CHtml::Button(Yii::t('app', 'Cancel'), array('onClick' => "\$('#" . $relation . "_dialog').dialog('close');"));
echo CHtml::Button(Yii::t('app', 'Create'), array('id' => "submit_" . $relation));
$this->endWidget();
?>
</div> <!-- form -->
示例15: array
echo $form->error($model, 'stst_icon');
?>
<?php
if ('help.stst_icon' != ($help = Yii::t('D1StatusModule.crud', 'help.stst_icon'))) {
echo "<span class='help-block'>{$help}</span>";
}
?>
</div>
</div>
</div> <!-- main inputs -->
<div class="span4"> <!-- sub inputs -->
</div> <!-- sub inputs -->
</div>
<div class="form-actions">
<?php
echo CHtml::Button(Yii::t('D1StatusModule.crud', 'Cancel'), array('submit' => isset($_GET['returnUrl']) ? $_GET['returnUrl'] : array('stststate/admin'), 'class' => 'btn'));
echo ' ' . CHtml::submitButton(Yii::t('D1StatusModule.crud', 'Save'), array('class' => 'btn btn-primary'));
?>
</div>
<?php
$this->endWidget();
?>
</div> <!-- form -->