Add the possibility to add a description directly from the task show view
This commit is contained in:
@@ -16,7 +16,7 @@ class Acl extends Base
|
||||
'app' => array('index'),
|
||||
'board' => array('index', 'show', 'assign', 'assigntask', 'save'),
|
||||
'project' => array('tasks', 'index', 'forbidden'),
|
||||
'task' => array('show', 'create', 'save', 'edit', 'update', 'close', 'confirmclose', 'open', 'confirmopen', 'comment'),
|
||||
'task' => array('show', 'create', 'save', 'edit', 'update', 'close', 'confirmclose', 'open', 'confirmopen', 'comment', 'description'),
|
||||
'user' => array('index', 'edit', 'update', 'forbidden', 'logout', 'index'),
|
||||
'config' => array('index'),
|
||||
);
|
||||
|
||||
@@ -192,6 +192,20 @@ class Task extends Base
|
||||
);
|
||||
}
|
||||
|
||||
public function validateDescriptionCreation(array $values)
|
||||
{
|
||||
$v = new Validator($values, array(
|
||||
new Validators\Required('id', t('The id is required')),
|
||||
new Validators\Integer('id', t('This value must be an integer')),
|
||||
new Validators\Required('description', t('The description is required')),
|
||||
));
|
||||
|
||||
return array(
|
||||
$v->execute(),
|
||||
$v->getErrors()
|
||||
);
|
||||
}
|
||||
|
||||
public function validateModification(array $values)
|
||||
{
|
||||
$v = new Validator($values, array(
|
||||
|
||||
Reference in New Issue
Block a user