<?php

use app\core\Application;
use app\core\form\Form;

$form = new Form('login');
$model = Application::$app->view->getModel();
$loginError = Application::$app->view->getActionError();

if(!$loginError == ''){
    echo "<p class='errorStyle'>$loginError</p>";
}

echo '<hr class="hr1">';
$form->beginForm();

foreach($model->labels() as $key=>$value){
    $form->renderInputField(
        $key, $key, $value, $model->getValueForField($key), $model->getError($key)
    );
}

echo '<hr class="hr1">';

$form->renderButton();

$form->endForm();

