~ubuntu-branches/ubuntu/vivid/gosa/vivid

« back to all changes in this revision

Viewing changes to goto/admin/ConfigManagement/class_TemplateWidget_checkbox.inc

Tags: 2.7.1-1
* New upstream release
* Updated packaging to not include smarty (Closes: #620489)
* Fixed case of POSIX (Closes: #620486)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
class TemplateWidget_checkbox extends TemplateWidget
 
4
{
 
5
    function render()
 
6
    {
 
7
        $str = "";
 
8
        $str .= "<input type='checkbox' value='1' name='{$this->postName}' ";
 
9
            if($this->value) $str .= " checked ";
 
10
        $str .= ">";
 
11
        return($str);
 
12
    }
 
13
 
 
14
    function save_object()
 
15
    {
 
16
        $this->value = isset($_POST[$this->postName]);
 
17
    }
 
18
}
 
19
?>