PHP Classes

File: templates/element/Tournaments/form.php

Recommend this page to a friend!
  Packages of Andraž   BB   templates/element/Tournaments/form.php   Download  
File: templates/element/Tournaments/form.php
Role: Example script
Content type: text/plain
Description: Example script
Class: BB
Badminton tournament management application
Author: By
Last change:
Date: 15 days ago
Size: 1,453 bytes
 

Contents

Class file image Download
<?php

/**
 * @var \App\View\AppView $this
 * @var \App\Model\Entity\Tournament $tournament
 */
?>

<?= $this->Form->create($tournament, ['class' => 'bt-form space-y-4']) ?>

<div class="bt-form-group">
    <?= $this->Form->control('name', [
       
'label' => __('Ime turnirja'),
    ])
?>
</div>

<div class="bt-form-group">
    <?= $this->Form->control('location', [
       
'label' => __('Lokacija'),
    ])
?>
</div>

<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
    <div class="bt-form-group">
        <?= $this->Form->control('starts_on', [
           
'label' => __('Za?etek'),
           
'type' => 'date',
           
'empty' => true,
        ])
?>
</div>
    <div class="bt-form-group">
        <?= $this->Form->control('ends_on', [
           
'label' => __('Konec'),
           
'type' => 'date',
           
'empty' => true,
        ])
?>
</div>
</div>

<div class="bt-form-group">
    <?= $this->Form->control('status', [
       
'label' => __('Status'),
       
'type' => 'select',
       
'options' => [
           
'draft' => __('osnutek'),
           
'active' => __('aktiven'),
           
'finished' => __('zaklju?en'),
        ],
    ])
?>
</div>

<div class="mt-4 flex justify-end gap-2">
    <?= $this->Html->link(__('Prekli?i'), ['action' => 'index'], [
       
'class' => 'bt-button-secondary',
    ])
?>
<?= $this->Form->button(__('Shrani'), ['class' => 'bt-button']) ?>
</div>

<?= $this->Form->end() ?>