From 62827e6cf470449c117624058fb36ad94804bcc0 Mon Sep 17 00:00:00 2001 From: emkael Date: Tue, 5 May 2020 14:25:42 +0200 Subject: Time tracking related plugins --- plugins/Timetrackingeditor/Template/create.php | 41 ++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 plugins/Timetrackingeditor/Template/create.php (limited to 'plugins/Timetrackingeditor/Template/create.php') 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 @@ + +
+ + form->csrf() ?> + + form->hidden('project_id', $values) ?> + form->hidden('task_id', $values) ?> + form->hidden('opposite_subtask_id', $values) ?> + + form->label(t('Subtask'), 'subtask') ?> + 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') ?> + + form->label(t('Time spent'), 'time_spent') ?> + form->numeric('time_spent', $values, $errors, array('maxlength="10"', 'required', (isset($autofocus) && $autofocus == "time_spent" ? 'autofocus' : '')), 'form-numeric') ?> hours + + form->label(t('Start Date'), 'start') ?> + form->text('start', $values, $errors, array('maxlength="10"', 'required'), 'form-date') ?> + + form->label(t('Comment'), 'comment') ?> + form->textarea('comment', $values, $errors, array(), 'markdown-editor') ?> + + form->checkbox('is_billable', t('Billable?'), 1, isset($values['is_billable']) && $values['is_billable'] == 1) ?> + form->checkbox('add_another', t('Add another event'), 1, isset($values['add_another']) && $values['add_another'] == 1) ?> + + modal->submitButtons(); ?> + +
-- cgit v1.2.3