示例#1
0
    <div class="nav-tabs-custom">
      <ul class="nav nav-tabs">
        <li class="active"><a data-toggle="tab" href="#tab_1">Dados</a></li>
        <li><a data-toggle="tab" href="#tab_2">Foto</a></li>

        <li class="pull-right"><a class="text-muted" href="#"><i class="fa fa-gear"></i></a></li>
      </ul>
      <div class="tab-content">
        <div id="tab_1" class="tab-pane active">
         <form id="User" method="POST" action="<?php 
echo Url::request();
?>
">

          <?php 
$form = FormWidget::widget($model, ['id' => 'User', 'style' => 'app\\help\\Style']);
echo $form->textFieldGroup('nome');
echo $form->textFieldGroup('email');
echo $form->textFieldGroup('login');
echo $form->textFieldGroup('senha', ['value' => 123], 'password');
?>
          <button type="submit" class="btn btn-success">Enviar</button>
        </form>
      </div><!-- /.tab-pane -->
      <div id="tab_2" class="tab-pane">

      <?php 
echo $form->fileFieldGroup('file', ['id' => 'fileupload']);
?>

      <div id="progress">
示例#2
0
    <!--///////////////////////////////////////////////////////////////////////////////////-->


<section  id="cadastrar">
    <link rel="stylesheet" href="estilo.css"/>
    <div class="form-box">

        <form id="form" method="post" action="" enctype="multipart/form-data" >

            <?php 
function Script()
{
    return " var Class = data.class; " . "setTimeout(function(){ " . "\$('.checkbox').html(''); " . "if(Class == 'success'){ " . "location.href=data.page;  " . "}; " . "},3000); " . "if(Class ==='success'){ " . "\$('.checkbox').html(data.msg);" . "}; " . "if(Class ==='warning' ){ " . "\$('.checkbox').html(data.msg); " . "}  ";
}
$form = FormWidget::widget($model, ['id' => 'form', 'ajax' => ['url' => $this->createUrl('cadastro'), 'type' => 'POST', 'dataType' => 'json', 'success' => function ($data) {
    return Script();
}, 'error' => function ($data) {
}]]);
?>

            <div class="login-container">
                <div id="output"></div>
                <style>
                    html,body{
                        position: relative;
                        height: 100%;
                    }

                    .login-container{
                        position: relative;
                        width: 300px;
                        margin: 80px auto;
示例#3
0
        <h3 class="box-title"><?php 
echo $this->title;
?>
</h3>
        <div class="box-tools pull-right">
            <button class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse"><i class="fa fa-minus"></i></button>
            <button class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove"><i class="fa fa-times"></i></button>
        </div>
    </div>
    <div class="box-body">
        <form method="POST"  id="Validate" action="<?php 
echo Url::home('posts/create');
?>
">
            <?php 
$form = FormWidget::widget($post, ['id' => 'Validate']);
echo $form->textFieldGroup('titulo', ['class' => 'form-control']);
echo $form->textareaFieldGroup('post');
echo $form->textFieldGroup('usuario_id', [''], 'hidden');
?>
            <br/>
            <button class="btn btn-success" type="submit">Enviar</button>
        </form>
    </div><!-- /.box-body -->
    <div class="box-footer">              
    </div><!-- /.box-footer-->
</div>


<script type="text/javascript" src="<?php 
echo $this->createUrl();