Skip to content

Commit

Permalink
Request: 13228 Group task fields into tabs on edit form.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk authored and yunosh committed Jun 10, 2014
1 parent 6d6c1a5 commit 75db83a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions nag/lib/Form/Task.php
Expand Up @@ -16,6 +16,10 @@
*/
class Nag_Form_Task extends Horde_Form
{
const SECTION_GENERAL = 1;
const SECTION_RECUR = 2;
const SECTION_DESC = 3;

/**
* Const'r
*
Expand Down Expand Up @@ -53,6 +57,8 @@ public function __construct($vars, $title = '')
$this->addHidden('', 'uid', 'text', false);
$this->addHidden('', 'owner', 'text', false);

$this->setSection(self::SECTION_GENERAL, _("General"));

if (!$GLOBALS['prefs']->isLocked('default_tasklist') &&
count($tasklist_enums) > 1) {
$v = $this->addVariable(
Expand Down Expand Up @@ -126,12 +132,14 @@ public function __construct($vars, $title = '')

$v = $this->addVariable(_("Priority"), 'priority', 'enum', false, false, false, array($priorities));
$v->setDefault(3);

$this->addVariable(_("Recurrence"), 'recurrence', 'Nag:NagRecurrence', false);
$this->addVariable(_("Estimated Time"), 'estimate', 'number', false);
$this->addVariable(_("Completed?"), 'completed', 'boolean', false);

$this->setSection(self::SECTION_RECUR, _("Recurrence"));
$this->addVariable(_("Recurrence"), 'recurrence', 'Nag:NagRecurrence', false);
}

$this->setSection(self::SECTION_DESC, _("Description"));
try {
$description = Horde::callHook('description_help', array(), 'nag');
} catch (Horde_Exception_HookNotSet $e) {
Expand Down

0 comments on commit 75db83a

Please sign in to comment.