PHP Classes

File: templates/element/Competitors/form.php

Recommend this page to a friend!
  Packages of Andraž   BB   templates/element/Competitors/form.php   Download  
File: templates/element/Competitors/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,891 bytes
 

Contents

Class file image Download
<?php

/**
 * @var \App\View\AppView $this
 * @var \App\Model\Entity\Competitor $competitor
 * @var \Cake\Collection\CollectionInterface|string[] $tournamentEvents
 */
?>

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

<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
    <?= $this->Form->hidden('tournament_event_id') ?>

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

    <div class="bt-form-group">
        <?= $this->Form->control('is_team', [
           
'label' => __('Je dvojica / ekipa?'),
           
'type' => 'checkbox',
        ])
?>
</div>

    <div class="bt-form-group">
        <?= $this->Form->control('seed', [
           
'label' => __('Seed (razvrstitev)'),
           
'type' => 'number',
           
'min' => 1,
        ])
?>
</div>
</div>

<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
    <div class="bt-form-group">
        <?= $this->Form->control('wins', [
           
'label' => __('Zmage'),
           
'type' => 'number',
           
'min' => 0,
           
'readonly' => true,
           
'templateVars' => ['help' => __('Samodejno se izra?una iz odigranih tekem.')],
        ])
?>
</div>
    <div class="bt-form-group">
        <?= $this->Form->control('losses', [
           
'label' => __('Porazi'),
           
'type' => 'number',
           
'min' => 0,
           
'readonly' => true,
           
'templateVars' => ['help' => __('Samodejno se izra?una iz odigranih tekem.')],
        ])
?>
</div>
</div>

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

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