<?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>
<?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>
/** @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>
<ul> <?php foreach ($model->getErrors() as $error) { ?> <li> <?php echo $error->getMessage(); ?> </li> <?php } ?> </ul> <?php $form = new Form('add-break-form', '/lectures/' . $model->getLectureId() . '/addbreak'); $form->setAttribute('method', 'post'); $form->setAttribute('action', '/lectures/' . $model->getLectureId() . '/addbreak'); $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')->setAttribute('value', $model->getStartDate())->addLabel('Start date', true)->setAttribute('name', 'startDate')); $form->addDateTimeField(DateTimeField::create()->setAttribute('class', 'form-control')->setAttribute('id', 'endDate')->setAttribute('value', $model->getEndDate())->addLabel('End date', true)->setAttribute('name', 'endDate')); $form->addTextField(TextField::create()->setAttribute('hidden', 'hidden')->setAttribute('name', 'conferenceId')->setAttribute('value', $model->getConferenceId())); $form->addTextField(TextField::create()->setAttribute('hidden', 'hidden')->setAttribute('name', 'lectureId')->setAttribute('value', $model->getLectureId())); $form->addSubmitButton(SubmitButton::create()->setAttribute('class', 'btn btn-default')->setNewLineAfter(false)->setAttribute('value', 'Add')); $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>
<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>
public function toString() { $this->type = 'password'; return parent::toString(); }
public function toString() { $this->type = 'submit'; return parent::toString(); }
<?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(); ?> </td> <?php }
?> <div class="col-md-7"> <h2>Add venue</h2> <ul> <?php foreach ($model->getErrors() as $error) { ?> <li> <?php echo $error->getMessage(); ?> </li> <?php } ?> </ul> <?php $form = new Form('add-venue-form', 'home/index'); $form->setAttribute('method', 'post'); $form->setAttribute('action', '/venues/add'); $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', 'description')->addLabel('Description', true)->setAttribute('name', 'description')); $form->addTextField(TextField::create()->setAttribute('class', 'form-control')->setAttribute('id', 'address')->addLabel('Address', true)->setAttribute('name', 'address')); $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>