<?php
/**
 * @author QuanticaLabs - http://codecanyon.net/user/QuanticaLabs/portfolio?ref=QuanticaLabs
 *
 * @link			http://codecanyon.net/item/timetable-responsive-schedule-for-joomla/9749539?ref=QuanticaLabs
 * @copyright		Copyright (C) 2008 - 2014 quanticalabs.com . All rights reserved.
 * @license			GNU General Public License version 2 or later; see LICENSE under Licensing/ directory
 */
 
defined('_JEXEC') or die('Restricted access');

jimport('joomla.form.formfield');

class JFormFieldWithinNext extends JFormField {

    protected $type = 'WithinNext';
	
    public function getInput() {
		$output = "<input id='{$this->id}' class='{$this->class}' name='{$this->name}' type='text' value='{$this->value}'/>";
		$output .= "<script>
			if(jQuery('.upcoming-events-display_settings').val()!=='all')
				jQuery('.upcoming-events-within_next').closest('.control-group').css('display', 'none');
		</script>";
		return $output;
    }
}



