Move subtask templates to a subfolder

This commit is contained in:
Frédéric Guillot
2014-11-26 21:04:46 -05:00
parent c6b9a2a92e
commit 20b60bc628
10 changed files with 50 additions and 32 deletions

View File

@@ -263,6 +263,29 @@ class SubTask extends Base
* @return array $valid, $errors [0] = Success or not, [1] = List of errors
*/
public function validateModification(array $values)
{
$rules = array(
new Validators\Required('id', t('The subtask id is required')),
new Validators\Required('task_id', t('The task id is required')),
new Validators\Required('title', t('The title is required')),
);
$v = new Validator($values, array_merge($rules, $this->commonValidationRules()));
return array(
$v->execute(),
$v->getErrors()
);
}
/**
* Validate API modification
*
* @access public
* @param array $values Form values
* @return array $valid, $errors [0] = Success or not, [1] = List of errors
*/
public function validateApiModification(array $values)
{
$rules = array(
new Validators\Required('id', t('The subtask id is required')),