summaryrefslogtreecommitdiff
path: root/plugins/Timetrackingeditor/Template/edit.php
blob: 283238125c2b96d9c94f8ffd01a0e07e9218053a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<div class="page-header">
    <h2><?= t('Edit a Time Tracking Event') ?></h2>
</div>
<form class="popover-form" method="post" action="<?= $this->url->href('TimeTrackingEditorController', 'update', array('plugin' => 'timetrackingeditor', 'project_id' => $values['project_id'], 'task_id' => $values['task_id'])) ?>" autocomplete="off">

    <?= $this->form->csrf() ?>

    <?= $this->form->hidden('project_id', $values) ?>
    <?= $this->form->hidden('task_id', $values) ?>
    <?= $this->form->hidden('opposite_subtask_id', $values) ?>
    <?= $this->form->hidden('id', $values) ?>


    <?= $this->form->label(t('Subtask'), 'subtask') ?>
    <?= $this->form->text(
           'subtask',
           $values,
           $errors,
           array(
               'required',
               'autofocus',
               'placeholder="'.t('Start to type subtask title...').'"',
               'title="'.t('Start to type subtask title...').'"',
               'data-dst-field="opposite_subtask_id"',
               'data-search-url="'.$this->url->href('SubtaskAjaxController', 'autocomplete', array('plugin' => 'timetrackingeditor', 'task_id' => $values['task_id'])).'"',
           ),
           'autocomplete') ?>

    <?= $this->form->label(t('Start Date'), 'start') ?>
    <?= $this->form->text('start', $values, $errors, array('maxlength="10"', 'required'), 'form-date') ?>

    <?= $this->form->label(t('Time spent'), 'time_spent') ?>
    <?= $this->form->numeric('time_spent', $values, $errors, array('maxlength="10"', 'required'), 'form-numeric') ?> hours

    <?= $this->form->label(t('Comment'), 'comment') ?>
    <?= $this->form->textarea('comment', $values, $errors, array(), 'markdown-editor') ?>

    <?= $this->form->checkbox('is_billable', t('Billable?'), 1, $values['is_billable'] == 1) ?>

    <?= $this->modal->submitButtons(); ?>
</form>