Use the same task form layout everywhere
This commit is contained in:
@@ -47,6 +47,24 @@ class TaskHelper extends Base
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function selectDescription(array $values, array $errors)
|
||||
{
|
||||
$html = $this->helper->form->label(t('Description'), 'description');
|
||||
$html .= $this->helper->form->textarea(
|
||||
'description',
|
||||
$values,
|
||||
$errors,
|
||||
array(
|
||||
'placeholder="'.t('Leave a description').'"',
|
||||
'tabindex="2"',
|
||||
'data-mention-search-url="'.$this->helper->url->href('UserAjaxController', 'mention', array('project_id' => $values['project_id'])).'"'
|
||||
),
|
||||
'markdown-editor'
|
||||
);
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function selectTags(array $project, array $tags = array())
|
||||
{
|
||||
$options = $this->tagModel->getAssignableList($project['id']);
|
||||
@@ -68,6 +86,14 @@ class TaskHelper extends Base
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function selectColor(array $values)
|
||||
{
|
||||
$colors = $this->colorModel->getList();
|
||||
$html = $this->helper->form->label(t('Color'), 'color_id');
|
||||
$html .= $this->helper->form->select('color_id', $colors, $values, array(), array(), 'color-picker');
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function selectAssignee(array $users, array $values, array $errors = array(), array $attributes = array())
|
||||
{
|
||||
$attributes = array_merge(array('tabindex="3"'), $attributes);
|
||||
|
||||
Reference in New Issue
Block a user