Ejemplo n.º 1
0
 public function submitButton($text, $options = [])
 {
     if (!array_key_exists('class', $options)) {
         $options['class'] = 'btn btn-primary';
     }
     $this->result = '<div class="form-group"><button type="submit"' . BaseHtml::buildOptions($options) . '">' . $text . '</button></div>';
     return $this;
 }
Ejemplo n.º 2
0
use helpers\BaseHtml;
use helpers\Detail;
$this->title = $model->Username;
$this->breadcrumb = [['label' => 'Users', 'url' => ['index']], ['label' => $this->title]];
?>

<div class="main-title">
    <h1><?php 
echo $this->title;
?>
</h1>
</div>

<div class="row">
    <div class="col-md-8 col-md-offset-2">

        <?php 
echo BaseHtml::a('Update', ['update/' . $model->Username], ['class' => 'btn btn-warning']);
?>
        <?php 
echo BaseHtml::a('Delete', ['delete/' . $model->Username], ['class' => 'btn btn-danger', 'onclick' => 'if (confirm(\'Are you sure want to delete this item?\') == false) return false']);
?>
        
        <br /><br />

        <?php 
echo Detail::begin(['model' => $model, 'items' => ['Username', 'Email', 'isActivated', 'regDatePretty', 'lastLoginPretty', ['label' => 'Role', 'value' => App::roles()[$model->GroupID - 1]]]]);
?>
    </div>
</div>
Ejemplo n.º 3
0
    <?php 
echo $form = new Form();
?>
    <?php 
echo $form->label('Username or Email')->inputText($model, 'Username');
?>
    <?php 
echo $form->password($model, 'Password');
?>
    <?php 
echo $form->checkBox($model, 'rememberMe');
?>
    <p class="text-right">
        <?php 
echo BaseHtml::a('Forgot your password?‎', ['reset-password']);
?>
<br />
        <?php 
echo BaseHtml::a('Have no an account?', ['register']);
?>
    </p>
    <?php 
echo $form->submitButton('Login');
?>
    <?php 
echo $form->end();
?>

  </div>
</div>
Ejemplo n.º 4
0
$this->title = App::config()->name;
?>

<div class="main-title">
    <h1><?php 
echo $this->title;
?>
</h1>
    <p>
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
        tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
        quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
        consequat.
    </p>
    <?php 
echo BaseHtml::a($hai, ['index'], ['class' => 'btn btn-success btn-lg', 'id' => 'haiii']);
?>
</div>

<div class="row">
    <div class="col-md-4">
        <p>
            Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
            tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
            quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
            consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
            cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
            proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
        </p>
    </div>
    <div class="col-md-4">
Ejemplo n.º 5
0
 public function getAlert()
 {
     if ($this->alert != null) {
         foreach ($this->alert as $key => $value) {
             return BaseHtml::alert($key, $value);
         }
     }
 }
Ejemplo n.º 6
0
<?php

use helpers\BaseHtml;
use helpers\Detail;
$this->title = 'My Profile';
$this->breadcrumb = [['label' => $this->title]];
?>

<div class="main-title">
    <h1><?php 
echo $this->title;
?>
</h1>
</div>

<div class="row">
    <div class="col-md-8 col-md-offset-2">

        <?php 
echo BaseHtml::a('New Password', ['change-password'], ['class' => 'btn btn-warning']);
?>
        
        <br /><br />

        <?php 
echo Detail::begin(['model' => $model, 'items' => ['Username', 'Email', 'isActivated', 'regDatePretty', 'lastLoginPretty', ['label' => 'Role', 'value' => App::role()]]]);
?>
    </div>
</div>
Ejemplo n.º 7
0
    <div class="col-sm-6 col-sm-offset-3">

    <?php 
echo $form = new Form();
?>
    <?php 
echo $form->inputText($model, 'Username');
?>
    <?php 
echo $form->inputText($model, 'Email');
?>
    <?php 
echo $form->password($model, 'Password');
?>
    <?php 
echo $form->password($model, 'Password2');
?>
    <p class="text-right">
        <?php 
echo BaseHtml::a('Already have an account?', ['login']);
?>
    </p>
    <?php 
echo $form->submitButton('Register');
?>
    <?php 
echo $form->end();
?>

  </div>
</div>