0byt3m1n1
Path:
/
data
/
applications
/
aps.bak
/
tikiwiki
/
7.0-0
/
standard
/
htdocs
/
lib
/
core
/
Tracker
/
Field
/
[
Home
]
File: Checkbox.php
<?php // (c) Copyright 2002-2011 by authors of the Tiki Wiki CMS Groupware Project // // All Rights Reserved. See copyright.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. // $Id: Checkbox.php 34424 2011-05-14 22:42:19Z nkoth $ /** * Handler class for Checkboxes * * Letter key: ~c~ * */ class Tracker_Field_Checkbox extends Tracker_Field_Abstract { function getFieldData(array $requestData = array()) { $ins_id = $this->getInsertId(); if (isset($requestData[$ins_id]) && $requestData[$ins_id] == 'on') { $val = 'y'; } elseif (!empty($requestData)) { $val = 'n'; } else { $val = $this->getValue(); } return array( 'value' => $val, ); } function renderInput($context = array()) { return $this->renderTemplate('trackerinput/checkbox.tpl', $context); } }