PHP JHtml::calendar Examples

PHP JHtml::calendar - 30 examples found. These are the top rated real world PHP examples of JHtml::calendar extracted from open source projects. You can rate examples to help us improve the quality of examples.
Example #1
1
								<input onchange="document.getElementById('cb<?php 
    echo $i;
    ?>
').checked=true" type="text" name="match_number<?php 
    echo $row->id;
    ?>
"
										value="<?php 
    echo $row->match_number;
    ?>
" size="6" tabindex="1" class="inputbox" />
							</td>
							<td class="center">
								<?php 
    $date = JoomleagueHelper::getMatchDate($row, JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_DATE_FORMAT'));
    echo JHtml::calendar($date, 'match_date' . $row->id, 'match_date' . $row->id, JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_DATE_FORMAT_CAL'), 'size="9"  tabindex="2" ondblclick="copyValue(\'match_date\')"
														 onchange="document.getElementById(\'cb' . $i . '\').checked=true"');
    ?>
							</td>
							<td class="left">
								<?php 
    $time = JoomleagueHelper::getMatchTime($row);
    ?>
								<input ondblclick="copyValue('match_time')" onchange="document.getElementById('cb<?php 
    echo $i;
    ?>
').checked=true" type="text" name="match_time<?php 
    echo $row->id;
    ?>
"
										value="<?php 
    echo $time;
Example #2
0
 /**
  * Tests JHtml::calendar() method with and without 'readonly' attribute.
  */
 public function testCalendar()
 {
     // Create a world for the test
     jimport('joomla.session.session');
     jimport('joomla.application.application');
     jimport('joomla.document.document');
     $cfg = new JObject();
     JFactory::$session = $this->getMock('JSession', array('_start'));
     JFactory::$application = $this->getMock('ApplicationMock');
     JFactory::$config = $cfg;
     JFactory::$application->expects($this->any())->method('getTemplate')->will($this->returnValue('atomic'));
     $cfg->live_site = 'http://example.com';
     $cfg->offset = 'Europe/Kiev';
     $_SERVER['HTTP_USER_AGENT'] = 'Test Browser';
     // two sets of test data
     $test_data = array('date' => '2010-05-28 00:00:00', 'friendly_date' => 'Friday, 28 May 2010', 'name' => 'cal1_name', 'id' => 'cal1_id', 'format' => '%Y-%m-%d', 'attribs' => array());
     $test_data_ro = array_merge($test_data, array('attribs' => array('readonly' => 'readonly')));
     foreach (array($test_data, $test_data_ro) as $data) {
         // Reset the document
         JFactory::$document = JDocument::getInstance('html', array('unique_key' => serialize($data)));
         $input = JHtml::calendar($data['date'], $data['name'], $data['id'], $data['format'], $data['attribs']);
         $this->assertEquals((string) $xml->input['title'], $data['friendly_date'], 'Line:' . __LINE__ . ' The calendar input should have `title == "' . $data['friendly_date'] . '"`');
         $this->assertEquals((string) $xml->input['name'], $data['name'], 'Line:' . __LINE__ . ' The calendar input should have `name == "' . $data['name'] . '"`');
         $this->assertEquals((string) $xml->input['id'], $data['id'], 'Line:' . __LINE__ . ' The calendar input should have `id == "' . $data['id'] . '"`');
         $head_data = JFactory::getDocument()->getHeadData();
         if (!isset($data['attribs']['readonly']) || !$data['attribs']['readonly'] === 'readonly') {
             $this->assertArrayHasKey('/media/system/js/calendar.js', $head_data['scripts'], 'Line:' . __LINE__ . ' JS file "calendar.js" should be loaded');
             $this->assertArrayHasKey('/media/system/js/calendar-setup.js', $head_data['scripts'], 'Line:' . __LINE__ . ' JS file "calendar-setup.js" should be loaded');
         }
     }
 }
Example #3
0
 /**
  * Tests JHtml::calendar() method with and without 'readonly' attribute.
  */
 public function testCalendar()
 {
     // Create a world for the test
     jimport('joomla.session.session');
     jimport('joomla.application.application');
     jimport('joomla.document.document');
     $cfg = new JObject();
     JFactory::$session = $this->getMock('JSession', array('_start'));
     JFactory::$application = $this->getMock('ApplicationMock');
     JFactory::$config = $cfg;
     JFactory::$application->expects($this->any())->method('getTemplate')->will($this->returnValue('atomic'));
     $cfg->live_site = 'http://example.com';
     $cfg->offset = 'Europe/Kiev';
     $_SERVER['HTTP_USER_AGENT'] = 'Test Browser';
     // two sets of test data
     $test_data = array('date' => '2010-05-28', 'friendly_date' => 'Friday, 28 May 2010', 'name' => 'cal1_name', 'id' => 'cal1_id', 'format' => '%Y-%m-%d', 'attribs' => array());
     $test_data_ro = array_merge($test_data, array('attribs' => array('readonly' => 'readonly')));
     foreach (array($test_data, $test_data_ro) as $data) {
         // Reset the document
         JFactory::$document = JDocument::getInstance('html', array('unique_key' => serialize($data)));
         $input = JHtml::calendar($data['date'], $data['name'], $data['id'], $data['format'], $data['attribs']);
         $this->assertThat(strlen($input), $this->greaterThan(0), 'Line:' . __LINE__ . ' The calendar method should return something without error.');
         $xml = new simpleXMLElement('<calendar>' . $input . '</calendar>');
         $this->assertEquals((string) $xml->input['type'], 'text', 'Line:' . __LINE__ . ' The calendar input should have `type == "text"`');
         $this->assertEquals((string) $xml->input['title'], $data['friendly_date'], 'Line:' . __LINE__ . ' The calendar input should have `title == "' . $data['friendly_date'] . '"`');
         $this->assertEquals((string) $xml->input['name'], $data['name'], 'Line:' . __LINE__ . ' The calendar input should have `name == "' . $data['name'] . '"`');
         $this->assertEquals((string) $xml->input['id'], $data['id'], 'Line:' . __LINE__ . ' The calendar input should have `id == "' . $data['id'] . '"`');
         $this->assertEquals((string) $xml->input['value'], $data['date'], 'Line:' . __LINE__ . ' The calendar input should have `value == "' . $data['date'] . '"`');
         $head_data = JFactory::getDocument()->getHeadData();
         if (isset($data['attribs']['readonly']) && $data['attribs']['readonly'] === 'readonly') {
             $this->assertEquals((string) $xml->input['readonly'], $data['attribs']['readonly'], 'Line:' . __LINE__ . ' The readonly calendar input should have `readonly == "' . $data['attribs']['readonly'] . '"`');
             $this->assertFalse(isset($xml->img), 'Line:' . __LINE__ . ' The readonly calendar input shouldn\'t have a calendar image');
             $this->assertArrayNotHasKey('/media/system/js/calendar.js', $head_data['scripts'], 'Line:' . __LINE__ . ' JS file "calendar.js" shouldn\'t be loaded');
             $this->assertArrayNotHasKey('/media/system/js/calendar-setup.js', $head_data['scripts'], 'Line:' . __LINE__ . ' JS file "calendar-setup.js" shouldn\'t be loaded');
             $this->assertArrayNotHasKey('text/javascript', $head_data['script'], 'Line:' . __LINE__ . ' Inline JS for the calendar shouldn\'t be loaded');
         } else {
             $this->assertFalse(isset($xml->input['readonly']), 'Line:' . __LINE__ . ' The calendar input shouldn\'t have readonly attribute');
             $this->assertTrue(isset($xml->img), 'Line:' . __LINE__ . ' The calendar input should have a calendar image');
             $this->assertEquals((string) $xml->img['id'], $data['id'] . '_img', 'Line:' . __LINE__ . ' The calendar image should have `id == "' . $data['id'] . '_img' . '"`');
             $this->assertEquals((string) $xml->img['class'], 'calendar', 'Line:' . __LINE__ . ' The calendar image should have `class == "calendar"`');
             $this->assertFileExists(JPATH_ROOT . $xml->img['src'], 'Line:' . __LINE__ . ' The calendar image source should point to an existent file');
             $this->assertArrayHasKey('/media/system/js/calendar.js', $head_data['scripts'], 'Line:' . __LINE__ . ' JS file "calendar.js" should be loaded');
             $this->assertArrayHasKey('/media/system/js/calendar-setup.js', $head_data['scripts'], 'Line:' . __LINE__ . ' JS file "calendar-setup.js" should be loaded');
             $this->assertContains('DHTML Date/Time Selector', $head_data['script']['text/javascript'], 'Line:' . __LINE__ . ' Inline JS for the calendar should be loaded');
         }
     }
 }
Example #4
0
 public static function render()
 {
     if (self::$isJ30) {
         $return = JHtmlSidebar::render();
         if (count(self::$entries) > 0) {
             $return .= '<div class="filter-custom hidden-phone">';
             foreach (self::$entries as $entry) {
                 switch ($entry['type']) {
                     case 'calendar':
                         $return .= '<div><center>' . JHtml::calendar($entry['options'], $entry['key'], $entry['key'], '%Y-%m-%d', array('class' => 'input input-medium', 'placeholder' => $entry['label'])) . '</center></div>';
                         break;
                     case 'calendar_btn':
                         $return .= '<center><div class="rsmem_calendar_btn"><button type="button" class="hasTip btn btn-warning pull-right" title="' . JText::_('JSEARCH_FILTER_CLEAR') . '" onclick="document.id(\'' . $entry['options']['to_btn'] . '\').value=\'\';document.id(\'' . $entry['options']['from_btn'] . '\').value=\'\';this.form.submit();"><i class="icon-remove"></i></button>
				<button type="submit" class="hasTip btn btn-info pull-right" title="' . $entry['key'] . '">' . $entry['label'] . '</button></div></center>';
                         break;
                 }
             }
             $return .= '</div> <hr class="hr-condensed">';
         }
         return $return;
     } else {
         return '';
     }
 }
Example #5
0
" >
				<img src="components/com_adagency/images/tooltip.png" border="0"/></span>
			</div>
	</div>
<div class="control-group">
			<label class="control-label"> <?php 
echo JText::_('VIEWPROMOENDPUB');
?>
 </label>
			<div class="controls">
				
				<?php 
if ($promo->codeend == "Never") {
    $promo->codeend = "";
}
$calendar = JHtml::calendar(trim($promo->codeend), 'ad_end_date', 'ad_end_date', $format_string_2, '');
if ($promo->codeend == "") {
    $calendar = str_replace('value=""', 'value="Never"', $calendar);
}
echo $calendar;
?>
				<span class="editlinktip hasTip" title="<?php 
echo JText::_('COM_DIGISTORE_PROMOENDPUB_TIP');
?>
" >
				<img src="components/com_adagency/images/tooltip.png" border="0"/></span>
			</div>
	</div>
	
	<div class="control-group">
			<label class="control-label"> <?php 
 /**
  * Method to generate fields for filtering dates
  *
  * @param   FinderIndexerQuery  $idxQuery  A FinderIndexerQuery object.
  * @param   array               $options   An array of options.
  *
  * @return  mixed  A rendered HTML widget on success, null otherwise.
  *
  * @since   2.5
  */
 public static function dates($idxQuery, $options)
 {
     $html = '';
     // Get the configuration options.
     $classSuffix = $options->get('class_suffix', null);
     $loadMedia = $options->get('load_media', true);
     $showDates = $options->get('show_date_filters', false);
     if (!empty($showDates)) {
         // Build the date operators options.
         $operators = array();
         $operators[] = JHtml::_('select.option', 'before', JText::_('COM_FINDER_FILTER_DATE_BEFORE'));
         $operators[] = JHtml::_('select.option', 'exact', JText::_('COM_FINDER_FILTER_DATE_EXACTLY'));
         $operators[] = JHtml::_('select.option', 'after', JText::_('COM_FINDER_FILTER_DATE_AFTER'));
         // Load the CSS/JS resources.
         if ($loadMedia) {
             JHtml::stylesheet('com_finder/dates.css', false, true, false);
         }
         // Open the widget.
         $html .= '<ul id="finder-filter-select-dates">';
         // Start date filter.
         $attribs['class'] = 'input-medium';
         $html .= '<li class="filter-date' . $classSuffix . '">';
         $html .= '<label for="filter_date1" class="hasTooltip" title ="' . JText::_('COM_FINDER_FILTER_DATE1_DESC') . '">';
         $html .= JText::_('COM_FINDER_FILTER_DATE1');
         $html .= '</label>';
         $html .= '<br />';
         $html .= JHtml::_('select.genericlist', $operators, 'w1', 'class="inputbox filter-date-operator advancedSelect"', 'value', 'text', $idxQuery->when1, 'finder-filter-w1');
         $html .= JHtml::calendar($idxQuery->date1, 'd1', 'filter_date1', '%Y-%m-%d', $attribs);
         $html .= '</li>';
         // End date filter.
         $html .= '<li class="filter-date' . $classSuffix . '">';
         $html .= '<label for="filter_date2" class="hasTooltip" title ="' . JText::_('COM_FINDER_FILTER_DATE2_DESC') . '">';
         $html .= JText::_('COM_FINDER_FILTER_DATE2');
         $html .= '</label>';
         $html .= '<br />';
         $html .= JHtml::_('select.genericlist', $operators, 'w2', 'class="inputbox filter-date-operator advancedSelect"', 'value', 'text', $idxQuery->when2, 'finder-filter-w2');
         $html .= JHtml::calendar($idxQuery->date2, 'd2', 'filter_date2', '%Y-%m-%d', $attribs);
         $html .= '</li>';
         // Close the widget.
         $html .= '</ul>';
     }
     return $html;
 }
Example #7
0
echo JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_MASSADD_COPY2');
?>
</td>
										<td><?php 
echo $this->lists['project_rounds2'];
?>
</td>
									</tr>
									<tr>
										<td width="100" align="right" class="key"><?php 
echo JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_MASSADD_DEFAULT_DATE');
?>
</td>
										<td>
											<?php 
echo JHtml::calendar($date->format(JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_DATE_FORMAT'), true), 'date', 'date', JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_DATE_FORMAT_CAL'), 'size="10" ');
?>
											&nbsp;
											<input type='text' name='time' value='<?php 
echo $this->projectws->start_time;
?>
' size='4' maxlength='5' class='inputbox' />
										</td>
									</tr>
									<tr>
										<td width="100" align="right" class="key"><?php 
echo JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_MASSADD_FIRST_MATCHNR');
?>
</td>
										<td><input type="text" name="start_match_number" size="4" value="" /></td>
									</tr>
 /**
  * Tests JHtml::calendar() method with and without 'readonly' attribute.
  *
  * @return  void
  *
  * @since   3.1
  */
 public function testCalendar()
 {
     $cfg = $this->getMockConfig();
     $map = array(array('live_site', 'http://example.com'), array('offset', 'Europe/Kiev'));
     $cfg->expects($this->any())->method('get')->willReturnMap($map);
     JFactory::$session = $this->getMockSession();
     JFactory::$config = $cfg;
     JFactory::$application->expects($this->any())->method('getTemplate')->will($this->returnValue('atomic'));
     // Two sets of test data
     $test_data = array('date' => '2010-05-28 00:00:00', 'friendly_date' => 'Friday, 28 May 2010', 'name' => 'cal1_name', 'id' => 'cal1_id', 'format' => '%Y-%m-%d', 'attribs' => array(), 'formattedDate' => '2010-05-28');
     $test_data_ro = array_merge($test_data, array('attribs' => array('readonly' => 'readonly')));
     foreach (array($test_data, $test_data_ro) as $data) {
         // Reset the document
         JFactory::$document = $this->getMockDocument();
         $input = JHtml::calendar($data['date'], $data['name'], $data['id'], $data['format'], $data['attribs']);
         $this->assertGreaterThan(0, strlen($input), 'Line:' . __LINE__ . ' The calendar method should return something without error.');
         $xml = new SimpleXMLElement('<calendar>' . $input . '</calendar>');
         $this->assertEquals('text', (string) $xml->div->input['type'], 'Line:' . __LINE__ . ' The calendar input should have `type == "text"`');
         $this->assertEquals($data['friendly_date'], (string) $xml->div->input['title'], 'Line:' . __LINE__ . ' The calendar input should have `title == "' . $data['friendly_date'] . '"`');
         $this->assertEquals($data['name'], (string) $xml->div->input['name'], 'Line:' . __LINE__ . ' The calendar input should have `name == "' . $data['name'] . '"`');
         $this->assertEquals($data['id'], (string) $xml->div->input['id'], 'Line:' . __LINE__ . ' The calendar input should have `id == "' . $data['id'] . '"`');
         $this->assertEquals($data['formattedDate'], (string) $xml->div->input['value'], 'Line:' . __LINE__ . ' The calendar input should have `value == "' . $data['formattedDate'] . '"`');
         if (isset($data['attribs']['readonly']) && $data['attribs']['readonly'] === 'readonly') {
             $this->assertEquals($data['attribs']['readonly'], (string) $xml->div->input['readonly'], 'Line:' . __LINE__ . ' The readonly calendar input should have `readonly == "' . $data['attribs']['readonly'] . '"`');
             $this->assertTrue(isset($xml->div->button['style']), 'Line:' . __LINE__ . ' The calendar input should not have a visible button');
             $this->assertArrayNotHasKey('/media/system/js/calendar.js', JFactory::getDocument()->_scripts, 'Line:' . __LINE__ . ' JS file "calendar.js" shouldn\'t be loaded');
             $this->assertArrayNotHasKey('/media/system/js/calendar-setup.js', JFactory::getDocument()->_scripts, 'Line:' . __LINE__ . ' JS file "calendar-setup.js" shouldn\'t be loaded');
             $this->assertArrayNotHasKey('text/javascript', JFactory::getDocument()->_script, 'Line:' . __LINE__ . ' Inline JS for the calendar shouldn\'t be loaded');
         } else {
             $this->assertFalse(isset($xml->div->input['readonly']), 'Line:' . __LINE__ . ' The calendar input shouldn\'t have readonly attribute');
             $this->assertFalse(isset($xml->div->button['style']), 'Line:' . __LINE__ . ' The calendar input should visible button');
             $this->assertEquals($data['id'] . '_img', (string) $xml->div->button['id'], 'Line:' . __LINE__ . ' The calendar button should have `id == "' . $data['id'] . '_img' . '"`');
             $this->assertArrayHasKey('/media/system/js/calendar.js', JFactory::getDocument()->_scripts, 'Line:' . __LINE__ . ' JS file "calendar.js" should be loaded');
             $this->assertArrayHasKey('/media/system/js/calendar-setup.js', JFactory::getDocument()->_scripts, 'Line:' . __LINE__ . ' JS file "calendar-setup.js" should be loaded');
             $this->assertContains('jQuery(document).ready(function($) {Calendar.setup({', JFactory::getDocument()->_script['text/javascript'], 'Line:' . __LINE__ . ' Inline JS for the calendar should be loaded');
         }
     }
 }
Example #9
0
			</td>
			<td><input type="text" name="interval" value="7"/></td>
		</tr>
		
		<tr>
			<td nowrap='nowrap' class="key hasTip" title="<?php 
echo JText::_('COM_JOOMLEAGUE_ADMIN_ROUNDS_POPULATE_STARTDATE_LABEL') . '::' . JText::_('COM_JOOMLEAGUE_ADMIN_ROUNDS_POPULATE_STARTDATE_TIP');
?>
">
				<label for="start"><?php 
echo JText::_('COM_JOOMLEAGUE_ADMIN_ROUNDS_POPULATE_STARTDATE_LABEL');
?>
</label>
			</td>
			<td><?php 
echo JHtml::calendar(strftime('%Y-%m-%d'), 'start', 'start', '%Y-%m-%d');
?>
</td>
		</tr>
		
		<tr>
			<td nowrap='nowrap' class="key hasTip" title="<?php 
echo JText::_('COM_JOOMLEAGUE_ADMIN_ROUNDS_POPULATE_NEW_ROUND_NAME_LABEL') . '::' . JText::_('COM_JOOMLEAGUE_ADMIN_ROUNDS_POPULATE_NEW_ROUND_NAME_TIP');
?>
">
				<label for="roundname"><?php 
echo JText::_('COM_JOOMLEAGUE_ADMIN_ROUNDS_POPULATE_NEW_ROUND_NAME_LABEL');
?>
</label>
			</td>
			<td><input type="text" name="roundname" value="<?php 
Example #10
0
				<td>
					<?php 
echo JHtml::calendar($validfrom, 'validfrom', 'validfrom', '%Y-%m-%d ' . date("H:i:s"));
?>
			
				</td>
			</tr>
			<tr>
				<td align="right" class="key">
					<?php 
echo JText::_('COM_VMCOUPONS_VALIDITY_PERIOD_END');
?>
				</td>					
				<td>
					<?php 
echo JHtml::calendar($validtill, 'validtill', 'validtill', '%Y-%m-%d ' . date("H:i:s"));
?>
				
				</td>
			</tr>	
			<tr>
				<td align="right" class="key">
					<?php 
echo JText::_('COM_VMCOUPONS_USES_REMAIN');
?>
				</td>					
				<td>
					<input class="text_area" type="text" name="remain_use" id="remain_use" size="20" maxlength="100" value="<?php 
echo $this->row->remain_use;
?>
" />
Example #11
0
	<div class="span3" id="formvalidate">
		
		<label><?php 
echo JText::_('COM_BOOKPRO_START_DATE_');
?>
 </label>
		<?php 
echo JHtml::calendar(JFactory::getDate()->format('Y-m-d'), 'jform[startdate]', 'startdate', DateHelper::getConvertDateFormat('M'), 'readonly="readonly"');
?>

		<label><?php 
echo JText::_('COM_BOOKPRO_END_DATE_');
?>
 </label>
		<?php 
echo JHtml::calendar(JFactory::getDate()->add(new DateInterval('P60D'))->format('Y-m-d'), 'jform[enddate]', 'enddate', DateHelper::getConvertDateFormat('M'), 'readonly="readonly"');
?>

		<label><?php 
echo JText::_('COM_BOOKPRO_WEEK_DAY');
?>
 </label>

		<?php 
echo $this->getDayWeek('weekday[]');
?>
		<hr />

		<?php 
echo $this->loadTemplate('base');
?>
Example #12
0
<?php

// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// add css
$csspath = JUri::base() . 'components/com_easyreservation/css/newreservation.css';
$document = JFactory::getDocument();
$document->addStyleSheet($csspath);
$user = JFactory::getUser();
JHtml::calendar(date('Y-m-d', strtotime($this->input_data['start_date'])), 'start_date', 'start_date', '%d.%m.%Y');
if ($user->authorise('core.admin')) {
    JHtml::calendar(date('Y-m-d', strtotime($this->input_data['end_day'])), 'end_day', 'end_day', '%d.%m.%Y');
}
function option($value, $msg, $selectedValue)
{
    if ($value == $selectedValue) {
        $selected = 'selected';
    }
    if (isset($value)) {
        $v = "value='{$value}'";
    }
    echo "<option {$v} {$selected}>{$msg}</option>\n";
}
echo $this->msg;
?>

<h1><?php 
echo JText::_(COM_EASYRESERVATION_NEW_RESERVATION);
?>
</h1>
Example #13
0
:</td>
			<td><?php 
    echo $helper->formatime($camp_row->start_date, $configs->params['timeformat']);
    ?>
</td>
		</tr>
        
        <tr>
			<td><?php 
    echo JText::_('REPENDDATE');
    ?>
:</td>
			<td>
				<?php 
    $end_date = $camp_row->validity;
    $calendar = JHtml::calendar($helper->formatime($end_date, $configs->params['timeformat']), 'validity', 'validity', '' . $ymd . $hms, '');
    if ($end_date == "0000-00-00 00:00:00") {
        $end_date = "Never";
        $calendar = str_replace('value=""', 'value="' . trim($end_date) . '"', $calendar);
    }
    echo $calendar;
    ?>
            </td>
		</tr>


		<?php 
    if ($camp_row->type == "cpm") {
        if ($camp_row->quantity > 0) {
            $package_row->quantity = intval($package_row->quantity) - intval($camp_row->quantity);
            ?>
Example #14
0
         echo '<tr><td><label for="joomdoc_keywords_text">' . JText::_('JOOMDOC_SEARCH_AREA_TEXT') . '</label></td>';
         echo '<td><input type="text" name="joomdoc_keywords_text" id="joomdoc_keywords_text" value="' . $this->escape($this->search->keywords_text) . '" /></td></tr>';
     }
     if ($config->searchShowMetadata) {
         echo '<tr><td><label for="joomdoc_keywords_meta">' . JText::_('JOOMDOC_SEARCH_AREA_META') . '</label></td>';
         echo '<td><input type="text" name="joomdoc_keywords_meta" id="joomdoc_keywords_meta" value="' . $this->escape($this->search->keywords_meta) . '" /></td></tr>';
     }
     if ($config->searchShowFulltext) {
         echo '<tr><td><label for="joomdoc_keywords_full">' . JText::_('JOOMDOC_SEARCH_AREA_FULL') . '</label></td>';
         echo '<td><input type="text" name="joomdoc_keywords_full" id="joomdoc_keywords_full" value="' . $this->escape($this->search->keywords_full) . '" /></td></tr>';
     }
 }
 foreach ($this->searchablefields as $field) {
     if ($field->type == JOOMDOC_FIELD_DATE) {
         echo '<tr><td><label for="' . $field->name . '">' . $field->title . '</label></td><td>';
         echo JHtml::calendar($this->search->fields[$field->id]['value'], $field->name, $field->name);
         echo '</td></tr>';
     } elseif ($field->type == JOOMDOC_FIELD_SELECT) {
         echo '<tr><td><label for="' . $field->name . '">' . $field->title . '</label></td><td>';
         echo JHtml::_('select.genericlist', array_merge(array('' => ''), $field->options), $field->name, '', 'value', 'label', $this->search->fields[$field->id]['value']);
         echo '</td></tr>';
     } elseif ($field->type == JOOMDOC_FIELD_MULTI_SELECT || $field->type == JOOMDOC_FIELD_SUGGEST) {
         echo '<tr><td><label for="' . $field->name . '">' . $field->title . '</label></td><td>';
         echo '<input type="hidden" name="' . $field->name . '[]" value="" />';
         echo JHtml::_('select.genericlist', $field->options, $field->name . '[]', 'multiple="multiple"' . ($field->params->get('size') ? ' size="' . $this->escape($field->params->get('size')) . '"' : ''), 'value', 'label', $this->search->fields[$field->id]['value']);
         JHtml::_('joomdoc.chosen', $field->name, false);
         echo '</td></tr>';
     } elseif ($field->type == JOOMDOC_FIELD_RADIO) {
         echo '<tr><td><label for="' . $field->name . '">' . $field->title . '</label></td><td>';
         echo '<fieldset class="radio btn-group">';
         echo '<input type="hidden" name="' . $field->name . '" value="" />';
?>
" id="adminForm" name="adminForm">

<div class="row-fluid">
	<div class="filter-search fltlft form-inline">
		<?php 
echo getRangeSelect($chartState->range);
?>
		<?php 
echo getChartTypeSelect($chartState->chartType);
?>
		<?php 
echo JHtml::calendar($chartState->fromDate, 'filter_from_date', 'filter_from_date', '%Y-%m-%d', 'for =1 placeholder="From date" readonly="true" style="width: 100px;"');
?>
		<?php 
echo JHtml::calendar($chartState->toDate, 'filter_to_date', 'filter_to_date', '%Y-%m-%d', 'for=1 readonly="true" placeholder="To date" style="width: 100px;"');
?>
		
		<button class="btn btn-primary" type="submit" id="submit_chart"><i class="icon-bars "></i>&nbsp;<?php 
echo JText::_('COM_BOOKPRO_SHOW');
?>
</button>
		<button class="btn btn-primary" type="button" onclick="
			document.id('filter_from_date').value='';	
			document.id('filter_to_date').value='';
			document.id('filter_range').value='0';
			this.form.submit();"
			><i class="icon-remove "></i>&nbsp;</button>
		
	</div>
	<div class="clearfix"></div>
Example #16
0
<?php

defined('_JEXEC') or die('Restricted access');
?>
<form name="adminForm" id="adminForm" method="post">
	<?php 
$dateformat = "%d-%m-%Y";
?>
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td><?php 
echo JHtml::calendar(JoomleagueHelper::convertDate($this->startdate, 1), 'startdate', 'startdate', $dateformat);
echo ' - ' . JHtml::calendar(JoomleagueHelper::convertDate($this->enddate, 1), 'enddate', 'enddate', $dateformat);
?>
<input type="submit" class="button" name="reload View" value="<?php 
echo JText::_('COM_JOOMLEAGUE_GLOBAL_FILTER');
?>
" /></td>
			<td><?php 
if ($this->club) {
    $picture = $this->club->logo_middle;
    echo JoomleagueHelper::getPictureThumb($picture, $this->club->name, 50, 50, 2);
}
?>
</td>
		</tr>
	</table>
	<?php 
echo JHtml::_('form.token') . "\n";
?>
</form><br />
Example #17
0
<div class="span10" id="j-main-container">
	<form action="<?php 
echo JRoute::_('index.php?option=com_bookpro&view=passengers');
?>
" method="post" name="adminForm" id="adminForm">

<div class="well well-small">
	<div class="row-fluid "> 
		<div class="span9">
			<div class="form-inline">
				
				<?php 
echo JHtml::calendar($this->state->get('filter.from_date'), 'filter_from_date', 'filter_from_date', '%Y-%m-%d', array('placeholder' => JText::_('From date'), 'class' => 'input-small'));
?>
				<?php 
echo JHtml::calendar($this->state->get('filter.to_date'), 'filter_to_date', 'filter_to_date', '%Y-%m-%d', array('placeholder' => JText::_('To date'), 'class' => 'input-small'));
?>
				
				<?php 
echo $this->getTourList();
?>
				
				<input type="text" placeholder="<?php 
echo JText::_('COM_BOOKPRO_SEARCH_IN_TITLE');
?>
" value="<?php 
echo $this->state->get('filter.search');
?>
" name="filter_search" id="filter_search">
				
					<button onclick="this.form.submit();" class="btn">
Example #18
0
                $ymd = "%Y-%m-%d";
            } elseif ($configs->params['timeformat'] == 4) {
                $ymd = "%m/%d/%Y";
            } elseif ($configs->params['timeformat'] == 5) {
                $ymd = "%d-%m-%Y";
            }
            $format = str_replace("%", "", $ymd);
            $format = str_replace("H:M:S", "H:i:s", $format);
            $offset = JFactory::getApplication()->getCfg('offset');
            $jnow = JFactory::getDate('now', $offset);
            $jnow = $jnow->toSql(true);
            $camp_row->start_date = date($format, strtotime($jnow));
            if (trim($camp_row->start_date) == "") {
                $camp_row->start_date = date($format);
            }
            echo JHtml::calendar($camp_row->start_date, 'start_date', 'start_date', $ymd, '');
            echo "<input type='hidden' name='tfa' value='" . $configs->params['timeformat'] . "' />";
            ?>
        </div>
      </div>

      <?php 
        }
        ?>

      <?php 
        @($most_recent_available_date = $_SESSION["most_recent_available_date"]);
        if (!$can_buy && $most_recent_available_date != "NO_SLOTS_AVAILABLE") {
            ?>

      <!-- Recent date -->
Example #19
0
</script>
<form action="<?php 
echo JRoute::_('index.php?option=com_bookpro&view=transportreports');
?>
" method="post" name="adminForm" id="adminForm">
	<div id="j-main-container" class="span10">
		<div class="well well-small" >
			<div class="row-fluid">
				<div class="span9">
					<div class="btn-toolbar">
						<div class="filter-search btn-group"><?php 
echo JHtml::calendar($this->state->get('filter.from_date'), 'filter_from_date', 'filter_from_date', '%Y-%m-%d', 'for =1 placeholder="From date" style="width: 100px;"');
?>
</div>
						<div class="filter-search btn-group"><?php 
echo JHtml::calendar($this->state->get('filter.to_date'), 'filter_to_date', 'filter_to_date', '%Y-%m-%d', 'for =1 placeholder="To date" style="width: 100px;"');
?>
</div>
						<div class="filter-search btn-group"><?php 
echo JsHelper::timepicker($this->state->get('filter.from_time'), 'filter_from_time', 'filter_from_time', 'class="input-mini" title="From time" placeholder="From time"', 'showMeridian : false,defaultTime: false');
?>
</div>
						<div class="filter-search btn-group"><?php 
echo JsHelper::timepicker($this->state->get('filter.to_time'), 'filter_to_time', 'filter_to_time', 'class="input-mini" title="To time" placeholder="To time"', 'showMeridian : false,defaultTime: false');
?>
</div>
						
						<div><?php 
echo $this->getTransportType();
echo $this->getRoute();
?>
Example #20
0
        break;
    case "4":
        $format_string = "m/d/Y";
        break;
    case "5":
        $format_string = "d-m-Y";
        break;
}
$format_string_2 = str_replace("-", "-%", $format_string);
$format_string_2 = str_replace("/", "/%", $format_string_2);
$format_string_2 = "%" . $format_string_2;
$format_string_2 = str_replace("H:i:s", "%H:%M:%S", $format_string_2);
$joomla_date = JFActory::getDate();
$current_date = $joomla_date->toSql();
$now_now = $helper->formatime($current_date, $configs->params['timeformat']);
echo JHtml::calendar(trim($now_now), 'pay_date', 'pay_date', $format_string_2, '');
echo "<input type='hidden' name='tfa' value='" . $configs->params['timeformat'] . "' />";
?>
				<span class="editlinktip hasTip" title="<?php 
echo JText::_('AD_PAYMENT_DATE_TIP');
?>
" >
				<img src="components/com_adagency/images/tooltip.png" border="0"/></span>
			</div>
	</div>
			<input type="hidden" name="images" value="" />                
	        <input type="hidden" name="option" value="com_adagency" />
	        <input type="hidden" name="id" value="" />
	        <input type="hidden" name="task" value="" />
			<input type="hidden" name="controller" value="adagencyOrders" />
        </form>
Example #21
0
 * @copyright	Copyright (C) 2006-2015 joomleague.at. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 * @link		http://www.joomleague.at
 */
defined('_JEXEC') or die;
?>
<form name="adminForm" id="adminForm" method="post">
	<?php 
$dateformat = "%d-%m-%Y";
?>
	
<div class="clearfix">
	<div class="btn-wrapper input-append pull-left">
		<?php 
echo JHtml::calendar(JoomleagueHelper::convertDate($this->startdate, 1), 'startdate', 'startdate', $dateformat, array('class' => 'input-small'));
echo ' - ' . JHtml::calendar(JoomleagueHelper::convertDate($this->enddate, 1), 'enddate', 'enddate', $dateformat, array('class' => 'input-small'));
?>
		<input type="submit" class="button btn" name="reload View" value="<?php 
echo JText::_('COM_JOOMLEAGUE_GLOBAL_FILTER');
?>
" />
	</div>
	<div class="btn-wrapper input-append pull-right">
	<?php 
if ($this->club) {
    $picture = $this->club->logo_middle;
    echo JoomleagueHelper::getPictureThumb($picture, $this->club->name, 50, 50, 2);
}
?>
	</div>
</div>
Example #22
0
					</label>
					<div class="controls">
						<?php 
echo JHtml::calendar($this->obj->publish_date, 'publish_date', 'publish_date', '%Y-%m-%d');
?>
					</div>
				</div>
				
				<div class="control-group">
					<label class="control-label" for="unpublish_date"><?php 
echo JText::_('COM_BOOKPRO_UNPUBLISH_DATE');
?>
					</label>
					<div class="controls">
						<?php 
echo JHtml::calendar($this->obj->unpublish_date, 'unpublish_date', 'unpublish_date', '%Y-%m-%d');
?>
					</div>
				</div>
				
				<div class="control-group">
					<label class="control-label" for="state"><?php 
echo JText::_('COM_BOOKPRO_STATUS');
?>
					</label>
					<div class="controls form-inline">
						<input type="radio" class="inputRadio" name="state" value="1"
						id="state_active"
						<?php 
if ($this->obj->state == 1) {
    echo 'checked="checked"';
Example #23
0
?>
</label>
					<label><?php 
echo JText::_('COM_VMCOUPONS_VALIDITY_PERIOD_START');
?>
 </label>   
						   <?php 
echo JHtml::calendar('', 'valdays', 'valdays', '%Y-%m-%d ' . date("H:i:s"));
?>
 
					<label><?php 
echo JText::_('COM_VMCOUPONS_VALIDITY_PERIOD_END');
?>
</label>      	  
						   <?php 
echo JHtml::calendar('', 'valdayse', 'valdayse', '%Y-%m-%d ' . date("H:i:s"));
?>
				</p>
				<p>
					<label><?php 
echo JText::_('COM_VMCOUPONS_Coupon_be_used');
?>
</label>
					<input type="text" name="cpntime" id="cpntime" size="5"/> times
					<br>
					<input name="allusers" type="checkbox" id="allusers" />
					<label>
						<?php 
echo JText::_('COM_VMCOUPONS_USERS_NUMBER');
echo " (" . countusers() . ")";
?>
Example #24
0
 public function getDateField($name, $cssclass)
 {
     $input = JFactory::getApplication()->input;
     JHTML::_('behavior.calendar');
     $attrs = array('size' => '10', 'class' => $cssclass);
     $auto_filter = (int) @$this->params->get('auto_filter');
     if ($auto_filter) {
         $attrs['onchange'] = 'validateDateRange(this);';
     }
     $selected_values = $input->get($name, '');
     $html = JHtml::calendar($selected_values, $name, $name . '_' . $this->module->id, '%Y-%m-%d', $attrs);
     return $html;
 }
Example #25
0
echo JText::_('JSEARCH_FILTER_LABEL');
?>
</label>
			<input type="text" name="filter_search" id="filter_search" value="<?php 
echo $this->escape($this->state->get('filter.search'));
?>
" title="<?php 
echo JText::_('Search');
?>
" />
		    <div style="display:inline;"><span style="float:left;padding: 7px 5px 0 5px;">FROM:</span><?php 
echo JHtml::calendar($this->state->get('filter.from'), 'filter_from', 'filter_from');
?>
</div>
            <div style="display:inline;"><span style="float:left;padding: 7px 5px 0 5px;">TO:</span><?php 
echo JHtml::calendar($this->state->get('filter.to'), 'filter_to', 'filter_to');
?>
</div>
			<button type="submit"><?php 
echo JText::_('JSEARCH_FILTER_SUBMIT');
?>
</button>
			<button type="button" onclick="document.id('filter_search').value='';this.form.submit();"><?php 
echo JText::_('JSEARCH_FILTER_CLEAR');
?>
</button>
			<button type="button" onclick="document.location.href='index.php?option=com_improvemycity&view=reports&format=print'"><?php 
echo JText::_('PRINT');
?>
</button>
		</div>
Example #26
0
?>
					</div>
				</div>
				
				<div class="control-group">
					<label class="control-label">
						<?php 
echo JText::_('ADAG_FINISH_PUBLISHING');
?>
					</label>
					<div class="controls">
						<?php 
if ($ad_end_date == "Never") {
    $ad_end_date = "";
}
$calendar = JHtml::calendar(trim($ad_end_date), 'ad_end_date', 'ad_end_date', $format_string_2, '');
if ($ad_end_date == "") {
    $calendar = str_replace('value=""', 'value="Never"', $calendar);
}
echo $calendar;
?>
					</div>
				</div>
				
			</div>
			
			            
            <?php 
$helper->render($_row->id, "");
?>
			
Example #27
0
					<label>
						<?php 
echo JText::_('J2STORE_ORDERS_EXPORT_FROM_DATE');
?>
					</label>
					 	<?php 
echo JHtml::calendar($vars->state->get('filter_order_from_date'), 'filter_order_from_date', 'filter_order_from_date', '%Y-%m-%d %H:%M:%S', array('class' => 'input-mini'));
?>

					<label>
						<?php 
echo JText::_('J2STORE_ORDERS_EXPORT_TO_DATE');
?>
					</label>
						<?php 
echo JHtml::calendar($vars->state->get('filter_order_to_date'), 'filter_order_to_date', 'filter_order_to_date', '%Y-%m-%d %H:%M:%S', array('class' => 'input-mini'));
?>
						<button class="btn btn-inverse" onclick="document.getElementById('filter_order_from_date').value='',document.getElementById('filter_order_to_date').value='';this.form.submit();">
						<i class="icon icon-remove"></i>
						</button>
				</td>
				<td>
					<label><?php 
echo JText::_('J2STORE_CUSTOMER');
?>
</label>
					<input type="text" class="input-small" id="filter_order_customer" name="filter_order_customer" value="<?php 
echo htmlspecialchars($vars->state->get('filter_order_customer'));
?>
" />
					<button class="btn btn-inverse" onclick="document.getElementById('reportTask').value='';document.getElementById('filter_order_customer').value='';this.form.submit();">
Example #28
0
    $date1 = JoomleagueHelper::convertDate($row->round_date_first, 1);
    $append = '';
    if ($date1 == '00-00-0000' || $date1 == '') {
        $append = ' style="background-color:#FFCCCC;" ';
    }
    echo JHtml::calendar($date1, 'round_date_first' . $row->id, 'round_date_first' . $row->id, '%d-%m-%Y', 'size="10" ' . $append . 'tabindex="3" ' . 'class="center" ' . 'onchange="document.getElementById(\'cb' . $i . '\').checked=true"');
    ?>
							</td>
							<td class="center">&nbsp;-&nbsp;</td>
							<td class="center"><?php 
    $date2 = JoomleagueHelper::convertDate($row->round_date_last, 1);
    $append = '';
    if ($date2 == '00-00-0000' || $date2 == '') {
        $append = ' style="background-color:#FFCCCC;"';
    }
    echo JHtml::calendar($date2, 'round_date_last' . $row->id, 'round_date_last' . $row->id, '%d-%m-%Y', 'size="10" ' . $append . 'tabindex="3" ' . 'class="center" ' . 'onchange="document.getElementById(\'cb' . $i . '\').checked=true"');
    ?>
</td>
							<td class="center nowrap"><?php 
    if ($this->countProjectTeams > 0) {
        $link2Title = JText::plural('COM_JOOMLEAGUE_ADMIN_ROUNDS_EDIT_MATCHES_LINK', $row->countMatches);
        $link2Params = "title='{$link2Title}'";
        echo JHtml::link($link2, $link2Title, $link2Params);
    } else {
        echo '<a href="index.php?option=com_joomleague&view=projectteams&task=projectteam.display">' . JText::_('COM_JOOMLEAGUE_ADMIN_MATCH_NO_TEAMS') . '</a>';
    }
    ?>
</td>
							<td class="center nowrap"><?php 
    if ($row->countUnPublished == 0 && $row->countMatches > 0) {
        $imageTitle = JText::plural('COM_JOOMLEAGUE_ADMIN_ROUNDS_ALL_PUBLISHED', $row->countMatches);
Example #29
0
 /**
  * Tests JHtml::calendar() method with and without 'readonly' attribute.
  *
  * @return  void
  *
  * @since   3.1
  */
 public function testCalendar()
 {
     // @TODO - Test currently failing, fix this later
     $this->markTestSkipped('Skipping failing test');
     $cfg = new JObject();
     JFactory::$session = $this->getMockSession();
     JFactory::$config = $cfg;
     JFactory::$application->expects($this->any())->method('getTemplate')->will($this->returnValue('atomic'));
     $cfg->live_site = 'http://example.com';
     $cfg->offset = 'Europe/Kiev';
     // Two sets of test data
     $test_data = array('date' => '2010-05-28 00:00:00', 'friendly_date' => 'Friday, 28 May 2010', 'name' => 'cal1_name', 'id' => 'cal1_id', 'format' => '%Y-%m-%d', 'attribs' => array());
     $test_data_ro = array_merge($test_data, array('attribs' => array('readonly' => 'readonly')));
     foreach (array($test_data, $test_data_ro) as $data) {
         // Reset the document
         JFactory::$document = JDocument::getInstance('html', array('unique_key' => serialize($data)));
         $input = JHtml::calendar($data['date'], $data['name'], $data['id'], $data['format'], $data['attribs']);
         $this->assertGreaterThan(strlen($input), 0, 'Line:' . __LINE__ . ' The calendar method should return something without error.');
         $xml = new SimpleXMLElement('<calendar>' . $input . '</calendar>');
         $this->assertEquals('text', (string) $xml->input['type'], 'Line:' . __LINE__ . ' The calendar input should have `type == "text"`');
         // @todo We can't test this yet due to dependency on language strings
         $this->assertEquals($data['friendly_date'], (string) $xml->input['title'], 'Line:' . __LINE__ . ' The calendar input should have `title == "' . $data['friendly_date'] . '"`');
         $this->assertEquals($data['name'], (string) $xml->input['name'], 'Line:' . __LINE__ . ' The calendar input should have `name == "' . $data['name'] . '"`');
         $this->assertEquals($data['id'], (string) $xml->input['id'], 'Line:' . __LINE__ . ' The calendar input should have `id == "' . $data['id'] . '"`');
         $this->assertEquals($data['date'], (string) $xml->input['value'], 'Line:' . __LINE__ . ' The calendar input should have `value == "' . $data['date'] . '"`');
         $head_data = JFactory::getDocument()->getHeadData();
         if (isset($data['attribs']['readonly']) && $data['attribs']['readonly'] === 'readonly') {
             $this->assertEquals($data['attribs']['readonly'], (string) $xml->input['readonly'], 'Line:' . __LINE__ . ' The readonly calendar input should have `readonly == "' . $data['attribs']['readonly'] . '"`');
             $this->assertFalse(isset($xml->img), 'Line:' . __LINE__ . ' The readonly calendar input shouldn\'t have a calendar image');
             $this->assertArrayNotHasKey('/media/system/js/calendar.js', $head_data['scripts'], 'Line:' . __LINE__ . ' JS file "calendar.js" shouldn\'t be loaded');
             $this->assertArrayNotHasKey('/media/system/js/calendar-setup.js', $head_data['scripts'], 'Line:' . __LINE__ . ' JS file "calendar-setup.js" shouldn\'t be loaded');
             $this->assertArrayNotHasKey('text/javascript', $head_data['script'], 'Line:' . __LINE__ . ' Inline JS for the calendar shouldn\'t be loaded');
         } else {
             $this->assertFalse(isset($xml->input['readonly']), 'Line:' . __LINE__ . ' The calendar input shouldn\'t have readonly attribute');
             $this->assertTrue(isset($xml->img), 'Line:' . __LINE__ . ' The calendar input should have a calendar image');
             $this->assertEquals($data['id'] . '_img', (string) $xml->img['id'], 'Line:' . __LINE__ . ' The calendar image should have `id == "' . $data['id'] . '_img' . '"`');
             $this->assertEquals('calendar', (string) $xml->img['class'], 'Line:' . __LINE__ . ' The calendar image should have `class == "calendar"`');
             $this->assertFileExists(JPATH_ROOT . $xml->img['src'], 'Line:' . __LINE__ . ' The calendar image source should point to an existent file');
             $this->assertArrayHasKey('/media/system/js/calendar.js', $head_data['scripts'], 'Line:' . __LINE__ . ' JS file "calendar.js" should be loaded');
             $this->assertArrayHasKey('/media/system/js/calendar-setup.js', $head_data['scripts'], 'Line:' . __LINE__ . ' JS file "calendar-setup.js" should be loaded');
             $this->assertContains('DHTML Date\\/Time Selector', $head_data['script']['text/javascript'], 'Line:' . __LINE__ . ' Inline JS for the calendar should be loaded');
         }
     }
 }
Example #30
0
                    <?php 
echo JText::_('MOD_PF_TIME_CONFIG_FILTER_DATE_FROM');
?>
                    <?php 
$cal = JHTML::calendar('', 'filter_start_date', 'filter_start_date', '%Y-%m-%d');
echo str_replace('id="filter_start_date"', 'id="filter_start_date" class="input-small"', $cal);
?>
                </label>
            </div>
            <div class="btn-group pull-left">
                <label for="filter_end_date">
                    <?php 
echo JText::_('MOD_PF_TIME_CONFIG_FILTER_DATE_TO');
?>
                    <?php 
$cal = JHtml::calendar(date('y-m-d', strtotime('now')), 'filter_end_date', 'filter_end_date', '%Y-%m-%d');
echo str_replace('id="filter_end_date"', 'id="filter_end_date" class="input-small"', $cal);
?>
                </label>
            </div>
            <div class="btn-group pull-left">
                <button class="btn dfilter" value="filter"><?php 
echo JText::_('MOD_PF_TIME_CONFIG_DISPLAY_LABEL');
?>
</button>
            </div>
            <div style="clear:both !important"></div>
        </div>
    </div>
	<?php 
echo JHtml::_('form.token');