Your IP : 216.73.216.170


Current Path : /var/www/iplanru/data/www/i-plan.ru/administrator/components/com_zoo/helpers/fields/
Upload File :
Current File : /var/www/iplanru/data/www/i-plan.ru/administrator/components/com_zoo/helpers/fields/radio.php

<?php
/**
* @package   com_zoo
* @author    YOOtheme http://www.yootheme.com
* @copyright Copyright (C) YOOtheme GmbH
* @license   http://www.gnu.org/licenses/gpl.html GNU/GPL
*/

foreach ($node->children() as $option) {

	// set attributes
	$id = uniqid('radio-');
	$attributes = array('id' => $id, 'type' => 'radio', 'name' => "{$control_name}[{$name}]", 'value' => $option->attributes()->value);

	// is checked ?
	if ($option->attributes()->value == $value) {
		$attributes = array_merge($attributes, array('checked' => 'checked'));
	}

	printf('<input %s /> <label %s>%s</label> ', $this->app->field->attributes($attributes), $this->app->field->attributes(array('for' => $id)), JText::_((string) $option));
}