Expose tags to the user interface (first prototype)

This commit is contained in:
Frederic Guillot
2016-06-24 15:43:34 -04:00
parent b2e92480c2
commit 18cb7ad0a4
26 changed files with 296 additions and 167 deletions

View File

@@ -40,6 +40,34 @@ class TaskHelper extends Base
return $this->taskModel->getRecurrenceBasedateList();
}
public function selectTitle(array $values, array $errors)
{
$html = $this->helper->form->label(t('Title'), 'title');
$html .= $this->helper->form->text('title', $values, $errors, array('autofocus', 'required', 'maxlength="200"', 'tabindex="1"'), 'form-input-large');
return $html;
}
public function selectTags(array $project, array $tags = array())
{
$options = $this->tagModel->getAssignableList($project['id']);
$html = $this->helper->form->label(t('Tags'), 'tags[]');
$html .= '<select name="tags[]" id="form-tags" class="tag-autocomplete" multiple>';
foreach ($options as $tag) {
$html .= sprintf(
'<option value="%s" %s>%s</option>',
$this->helper->text->e($tag),
in_array($tag, $tags) ? 'selected="selected"' : '',
$this->helper->text->e($tag)
);
}
$html .= '</select>';
return $html;
}
public function selectAssignee(array $users, array $values, array $errors = array(), array $attributes = array())
{
$attributes = array_merge(array('tabindex="3"'), $attributes);