diff options
author | emkael <emkael@tlen.pl> | 2020-05-05 14:25:42 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2020-05-05 14:25:42 +0200 |
commit | 62827e6cf470449c117624058fb36ad94804bcc0 (patch) | |
tree | 10cd1e4d36c34b694acfadaa69fc7f6ae2b1eabd /plugins/Timetrackingeditor/Template/create.php | |
parent | 7b66ddf2e4fbdb837e78d8b7dbaa9fc38391bc32 (diff) |
Diffstat (limited to 'plugins/Timetrackingeditor/Template/create.php')
-rw-r--r-- | plugins/Timetrackingeditor/Template/create.php | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/plugins/Timetrackingeditor/Template/create.php b/plugins/Timetrackingeditor/Template/create.php new file mode 100644 index 00000000..362cfde4 --- /dev/null +++ b/plugins/Timetrackingeditor/Template/create.php @@ -0,0 +1,41 @@ +<div class="page-header"> + <h2><?= t('Add a new Time Tracking Event') ?></h2> +</div> +<form class="popover-form" method="post" action="<?= $this->url->href('TimeTrackingEditorController', 'save', 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->label(t('Subtask'), 'subtask') ?> + <?= $this->form->text( + 'subtask', + $values, + $errors, + array( + 'required', + (!isset($autofocus) || $autofocus == 'subtask' ? '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('Time spent'), 'time_spent') ?> + <?= $this->form->numeric('time_spent', $values, $errors, array('maxlength="10"', 'required', (isset($autofocus) && $autofocus == "time_spent" ? 'autofocus' : '')), 'form-numeric') ?> hours + + <?= $this->form->label(t('Start Date'), 'start') ?> + <?= $this->form->text('start', $values, $errors, array('maxlength="10"', 'required'), 'form-date') ?> + + <?= $this->form->label(t('Comment'), 'comment') ?> + <?= $this->form->textarea('comment', $values, $errors, array(), 'markdown-editor') ?> + + <?= $this->form->checkbox('is_billable', t('Billable?'), 1, isset($values['is_billable']) && $values['is_billable'] == 1) ?> + <?= $this->form->checkbox('add_another', t('Add another event'), 1, isset($values['add_another']) && $values['add_another'] == 1) ?> + + <?= $this->modal->submitButtons(); ?> + +</form> |