PHP Classes

File: templates/element/Players/form.php

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

Contents

Class file image Download
<?php

/**
 * @var \App\View\AppView $this
 * @var \App\Model\Entity\Player $player
 */
?>

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

<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
    <div class="bt-form-group">
        <?= $this->Form->control('first_name', [
           
'label' => __('Ime'),
        ])
?>
</div>
    <div class="bt-form-group">
        <?= $this->Form->control('last_name', [
           
'label' => __('Priimek'),
        ])
?>
</div>
</div>

<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
    <div class="bt-form-group">
        <?= $this->Form->control('gender', [
           
'label' => __('Spol'),
           
'type' => 'select',
           
'empty' => __('-- ni podan --'),
           
'options' => [
               
'M' => __('Mo?ki'),
               
'F' => __('?enska'),
            ],
        ])
?>
</div>
    <div class="bt-form-group">
        <?= $this->Form->control('rating', [
           
'label' => __('Rating (opcijsko)'),
           
'type' => 'number',
           
'step' => '0.1',
           
'min' => 0,
        ])
?>
</div>
</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() ?>