1: <?php
2: /**
3: * This file contains all Horde_Form extensions required for editing tasks.
4: *
5: * See the enclosed file COPYING for license information (GPL). If you
6: * did not receive this file, see http://www.horde.org/licenses/gpl.
7: *
8: * @package Nag
9: */
10: /**
11: * The Nag_TaskForm class provides the form for adding and editing a task.
12: *
13: * @author Jan Schneider <jan@horde.org>
14: * @package Nag
15: */
16: class Nag_Form_Renderer_Task extends Horde_Form_Renderer
17: {
18: public $delete;
19:
20: /**
21: *
22: * @param array $params
23: * @param boolean $delete
24: */
25: public function __construct($params = array(), $delete = false)
26: {
27: parent::__construct($params);
28: $this->delete = $delete;
29: }
30:
31: /**
32: *@TODO: visibility needs to be public until Horde_Form refactored
33: */
34: public function _renderSubmit($submit, $reset)
35: {
36: ?><div class="control" style="padding:1em;">
37: <input class="button leftFloat" name="submitbutton" type="submit" value="<?php echo _("Save") ?>" />
38: <?php if ($this->delete): ?>
39: <input class="button rightFloat" name="submitbutton" type="submit" value="<?php echo _("Delete this task") ?>" />
40: <?php endif; ?>
41: <div class="clear"></div>
42: </div>
43: <?php
44: }
45:
46: }