PHP Classes

File: views/account/index.php

Recommend this page to a friend!
  Classes of Aleksey   PHP Framework Bootstrap 4 Template   views/account/index.php   Download  
File: views/account/index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Framework Bootstrap 4 Template
Show application pages using Bootstrap templates
Author: By
Last change:
Date: 2 years ago
Size: 1,550 bytes
 

Contents

Class file image Download
<?php
use PhpMvc\View;
use
PhpMvc\Html;
$model = new RootNamespaceOfYourApp\Models\Login();

View::setLayout('_layout');
View::setTitle('Log in');
View::injectModel($model);
?>

<div class="row">
    <div class="col-md-4 set-colon-to-labels">
        <h2><?=View::getTitle()?></h2>
        <p>This is a demonstration of working with forms.</p>
        <?=Html::beginForm('login', 'account')?>
<div class="form-group">
                <?=Html::label('username')?>
<?=Html::textBox(
                 
'username',
                 
null,
                  array(
                   
'class' => 'form-control',
                   
'maxlength' => 50
                 
)
                )
?>
<?=Html::validationMessage('username', null, 'div', array('class' => 'text-danger'))?>
<p class="form-text text-muted small"><?=Html::displayText('username')?></p>
            </div>
            <div class="form-group">
                <?=Html::label('password')?>
<?=Html::password(
                 
'password',
                 
null,
                  array(
                   
'class' => 'form-control'
                 
)
                )
?>
<?=Html::validationMessage('password', null, 'div', array('class' => 'text-danger'))?>
<p class="form-text text-muted small"><?=Html::displayText('password')?></p>
            </div>

            <button type="submit" class="btn btn-primary">Log in</button>
        <?=Html::endForm()?>
</div>
</div>