/** @var \RedDevil\ViewModels\VenueRequestViewModel[] $model */
use RedDevil\ViewHelpers\CSFRToken;
use RedDevil\ViewHelpers\Form;
use RedDevil\ViewHelpers\SubmitButton;
use RedDevil\ViewHelpers\TextField;
?>

<div class="col-md-4">
    <h2>Send Venue Request</h2>
    <?php 
?>
    <div class="panel panel-default">
        <div class="panel-heading"><strong>Choose venue</strong></div>
        <ul class="list-group">
            <?php 
foreach ($model as $venue) {
    $form = new Form('add-venue-request-form', '/conferences/addvenuerequest');
    $form->setAttribute('method', 'post');
    $form->setNewLineAfter(false);
    $form->setAttribute('action', '/conferences/addvenuerequest');
    $form->addTextField(TextField::create()->setAttribute('id', 'conferenceId')->setAttribute('hidden', 'hidden')->setNewLineAfter(false)->setNewLineBefore(false)->setAttribute('name', 'conferenceId')->setAttribute('value', $venue->getConferenceId()));
    $form->addTextField(TextField::create()->setAttribute('id', 'venueId')->setAttribute('name', 'venueId')->setAttribute('hidden', 'hidden')->setNewLineAfter(false)->setNewLineBefore(false)->setAttribute('value', $venue->getVenueId()));
    $form->addSubmitButton(SubmitButton::create()->setAttribute('class', 'btn btn-link')->setNewLineAfter(false)->setNewLineBefore(false)->setAttribute('value', $venue->getVenueTitle()));
    $form->addCSRFToken(CSFRToken::create()->setNewLineAfter(false)->setNewLineBefore(false)->setAttribute('name', 'ValidationToken'));
    $form->render();
}
?>
        </ul>
    </div>
</div>
<?php

use RedDevil\ViewHelpers\ActionLink;
use RedDevil\ViewHelpers\CSFRToken;
use RedDevil\ViewHelpers\Form;
use RedDevil\ViewHelpers\SubmitButton;
use RedDevil\ViewHelpers\TextField;
?>
<div class="col-md-9">
    <h2>Add hall</h2>

    <?php 
$form = new Form('add-hall-form', '/venues/createhall');
$form->setAttribute('method', 'post');
$form->setAttribute('action', '/venues/createhall');
$form->addTextField(TextField::create()->setAttribute('id', 'id')->setAttribute('name', 'venueId')->setAttribute('value', $model)->setAttribute('hidden', 'hidden'));
$form->addTextField(TextField::create()->setAttribute('class', 'form-control')->setAttribute('id', 'title')->addLabel('Name', true)->setAttribute('name', 'title'));
$form->addTextField(TextField::create()->setAttribute('class', 'form-control')->setAttribute('id', 'capacity')->addLabel('Capacity', true)->setAttribute('name', 'capacity'));
$form->addSubmitButton(SubmitButton::create()->setAttribute('class', 'btn btn-default')->setNewLineAfter(false)->setAttribute('value', 'Create'));
$form->addActionLink(ActionLink::create()->setNewLineBefore(false)->setAttribute('id', 'cancel')->setAttribute('href', '/venues/own')->setData('Cancel')->setAttribute('class', 'btn btn btn-primary'));
$form->addCSRFToken(CSFRToken::create()->setAttribute('name', 'ValidationToken'));
$form->render();
?>
</div>
?>

<div class="col-md-7">
    <h2>Add conference</h2>
    <ul>
        <?php 
foreach ($model->getErrors() as $error) {
    ?>
            <li>
                <?php 
    echo $error->getMessage();
    ?>
            </li>
        <?php 
}
?>
    </ul>
    <?php 
$form = new Form('add-conference-form', 'home/index');
$form->setAttribute('method', 'post');
$form->setAttribute('action', '/conferences/add');
$form->addTextField(TextField::create()->setAttribute('class', 'form-control')->setAttribute('id', 'title')->addLabel('Title', true)->setAttribute('name', 'title'));
$form->addDateField(DateField::create()->setAttribute('class', 'form-control')->setAttribute('id', 'startDate')->addLabel('Start date', true)->setAttribute('name', 'startDate'));
$form->addDateField(DateField::create()->setAttribute('class', 'form-control')->setAttribute('id', 'endDate')->addLabel('End date', true)->setAttribute('name', 'endDate'));
$form->addSubmitButton(SubmitButton::create()->setAttribute('class', 'btn btn-default')->setNewLineAfter(false)->setAttribute('value', 'Create'));
$form->addActionLink(ActionLink::create()->setNewLineBefore(false)->setAttribute('id', 'cancel')->setAttribute('href', '/conferences/own')->setData('Cancel')->setAttribute('class', 'btn btn btn-primary'));
$form->addCSRFToken(CSFRToken::create()->setAttribute('name', 'ValidationToken'));
$form->render();
?>
</div>
<?php

/** @var \RedDevil\InputModels\Account\RegisterInputModel $model */
?>
<div class="col-md-9">
    <h2>Register</h2>
    <div class="form-group">
        <?php 
use RedDevil\ViewHelpers\ActionLink;
use RedDevil\ViewHelpers\CSFRToken;
use RedDevil\ViewHelpers\Form;
use RedDevil\ViewHelpers\PasswordField;
use RedDevil\ViewHelpers\SubmitButton;
use RedDevil\ViewHelpers\TextField;
$form = new Form('register-form', 'home/index');
$form->setAttribute('method', 'post');
$form->setAttribute('action', '/account/register');
$form->addTextField(TextField::create()->setAttribute('class', 'form-control')->setAttribute('id', 'username')->addLabel('Username', true)->setAttribute('name', 'username'));
$form->addTextField(TextField::create()->setAttribute('class', 'form-control')->setAttribute('id', 'email')->addLabel('Email', true)->setAttribute('name', 'email'));
$form->addTextField(TextField::create()->setAttribute('class', 'form-control')->setAttribute('id', 'fullname')->addLabel('Full name', true)->setAttribute('name', 'fullname'));
$form->addTextField(TextField::create()->setAttribute('class', 'form-control')->setAttribute('id', 'telephone')->addLabel('Telephone', true)->setAttribute('name', 'telephone'));
$form->addPasswordField(PasswordField::create()->setAttribute('class', 'form-control')->setAttribute('id', 'password')->addLabel('Password', true)->setAttribute('name', 'password'));
$form->addPasswordField(PasswordField::create()->setAttribute('class', 'form-control')->setAttribute('id', 'confirmPassword')->addLabel('Confirm password', true)->setAttribute('name', 'confirmPassword'));
$form->addSubmitButton(SubmitButton::create()->setAttribute('class', 'btn btn-default')->setAttribute('value', 'Register')->setNewLineAfter(false));
$form->addActionLink(ActionLink::create()->setNewLineBefore(false)->setAttribute('id', 'cancel')->setAttribute('href', 'home/index')->setData('Cancel')->setAttribute('class', 'btn btn btn-primary'));
$form->addCSRFToken(CSFRToken::create()->setAttribute('name', 'validation-token'));
$form->render();
?>
    </div>
</div>
<div class="col-md-7">
    <h2>Add Lecture</h2>
    <ul>
        <?php 
foreach ($model->getErrors() as $error) {
    ?>
            <li>
                <?php 
    echo $error->getMessage();
    ?>
            </li>
        <?php 
}
?>
    </ul>
    <?php 
$form = new Form('add-lecture-form', 'lectures/add/' . $model->getConferenceId());
$form->setAttribute('method', 'post');
$form->setAttribute('action', '/lectures/add/' . $model->getConferenceId());
$form->addTextField(TextField::create()->setAttribute('class', 'form-control')->setAttribute('id', 'title')->addLabel('Title', true)->setAttribute('name', 'title'));
$form->addLabel(Label::create()->setNewLineAfter(false)->setData("Description")->setAttribute('class', 'control-label')->setAttribute('for', 'description'));
$form->addTextArea(TextArea::create()->setAttribute('class', 'form-control')->setAttribute('id', 'description')->setAttribute('name', 'description'));
$form->addDateTimeField(DateTimeField::create()->setAttribute('class', 'form-control')->setAttribute('id', 'startDate')->addLabel('Start date', true)->setAttribute('name', 'startDate'));
$form->addDateTimeField(DateTimeField::create()->setAttribute('class', 'form-control')->setAttribute('id', 'endDate')->addLabel('End date', true)->setAttribute('name', 'endDate'));
$form->addTextField(TextField::create()->setAttribute('hidden', 'hidden')->setAttribute('name', 'conferenceId')->setAttribute('value', $model->getConferenceId()));
$form->addSubmitButton(SubmitButton::create()->setAttribute('class', 'btn btn-default')->setNewLineAfter(false)->setAttribute('value', 'Create'));
$form->addActionLink(ActionLink::create()->setNewLineBefore(false)->setAttribute('id', 'cancel')->setAttribute('href', '/conferences/details/' . $model->getConferenceId())->setData('Cancel')->setAttribute('class', 'btn btn btn-primary'));
$form->addCSRFToken(CSFRToken::create()->setAttribute('name', 'ValidationToken'));
$form->render();
?>
</div>
/** @var \RedDevil\ViewModels\SpeakerInvitationViewModel[] $model */
use RedDevil\ViewHelpers\CSFRToken;
use RedDevil\ViewHelpers\Form;
use RedDevil\ViewHelpers\SubmitButton;
use RedDevil\ViewHelpers\TextField;
?>

<div class="col-md-4">
    <h2>Send Speaker Invitation</h2>
    <?php 
?>
    <div class="panel panel-default">
        <div class="panel-heading"><strong>Choose speaker</strong></div>
        <ul class="list-group">
            <?php 
foreach ($model as $invitation) {
    $form = new Form('add-venue-request-form', '/lectures/sendinvitation');
    $form->setAttribute('method', 'post');
    $form->setNewLineAfter(false);
    $form->setAttribute('action', '/lectures/sendinvitation');
    $form->addTextField(TextField::create()->setAttribute('id', 'speakerId')->setAttribute('hidden', 'hidden')->setNewLineAfter(false)->setNewLineBefore(false)->setAttribute('name', 'speakerId')->setAttribute('value', $invitation->getSpeakerId()));
    $form->addTextField(TextField::create()->setAttribute('id', 'lectureId')->setAttribute('name', 'lectureId')->setAttribute('hidden', 'hidden')->setNewLineAfter(false)->setNewLineBefore(false)->setAttribute('value', $invitation->getLectureId()));
    $form->addTextField(TextField::create()->setAttribute('id', 'conferenceId')->setAttribute('name', 'conferenceId')->setAttribute('hidden', 'hidden')->setNewLineAfter(false)->setNewLineBefore(false)->setAttribute('value', $invitation->getConferenceId()));
    $form->addSubmitButton(SubmitButton::create()->setAttribute('class', 'btn btn-link')->setNewLineAfter(false)->setNewLineBefore(false)->setAttribute('value', $invitation->getSpeakerUserName()));
    $form->addCSRFToken(CSFRToken::create()->setNewLineAfter(false)->setNewLineBefore(false)->setAttribute('name', 'ValidationToken'));
    $form->render();
}
?>
        </ul>
    </div>
</div>
<div class="col-md-5">
    <h2>Select Hall</h2>
    <?php 
foreach ($model as $hall) {
    ?>
        <div class="panel panel-default">
            <div class="panel-body">
                <?php 
    echo '<strong>Hall: </strong>' . $hall->getHallTitle();
    echo "<br/>";
    echo '<strong>With capacity: </strong>' . $hall->getCapacity();
    ?>

                <?php 
    $form = new Form('select-hall-form', '/lectures/addhall');
    $form->setAttribute('method', 'post');
    $form->setAttribute('class', 'pull-right');
    $form->setNewLineAfter(false);
    $form->setNewLineBefore(false);
    $form->setAttribute('action', '/lectures/addhall');
    $form->addTextField(TextField::create()->setAttribute('id', 'hallId')->setAttribute('name', 'hallId')->setAttribute('hidden', 'hidden')->setNewLineAfter(false)->setNewLineBefore(false)->setAttribute('value', $hall->getHallId()));
    $form->addTextField(TextField::create()->setAttribute('id', 'lectureId')->setAttribute('name', 'lectureId')->setAttribute('hidden', 'hidden')->setNewLineAfter(false)->setNewLineBefore(false)->setAttribute('value', $hall->getLectureId()));
    $form->addTextField(TextField::create()->setAttribute('id', 'conferenceId')->setAttribute('name', 'conferenceId')->setAttribute('hidden', 'hidden')->setNewLineAfter(false)->setNewLineBefore(false)->setAttribute('value', $hall->getConferenceId()));
    $form->addSubmitButton(SubmitButton::create()->setAttribute('class', 'btn btn-success')->setNewLineAfter(false)->setNewLineBefore(false)->setAttribute('value', 'Select'));
    $form->addCSRFToken(CSFRToken::create()->setNewLineAfter(false)->setNewLineBefore(false)->setAttribute('name', 'ValidationToken'));
    $form->render();
    ?>
            </div>
        </div>
    <?php 
                <th>Option #<?php 
    echo $i++;
    ?>
</th>
            </tr>
        <?php 
}
?>
        </thead>
        <tbody>
        <td>
            <?php 
foreach ($model as $scenario) {
    ?>
            <?php 
    $form = new Form('batch-book-form', '/conferences/batchBook');
    $form->setAttribute('method', 'POST');
    $form->setAttribute('action', '/conferences/batchBook');
    $form->addSubmitButton(SubmitButton::create()->setAttribute('value', 'Book All')->setAttribute('class', 'btn btn-info btn-sm'));
    foreach ($scenario as $lecture) {
        $form->addTextField(TextField::create()->setAttribute('hidden', 'hidden')->setAttribute('value', $lecture->getId())->setAttribute('name', 'lectureIds[]'));
        echo "<strong>" . $lecture->getTitle() . "</strong>";
        echo "<br/>";
        echo $lecture->getStartDate();
        echo "<br/>";
        echo $lecture->getEndDate();
        echo "<br/>";
        echo "<br/>";
    }
    $form->addCSRFToken(CSFRToken::create()->setAttribute('name', 'ValidationToken'));
    $form->render();
<?php

/** @var \RedDevil\InputModels\Account\ChangePasswordInputModel $model */
?>
<div class="col-md-9">
    <h2>Change password</h2>
    <div class="form-group">
        <?php 
use RedDevil\ViewHelpers\ActionLink;
use RedDevil\ViewHelpers\CSFRToken;
use RedDevil\ViewHelpers\Form;
use RedDevil\ViewHelpers\PasswordField;
use RedDevil\ViewHelpers\SubmitButton;
$form = new Form('change-password-form', 'account/changePassword');
$form->setAttribute('method', 'post');
$form->setAttribute('action', '/account/changePassword');
$form->addPasswordField(PasswordField::create()->setAttribute('class', 'form-control')->setAttribute('id', 'currentPassword')->addLabel('Current password', true)->setAttribute('name', 'currentPassword'));
$form->addPasswordField(PasswordField::create()->setAttribute('class', 'form-control')->setAttribute('id', 'newPassword')->addLabel('New password', true)->setAttribute('name', 'newPassword'));
$form->addPasswordField(PasswordField::create()->setAttribute('class', 'form-control')->setAttribute('id', 'confirmPassword')->addLabel('Confirm password', true)->setAttribute('name', 'confirmPassword'));
$form->addSubmitButton(SubmitButton::create()->setAttribute('class', 'btn btn-default')->setNewLineAfter(false)->setAttribute('value', 'Save'));
$form->addActionLink(ActionLink::create()->setNewLineBefore(false)->setAttribute('id', 'cancel')->setAttribute('href', 'home/index')->setData('Cancel')->setAttribute('class', 'btn btn btn-primary'));
$form->addCSRFToken(CSFRToken::create()->setAttribute('name', 'validation-token'));
$form->render();
?>
    </div>
</div>