2015-02-25 17:29:06 +01:00
|
|
|
<div class="page-header">
|
|
|
|
<h2><?= t('Add a new link') ?></h2>
|
|
|
|
</div>
|
|
|
|
|
2015-08-16 17:04:56 +02:00
|
|
|
<form action="<?= $this->url->href('tasklink', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'ajax' => isset($ajax))) ?>" method="post" autocomplete="off">
|
2015-02-25 17:29:06 +01:00
|
|
|
|
2015-08-16 17:04:56 +02:00
|
|
|
<?= $this->form->csrf() ?>
|
|
|
|
<?= $this->form->hidden('task_id', array('task_id' => $task['id'])) ?>
|
|
|
|
<?= $this->form->hidden('opposite_task_id', $values) ?>
|
2015-02-25 17:29:06 +01:00
|
|
|
|
2015-08-16 17:04:56 +02:00
|
|
|
<?= $this->form->label(t('Label'), 'link_id') ?>
|
|
|
|
<?= $this->form->select('link_id', $labels, $values, $errors) ?>
|
2015-02-25 17:29:06 +01:00
|
|
|
|
2015-08-16 17:04:56 +02:00
|
|
|
<?= $this->form->label(t('Task'), 'title') ?>
|
|
|
|
<?= $this->form->text(
|
2015-02-25 17:29:06 +01:00
|
|
|
'title',
|
|
|
|
$values,
|
|
|
|
$errors,
|
2015-08-16 17:04:56 +02:00
|
|
|
array(
|
|
|
|
'required',
|
|
|
|
'placeholder="'.t('Start to type task title...').'"',
|
|
|
|
'title="'.t('Start to type task title...').'"',
|
|
|
|
'data-dst-field="opposite_task_id"',
|
|
|
|
'data-search-url="'.$this->url->href('app', 'autocomplete', array('exclude_task_id' => $task['id'])).'"',
|
|
|
|
),
|
2015-02-25 17:29:06 +01:00
|
|
|
'task-autocomplete') ?>
|
|
|
|
|
|
|
|
<div class="form-actions">
|
|
|
|
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
|
|
|
<?= t('or') ?>
|
2015-04-21 17:56:16 +02:00
|
|
|
<?php if (isset($ajax)): ?>
|
2015-08-16 17:04:56 +02:00
|
|
|
<?= $this->url->link(t('cancel'), 'board', 'show', array('project_id' => $task['project_id']), false, 'close-popover') ?>
|
2015-04-21 17:56:16 +02:00
|
|
|
<?php else: ?>
|
2015-08-16 17:04:56 +02:00
|
|
|
<?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
2015-04-21 17:56:16 +02:00
|
|
|
<?php endif ?>
|
2015-02-25 17:29:06 +01:00
|
|
|
</div>
|
|
|
|
</form>
|