Add a "Me" button to assignee form element
This commit is contained in:
@@ -45,6 +45,17 @@ class Task extends Base
|
||||
return $this->taskPermission->canRemoveTask($task);
|
||||
}
|
||||
|
||||
public function selectAssignee(array $users, array $values, array $errors = array(), array $attributes = array())
|
||||
{
|
||||
$attributes = array_merge(array('tabindex="3"'), $attributes);
|
||||
|
||||
$html = $this->helper->form->label(t('Assignee'), 'owner_id');
|
||||
$html .= $this->helper->form->select('owner_id', $users, $values, $errors, $attributes);
|
||||
$html .= '<a href="#" class="assign-me" data-target-id="form-owner_id" data-current-id="'.$this->userSession->getId().'" title="'.t('Assign to me').'">'.t('Me').'</a>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function selectPriority(array $project, array $values)
|
||||
{
|
||||
$html = '';
|
||||
|
||||
@@ -1123,4 +1123,6 @@ return array(
|
||||
// 'There is no external link for the moment.' => '',
|
||||
// 'Internal links' => '',
|
||||
// 'There is no internal link for the moment.' => '',
|
||||
// 'Assign to me' => '',
|
||||
// 'Me' => '',
|
||||
);
|
||||
|
||||
@@ -1123,4 +1123,6 @@ return array(
|
||||
// 'There is no external link for the moment.' => '',
|
||||
// 'Internal links' => '',
|
||||
// 'There is no internal link for the moment.' => '',
|
||||
// 'Assign to me' => '',
|
||||
// 'Me' => '',
|
||||
);
|
||||
|
||||
@@ -1123,4 +1123,6 @@ return array(
|
||||
// 'There is no external link for the moment.' => '',
|
||||
// 'Internal links' => '',
|
||||
// 'There is no internal link for the moment.' => '',
|
||||
// 'Assign to me' => '',
|
||||
// 'Me' => '',
|
||||
);
|
||||
|
||||
@@ -1123,4 +1123,6 @@ return array(
|
||||
// 'There is no external link for the moment.' => '',
|
||||
// 'Internal links' => '',
|
||||
// 'There is no internal link for the moment.' => '',
|
||||
// 'Assign to me' => '',
|
||||
// 'Me' => '',
|
||||
);
|
||||
|
||||
@@ -1123,4 +1123,6 @@ return array(
|
||||
// 'There is no external link for the moment.' => '',
|
||||
// 'Internal links' => '',
|
||||
// 'There is no internal link for the moment.' => '',
|
||||
// 'Assign to me' => '',
|
||||
// 'Me' => '',
|
||||
);
|
||||
|
||||
@@ -1123,4 +1123,6 @@ return array(
|
||||
// 'There is no external link for the moment.' => '',
|
||||
// 'Internal links' => '',
|
||||
// 'There is no internal link for the moment.' => '',
|
||||
// 'Assign to me' => '',
|
||||
// 'Me' => '',
|
||||
);
|
||||
|
||||
@@ -1123,4 +1123,6 @@ return array(
|
||||
// 'There is no external link for the moment.' => '',
|
||||
// 'Internal links' => '',
|
||||
// 'There is no internal link for the moment.' => '',
|
||||
// 'Assign to me' => '',
|
||||
// 'Me' => '',
|
||||
);
|
||||
|
||||
@@ -1126,4 +1126,6 @@ return array(
|
||||
'There is no external link for the moment.' => 'Il n\'y a pas de lien externe pour le moment.',
|
||||
'Internal links' => 'Liens internes',
|
||||
'There is no internal link for the moment.' => 'Il n\'y a pas de lien interne pour le moment.',
|
||||
'Assign to me' => 'Assigner à moi',
|
||||
'Me' => 'Moi',
|
||||
);
|
||||
|
||||
@@ -1123,4 +1123,6 @@ return array(
|
||||
// 'There is no external link for the moment.' => '',
|
||||
// 'Internal links' => '',
|
||||
// 'There is no internal link for the moment.' => '',
|
||||
// 'Assign to me' => '',
|
||||
// 'Me' => '',
|
||||
);
|
||||
|
||||
@@ -1123,4 +1123,6 @@ return array(
|
||||
// 'There is no external link for the moment.' => '',
|
||||
// 'Internal links' => '',
|
||||
// 'There is no internal link for the moment.' => '',
|
||||
// 'Assign to me' => '',
|
||||
// 'Me' => '',
|
||||
);
|
||||
|
||||
@@ -1123,4 +1123,6 @@ return array(
|
||||
// 'There is no external link for the moment.' => '',
|
||||
// 'Internal links' => '',
|
||||
// 'There is no internal link for the moment.' => '',
|
||||
// 'Assign to me' => '',
|
||||
// 'Me' => '',
|
||||
);
|
||||
|
||||
@@ -1123,4 +1123,6 @@ return array(
|
||||
// 'There is no external link for the moment.' => '',
|
||||
// 'Internal links' => '',
|
||||
// 'There is no internal link for the moment.' => '',
|
||||
// 'Assign to me' => '',
|
||||
// 'Me' => '',
|
||||
);
|
||||
|
||||
@@ -1123,4 +1123,6 @@ return array(
|
||||
// 'There is no external link for the moment.' => '',
|
||||
// 'Internal links' => '',
|
||||
// 'There is no internal link for the moment.' => '',
|
||||
// 'Assign to me' => '',
|
||||
// 'Me' => '',
|
||||
);
|
||||
|
||||
@@ -1123,4 +1123,6 @@ return array(
|
||||
// 'There is no external link for the moment.' => '',
|
||||
// 'Internal links' => '',
|
||||
// 'There is no internal link for the moment.' => '',
|
||||
// 'Assign to me' => '',
|
||||
// 'Me' => '',
|
||||
);
|
||||
|
||||
@@ -1123,4 +1123,6 @@ return array(
|
||||
// 'There is no external link for the moment.' => '',
|
||||
// 'Internal links' => '',
|
||||
// 'There is no internal link for the moment.' => '',
|
||||
// 'Assign to me' => '',
|
||||
// 'Me' => '',
|
||||
);
|
||||
|
||||
@@ -1123,4 +1123,6 @@ return array(
|
||||
// 'There is no external link for the moment.' => '',
|
||||
// 'Internal links' => '',
|
||||
// 'There is no internal link for the moment.' => '',
|
||||
// 'Assign to me' => '',
|
||||
// 'Me' => '',
|
||||
);
|
||||
|
||||
@@ -1123,4 +1123,6 @@ return array(
|
||||
// 'There is no external link for the moment.' => '',
|
||||
// 'Internal links' => '',
|
||||
// 'There is no internal link for the moment.' => '',
|
||||
// 'Assign to me' => '',
|
||||
// 'Me' => '',
|
||||
);
|
||||
|
||||
@@ -1123,4 +1123,6 @@ return array(
|
||||
// 'There is no external link for the moment.' => '',
|
||||
// 'Internal links' => '',
|
||||
// 'There is no internal link for the moment.' => '',
|
||||
// 'Assign to me' => '',
|
||||
// 'Me' => '',
|
||||
);
|
||||
|
||||
@@ -1123,4 +1123,6 @@ return array(
|
||||
// 'There is no external link for the moment.' => '',
|
||||
// 'Internal links' => '',
|
||||
// 'There is no internal link for the moment.' => '',
|
||||
// 'Assign to me' => '',
|
||||
// 'Me' => '',
|
||||
);
|
||||
|
||||
@@ -1123,4 +1123,6 @@ return array(
|
||||
// 'There is no external link for the moment.' => '',
|
||||
// 'Internal links' => '',
|
||||
// 'There is no internal link for the moment.' => '',
|
||||
// 'Assign to me' => '',
|
||||
// 'Me' => '',
|
||||
);
|
||||
|
||||
@@ -1123,4 +1123,6 @@ return array(
|
||||
// 'There is no external link for the moment.' => '',
|
||||
// 'Internal links' => '',
|
||||
// 'There is no internal link for the moment.' => '',
|
||||
// 'Assign to me' => '',
|
||||
// 'Me' => '',
|
||||
);
|
||||
|
||||
@@ -1123,4 +1123,6 @@ return array(
|
||||
// 'There is no external link for the moment.' => '',
|
||||
// 'Internal links' => '',
|
||||
// 'There is no internal link for the moment.' => '',
|
||||
// 'Assign to me' => '',
|
||||
// 'Me' => '',
|
||||
);
|
||||
|
||||
@@ -1123,4 +1123,6 @@ return array(
|
||||
// 'There is no external link for the moment.' => '',
|
||||
// 'Internal links' => '',
|
||||
// 'There is no internal link for the moment.' => '',
|
||||
// 'Assign to me' => '',
|
||||
// 'Me' => '',
|
||||
);
|
||||
|
||||
@@ -1123,4 +1123,6 @@ return array(
|
||||
// 'There is no external link for the moment.' => '',
|
||||
// 'Internal links' => '',
|
||||
// 'There is no internal link for the moment.' => '',
|
||||
// 'Assign to me' => '',
|
||||
// 'Me' => '',
|
||||
);
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
<?= $this->form->hidden('id', $values) ?>
|
||||
<?= $this->form->hidden('project_id', $values) ?>
|
||||
|
||||
<?= $this->form->label(t('Assignee'), 'owner_id') ?>
|
||||
<?= $this->form->select('owner_id', $users_list, $values, array(), array('autofocus')) ?><br/>
|
||||
<?= $this->task->selectAssignee($users_list, $values, array(), array('autofocus')) ?>
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||
|
||||
@@ -48,8 +48,7 @@
|
||||
<div class="form-column">
|
||||
<?= $this->form->hidden('project_id', $values) ?>
|
||||
|
||||
<?= $this->form->label(t('Assignee'), 'owner_id') ?>
|
||||
<?= $this->form->select('owner_id', $users_list, $values, $errors, array('tabindex="3"')) ?>
|
||||
<?= $this->task->selectAssignee($users_list, $values, $errors) ?>
|
||||
|
||||
<?= $this->form->label(t('Category'), 'category_id') ?>
|
||||
<?= $this->form->select('category_id', $categories_list, $values, $errors, array('tabindex="4"')) ?>
|
||||
|
||||
@@ -44,8 +44,7 @@
|
||||
<?= $this->form->hidden('id', $values) ?>
|
||||
<?= $this->form->hidden('project_id', $values) ?>
|
||||
|
||||
<?= $this->form->label(t('Assignee'), 'owner_id') ?>
|
||||
<?= $this->form->select('owner_id', $users_list, $values, $errors, array('tabindex="3"')) ?>
|
||||
<?= $this->task->selectAssignee($users_list, $values, $errors) ?>
|
||||
|
||||
<?= $this->form->label(t('Category'), 'category_id') ?>
|
||||
<?= $this->form->select('category_id', $categories_list, $values, $errors, array('tabindex="4"')) ?>
|
||||
|
||||
Reference in New Issue
Block a user