當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Html::Button方法代碼示例

本文整理匯總了PHP中yii\helpers\Html::Button方法的典型用法代碼示例。如果您正苦於以下問題:PHP Html::Button方法的具體用法?PHP Html::Button怎麽用?PHP Html::Button使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在yii\helpers\Html的用法示例。


在下文中一共展示了Html::Button方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

   
<?php 
echo $form->field($model, 'final', ['addon' => ['prepend' => ['content' => '₹', 'options' => ['class' => 'alert-success']]], 'inputOptions' => ['placeholder' => "Click View Price.", 'readOnly' => true]])->textinput(['class' => 'form-control mainprice'])->label(false);
?>
     
     </div>


</div>

<div class="col-sm-10 text-center" style="margin-top: 10px;" >

<div class="col-sm-5"></div>
<div class="col-sm-7">
<?php 
echo Html::Button('View Price', ['class' => 'btn btn-primary2', 'id' => 'create']);
?>


</div>
</div>

</div>
        
<div class="col-sm-10 text-center"  style="margin-top: 100px;">

<div class="col-sm-5"></div>
<div class="col-sm-7">
    <div class="form-group">
    
    
開發者ID:vaibhavk01,項目名稱:motor,代碼行數:28,代碼來源:quote.php

示例2:

// panel heading
echo Html::beginTag('div', ['class' => 'panel-heading', 'style' => 'height:80px;background-color:#fff;border:none;']);
echo Html::Tag('p', Html::a($model->name, ['products/view', 'product_id' => $model->id], ['style' => 'display:block;']), ['class' => 'text-center']);
echo HTML::endTag('div');
// panel heading
// panel body
echo Html::beginTag('div', ['class' => 'panel-body', 'style' => 'height:187px;text-align:center;']);
$mainPhoto = $model->MainPhoto;
echo Html::a(Html::img($mainPhoto->getUrl('original'), ['class' => 'img-responsive', 'style' => 'display: -moz-inline-box; display: inline-block;	vertical-align: middle;	height:100%; zoom: 1;']), ['products/view', 'product_id' => $model->product_id]);
echo HTML::endTag('div');
// panel body
// panel footer
echo Html::beginTag('div', ['class' => 'col-xs-12 col-sm-12 col-md-12 col-lg-12']);
echo Html::beginTag('div', ['class' => 'panel-footer', 'style' => 'background-color:#fff;']);
echo Html::Tag('span', number_format($model->price, 0, '.', ' ') . '<i class="glyphicon glyphicon-ruble" style="font-size: 18px;" aria-hidden="true"></i>', ['class' => 'h3', 'style' => 'color:#d2322d;line-height:1.42;']);
echo Html::Button('Купить', ['id' => "put" . $model->id, 'class' => 'btn btn-success pull-right', 'style' => 'border-radius: 0px;']);
echo HTML::endTag('div');
echo HTML::endTag('div');
// panel footer
echo HTML::endTag('div');
?>
	
<?php 
$url = Url::toRoute('/cart/put/');
$jsCartPut = <<<JS

\t\t\t\$("#put{$model->id}").on('click',


\t\t\t\tfunction() {
開發者ID:sapgv,項目名稱:distributive,代碼行數:30,代碼來源:panelView.php

示例3:

?>
						</div>
					</div>
				</div>

				<div class="container">
					<div class='col-md-6'><?php 
echo $form->field($event, 'is_public')->checkbox();
?>
</div>
				</div>

				<div class="container">
					<div class='col-md-6 form-inline align_right'>
						<p>
                            <?php 
echo Html::submitButton(Yii::t('app', 'Submit'), ['class' => 'btn btn-large btn-primary']);
?>
							<?php 
echo Html::Button(Yii::t('app', 'Previous'), ['class' => 'btn btn-primary btnPrevious']);
?>
							<?php 
echo Html::submitButton(Yii::t('app', 'Close'), ['class' => 'btn btn-danger btn-default', 'data-dismiss' => 'modal']);
?>
						</p>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
開發者ID:maildownload1985,項目名稱:project_demo,代碼行數:31,代碼來源:_event.php

示例4: urldecode

                    <table>
                        <tr>
                            <td class="item no-padding col-lg-5 col-md-5 col-sm-5 col-xs-5"></td>
                            <td class="summary-deliverydate td col-lg-4 col-md-4 col-sm-4 col-xs-4"></td>
                            <td class="summary-price td col-lg-3 col-md-3 col-sm-3 col-xs-3">$ 0</td>
                        </tr>
                    </table>
                </div>
            </div>
            <div class="col-lg-3"></div>
        </div>
    </div>

    <div class="form-group">
        <?php 
echo Html::Button($model->isNewRecord ? 'Book only' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary', 'id' => 'submit']);
?>
        
		<a href="<?php 
echo urldecode(Yii::$app->urlManager->createUrl('bookings/delete&id=' . $model->id));
?>
" id="delete" class = "<?php 
echo $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary';
?>
">
        <?php 
echo isset($is_order) ? $is_order ? 'Delete Order' : 'Delete Booking' : 'Delete Booking';
?>
		</a>
    </div>
開發者ID:darkofmoon,項目名稱:ett,代碼行數:30,代碼來源:_form.php

示例5:

							             							               
							            </div>
							        </div>							
							    <?php 
}
?>
							</div>
						</div>
                    </div>
                  <div class="form-button-box">
                    <?php 
if ($flash = Yii::$app->session->getFlash('Forgot-success')) {
    ?>
    
                       <a href="/user/login"><?php 
    echo Html::Button('Return', ['class' => 'btn btn-primary']);
    ?>
</a>
                       <?php 
} else {
    ?>
 
                       <?php 
    echo Html::submitButton(Yii::t('app', 'Submit'), ['class' => 'btn btn-primary']);
    ?>
                       <?php 
}
?>
                  </div>
                  <?php 
ActiveForm::end();
開發者ID:ailingsen,項目名稱:betterdebt,代碼行數:30,代碼來源:forgot.php

示例6: Organ

                <?php 
echo Html::hiddenInput('osmotrakt_id', $osmotrakt_id, ['id' => 'osmotrakt-osmotrakt_id']);
?>

                <?php 
echo $form->field($model, 'organ_id')->widget(Select2::classname(), Proc::DGselect2(['model' => $model, 'resultmodel' => new Organ(), 'fields' => ['keyfield' => 'organ_id', 'resultfield' => 'organ_name'], 'placeholder' => 'Выберете организацию', 'resultrequest' => 'Fregat/organ/selectinput', 'thisroute' => $this->context->module->requestedRoute]));
?>

            </div>
        </div>
    </div>

    <div class="form-group">
        <div class="panel panel-default">
            <div class="panel-heading">
                <?php 
echo Html::Button('<i class="glyphicon glyphicon-ok"></i> Отправить', ['class' => 'btn btn-primary ', 'id' => 'SendOsmotraktDialog_apply']);
?>
                <?php 
echo Html::Button('<i class="glyphicon glyphicon-remove"></i> Отмена', ['class' => 'btn btn-danger', 'id' => 'SendOsmotraktDialog_close']);
?>
              </div>
        </div>
    </div>

    <?php 
ActiveForm::end();
?>
</div>
開發者ID:vovancho,項目名稱:yii2test,代碼行數:29,代碼來源:_osmotraktsend.php

示例7:

                <div class="form-group">
                    <?= Html::label("Categoria", ['class' => 'form-control'])
                    ?>
                    <?=
                    $modelCompra->isNewRecord ?
                        Html::dropDownList('Produto[idCategoria]', null, $categorias, ['class' => 'form-control',
                            'id' => 'produto-idcategoria', 'prompt' => 'Seleciona a categoria...']) : ''

                    ?>
                </div>


                <?=
                $modelCompra->isNewRecord ? Html::Button('Cadastra Novo Produto',
                    ['class' => 'btn btn-success',
                        'id' => 'btCadastrarNovoProduto',
                        'title' => 'Clique aqui para cadastrar um novo produto']) : '' ?>

            </div>

        </div>


        <?php
        \yii\bootstrap\Modal::end();
        ?>

        <!--   ---------------------------   END Cadastrar Novo Produto  ---------------------------  -->
    </div>

    <?php ActiveForm::end(); ?>
開發者ID:aryangomes,項目名稱:applanchonete,代碼行數:31,代碼來源:_form.php

示例8:

    <?php 
echo $form->field($model, 'jackpot_id')->textInput();
?>

    <?php 
echo $form->field($model, 'ticket_number')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'created_on')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'updated_on')->textInput();
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
        <?php 
echo Html::a(Html::Button('Cancel', ['class' => 'btn btn-primary']), Yii::$app->request->referrer);
?>
    </div>

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

</div>
開發者ID:soodsse,項目名稱:YII2demo,代碼行數:30,代碼來源:_form.php

示例9: foreach

echo Html::Button('Выберите основную фотографию (490х150) - 1 шт', ['class' => 'btn btn-primary', 'onclick' => '$(".send-main-file").click()']);
?>
                    </div>

                    <div class="form-group photos-main">
                        <?php 
if ($model->main_image) {
    echo "<img id='img-" . $model->id . "' onclick='delImageMain(" . $model->id . ")' class='del-on-hover' src='/upload/items_images_main/" . $model->main_image . "' alt='' width='490px' height='150px' title='Кликнуть для удаления'>";
}
?>

                    </div>

                    <div class="form-group">
                        <?php 
echo Html::Button('Выберите дополнительные фотографии (300x300) - макс 5 шт', ['class' => 'btn btn-success', 'onclick' => '$(".send-file").click()']);
?>
                    </div>


                    <div class="form-group photos">
                        <?php 
if ($model->id) {
    ?>
                        <?php 
    $_modelPhotos = Photo::getPhotos($model->id);
    if ($_modelPhotos) {
        foreach ($_modelPhotos as $photo) {
            echo "<img id='img-" . $photo->id . "' onclick='delImage(" . $photo->id . ")' class='del-on-hover' src='/upload/items_images/" . $photo->name . "' alt='' width='100px' height='100px' title='Кликнуть для удаления'>";
        }
    }
開發者ID:kotmonstr,項目名稱:gitar,代碼行數:31,代碼來源:_form.php

示例10:

echo $form->field($model, 'image_file')->fileInput(['class' => 'send-file', 'onchange' => 'sendfile()'])->label('');
?>
    <?php 
echo $form->field($model, 'image_file_extra[]')->fileInput(['class' => 'hidden', 'onchange' => 'uploadExtraImage(' . $model->id . ')', 'multiple' => true])->label('');
?>


    <?php 
echo $model->image != '' ? Html::img('/upload/goods/' . $model->image, ['width' => '200px', 'height' => '200px', 'class' => 'target_image']) : Html::img('/img-custom/no_photo.jpg', ['width' => '200px', 'height' => '200px', 'class' => 'target_image']);
?>

    <?php 
if (!$model->isNewRecord) {
    ?>
        <?php 
    echo Html::Button('<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>Добавить фото', ['class' => 'btn', 'onclick' => '$("#goods-image_file_extra").click()']);
    ?>
    <?php 
}
?>
    <div style="width:700px;">
        <?php 
echo $form->field($model, 'new_image')->hiddenInput(['class' => 'new_image'])->label('');
?>
    </div>
    <div class="form-group" style="margin-top: 10px">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Создать' : 'Редактировать', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>

    </div>
開發者ID:kotmonstr,項目名稱:full-shop,代碼行數:31,代碼來源:_form.php

示例11:

        ?>
<br>I understand that all monthly interest payments made by check will incur a processing fee of  <?php 
        echo $config['fee'];
        ?>
 . The processing fee will not be charged for any prepayments made by check.</p>
                      <p>I understand that if I pay by check and submit an amount that is less than the amount of my monthly payment as specified in my monthly statement or my monthly payment is not received by Supernova Lending on or before the payment due date specified in my monthly statement, Supernova Lending may make a credit advance from my BriteLine to pay my monthly payment.  I understand that if Supernova Lending makes a credit advance from my BriteLine to pay my monthly interest payment, that monthly payment amount will be added to the outstanding principal balance of my BriteLine and will accrue interest based on the interest rate in effect under the BriteLine, which may result in compounding of interest.</p>
              <?php 
    }
    ?>
                <!-- Agree and Save -->
                <div class="agree-but" style="float:right">
                  <a href="<?php 
    echo Url::to(['/loan/doupdate']);
    ?>
"><?php 
    echo Html::Button(Yii::t('app', 'Update'), ['class' => 'btn btn-primary form-padding-but btn-loading']);
    ?>
</a>
                   
                </div>
               </div>

 
              </form>   
          </div>

          <?php 
}
?>
      	</div>
      </main>
開發者ID:ailingsen,項目名稱:betterdebt,代碼行數:31,代碼來源:payment.php

示例12:

							     </span>
							  </ul>
						  <br/>
						</div>
					</div>
				</div>
				
				<div class="container">
					<div class='col-md-6'>
						<div ng-controller="list_employee">
							<?php 
echo $form->field($model_sms, 'is_sms')->checkbox();
?>
						</div>
					</div>
				</div>
				<div class="container">
					<div class='col-md-6 form-inline align_right'>
							<?php 
echo Html::Button(Yii::t('app', 'Next'), ['class' => 'btn btn-primary btnNext']);
?>
							<?php 
echo Html::submitButton(Yii::t('app', 'Close'), ['class' => 'btn btn-danger btn-default', 'data-dismiss' => 'modal']);
?>
						</p>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
開發者ID:maildownload1985,項目名稱:project_demo,代碼行數:31,代碼來源:_inviation.php

示例13:



    <div id="login_form_block">
        <?php 
$form = ActiveForm::begin(['id' => 'login-form', 'action' => Yii::getAlias('@web') . "/site/login", 'enableClientValidation' => true, 'enableAjaxValidation' => true, 'options' => ['class' => 'form-horizontal', 'data-pjax' => ''], 'fieldConfig' => ['template' => "{label}\n<div class=\"col-lg-5\">{input}</div>\n<div class=\"col-lg-5\">{error}</div>", 'labelOptions' => ['class' => 'col-lg-2 control-label']]]);
?>

        <?php 
echo $form->field($model, 'username', ['enableAjaxValidation' => true]);
?>
        <?php 
echo $form->field($model, 'password', ['enableAjaxValidation' => true])->passwordInput();
?>
        <?php 
echo $form->field($model, 'rememberMe')->checkbox(['template' => "<div class=\"col-lg-offset-2 col-lg-5\">{input} {label}</div>\n<div class=\"col-lg-5\">{error}</div>"]);
?>
        <div class="form-group">
            <div class="col-lg-11">
                <?php 
echo Html::submitButton('Login', ['class' => 'btn btn-primary', 'name' => 'login-button']);
?>
                <?php 
echo Html::Button('Registration', ['class' => 'btn btn-success btn-change-lr']);
?>
            </div>
        </div>

        <?php 
ActiveForm::end();
?>
    </div>
開發者ID:HaseProgram,項目名稱:royalteams,代碼行數:29,代碼來源:login_form.php

示例14:

?>
        </div>
        <div id="corpo-filtro-nota" class="panel-body collapse in">
            <?php 
$form = ActiveForm::begin(['id' => 'assistencia']);
?>
            <div class="row">
                <div class="col-sm-6 col-lg-4">

                 
                </div>
                <div class="col-sm-6 col-lg-4">

                   

                </div>
                <div class="col-sm-6 col-lg-4">
                   
                </div>
            </div>
            <div class="form-group">
                <?php 
echo Html::Button('Pesquisa conteúdo ', ['class' => 'btn btn-primary', 'onclick' => "ajaxConteudoAula('index.php?r=portal-professor/frequencia', 'filtroConteudo')"]);
?>

            </div>
            <?php 
ActiveForm::end();
?>
        </div>
    </div>
開發者ID:henrique-r-luz,項目名稱:portal,代碼行數:31,代碼來源:index.php

示例15:

    echo $cat->Name;
    ?>
</option>
                                        <?php 
}
?>
 
                                    </select> 
                                </label>
                            </div>
                        </div>
                    </div>
                </div>
                    <div class='panel-body col-md-offset-3'>
                        <?php 
echo Html::Button("Download Excel", ['class' => 'btn btn-success', 'id' => 'downloadExcel']);
?>
                    </div>                
            </form>
            </div>
	</div>
        <div id="change">
        <?php 
yii\widgets\Pjax::begin();
?>
        <div id="ajax-data">   
            <div class="col-md-8">
		<div class="row">
                    <?php 
foreach ($coupons as $coupon) {
    ?>
開發者ID:ratanphayade,項目名稱:Coupon_Search,代碼行數:31,代碼來源:index.php


注:本文中的yii\helpers\Html::Button方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。