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


PHP TbHtml::formTb方法代码示例

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


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

示例1: testForm

 public function testForm()
 {
     $I = $this->codeGuy;
     $html = TbHtml::formTb(TbHtml::FORM_LAYOUT_VERTICAL, '#', 'post', array('class' => 'form'));
     $form = $I->createNode($html, 'form.form-vertical');
     $I->seeNodeCssClass($form, 'form');
     $I->seeNodeAttributes($form, array('action' => '#', 'method' => 'post'));
 }
开发者ID:AlexanderGrant1,项目名称:AC41004,代码行数:8,代码来源:TbHtmlTest.php

示例2: array

    }
  }).find('.btn-primary').removeClass('btn-primary')
    .addClass('btn-inverse btn-large').css({'margin-right':'265px'}).text('Yes').prev()
    .addClass('btn-large').text('No').css({'margin-right':'-145px'})
    .parent('div').parent('div').css({'margin-top':function(){return ($(this).outerHeight())}});
  
}

</script>

<br/>

<fieldset>
 <legend></legend>
 <?php 
echo TbHtml::formTb(TbHtml::FORM_LAYOUT_HORIZONTAL, $this->createUrl('/transaction/AddPoint/save'), 'post', array('id' => 'form-addpoint'));
?>
  <div class="span-4" style="margin-left:-2px;width:45%;float:left;">
     <?php 
echo TbHtml::textFieldControlGroup('id_receipt', '', array('label' => 'ID Receipt', 'maxlength' => 15));
?>
    <div class="control-group">
        <?php 
echo TbHtml::label('Total Purchase', 'Total Purchase', array('class' => 'control-label'));
?>
       <div class="controls">
        <?php 
$this->widget('yiiwheels.widgets.maskmoney.WhMaskMoney', array('name' => 'total_purchase', 'pluginOptions' => array('thousands' => '.', 'decimal' => '', 'precision' => 0)));
?>
       
      </div></div>
开发者ID:nicovicz,项目名称:reward-point,代码行数:31,代码来源:index.php

示例3: defaultForm

<?php

/* @var $this UpgradeMembershipController */
Yii::app()->clientScript->registerScript('cleanForm', "\n\n// fungsi untuk membershikan form\nfunction defaultForm(){\n  \$('#form-upgrade-membership').each(function(){\n        this.reset();\n  });\n\n  \$('.alert-error').text('').hide();\n  \$('#new_id_member').prop('readonly',false);\n  \$('#btncommand').prop('disabled',false);\n  \n}\n\n\n\n// Aksi pada saat tombol cancel diklik\n\$('#btncancel').click(function(e){\n  e.preventDefault();\n  defaultForm();\n  defaultFormMember();\n});");
$handler = "\n var type_member = \$('#id_member').val().substring(0,1);\n if (type_member=='2'){\n   \$('.alert-error').text('Member already upgraded').show();\n   \$('#new_id_member').prop('readonly',true);\n   \$('#btncommand').prop('disabled',true);\n }\n";
?>
<p class="alert alert-error" style="display:none"></p>
<?php 
$this->renderPartial('//common/_member', array('additionalHandler' => $handler));
echo TbHtml::formTb(TbHtml::FORM_LAYOUT_HORIZONTAL, $this->createUrl('/transaction/UpgradeMembership/save'), 'post', array('id' => 'form-upgrade-membership'));
?>

<?php 
echo TbHtml::textFieldControlGroup('new_id_member', '', array('span' => 3, 'label' => 'New ID Member'));
?>

<div class="form-actions">
<?php 
echo TbHtml::ajaxSubmitButton('<i class="icon-fa-save icon-fa-large" style="margin-top:7px;"></i> Save', 'js:$("#form-upgrade-membership").attr("action")', array('type' => 'POST', 'data' => 'js:{id_member:$("#id_member").val(),new_id_member:$("#new_id_member").val()}', 'dataType' => 'json', 'success' => 'function(data){
           
            successMsgBox(data.message);
            $("#btncancel").trigger("click");

        }'), array('color' => TbHtml::BUTTON_COLOR_INVERSE, 'size' => TbHtml::BUTTON_SIZE_LARGE, 'id' => 'btncommand'));
echo "&nbsp;&nbsp;";
echo TbHtml::resetButton('<i class="icon-fa-remove-circle icon-fa-large" style="margin-top:7px;"></i> Cancel', array('color' => TbHtml::BUTTON_COLOR_DEFAULT, 'size' => TbHtml::BUTTON_SIZE_LARGE, 'id' => 'btncancel'));
?>
</div>
<?php 
echo TbHtml::endForm();
开发者ID:nicovicz,项目名称:reward-point,代码行数:30,代码来源:index.php

示例4: defaultFormMember

<?php

Yii::app()->clientScript->registerScript('cleanFormMember', "\n\n// fungsi untuk membershikan form\nfunction defaultFormMember(){\n  \$('#form-search-member').each(function(){\n        this.reset();\n  });\n \n  enableMember();\n}\n\nfunction disableMember(){\n  \$('#id_member').prop('readonly',true);\n  \$('#btn-search-member').prop('disabled',true);\n}\n\nfunction enableMember(){\n  \$('#id_member').prop('readonly',false);\n  \$('#btn-search-member').prop('disabled',false);\n}\n\n");
?>
<fieldset>
    <legend>Data Member</legend>
    <?php 
echo TbHtml::formTb(TbHtml::FORM_LAYOUT_HORIZONTAL, $this->createUrl('/master/member/searchmember'), 'post', array('id' => 'form-search-member', 'autocomplete' => 'off'));
?>

    <div class="control-group">
        <?php 
echo Tbhtml::label('ID Member', 'id_member', array('class' => 'control-label', 'maxlength' => '7'));
?>
    <div class="controls">
        <?php 
$this->widget('yiiwheels.widgets.maskinput.WhMaskInput', array('name' => 'id_member', 'mask' => '9999999', 'htmlOptions' => array('placeholder' => '')));
?>
        &nbsp;&nbsp;
        <?php 
echo TbHtml::ajaxSubmitButton('<i class="icon-fa-search icon-fa-large" style="margin-top:5px;"></i> Search', 'js:$("#form-search-member").attr("action")', array('type' => 'POST', 'data' => 'js:{id_member:$("#id_member").val()}', 'dataType' => 'json', 'success' => 'function(data) {

            if(data){

                $("#member_name").val(data.first_name + " " + data.family_name);
                $("#point").val(data.point);
                disableMember();
                ' . $additionalHandler . '

            }else{
开发者ID:nicovicz,项目名称:reward-point,代码行数:30,代码来源:_member.php


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