/**
  * Returns a set of radio form elements
  *
  * array(
  * 'name' => '',
  * 'value' => '',
  * 'id' => '',
  * 'legend' => '',
  * 'options' => array('value1' => 'text1', 'value2' => 'text2', 'value3' => 'text3'),
  * 'options' => array('text1', 'text2', 'text3'), //also acceptable (cannot do half this, half above syntax)
  * )
  *
  * @param array $args
  * @return str
  */
 public function radios(array $args)
 {
     $id = isset($args['id']) ? $args['id'] : $args['name'];
     $properties = $this->_getProperties($args);
     if (isset($properties['value'])) {
         $checked = $properties['value'];
         unset($properties['value']);
     }
     $properties['type'] = isset($args['type']) ? $args['type'] : 'radio';
     $useValues = key($args['options']) !== 0 || isset($args['useValue']) && $args['useValue'];
     foreach ($args['options'] as $value => $text) {
         if (!$useValues) {
             $value = $text;
         }
         $properties['id'] = $id . '_' . preg_replace('/\\W/', '', $value);
         $properties['value'] = $value;
         if (isset($checked) && (($properties['type'] == 'radio' || !is_array($checked)) && $value == $checked || $properties['type'] == 'checkbox' && is_array($checked) && in_array((string) $value, $checked))) {
             $properties['checked'] = 'checked';
             $rowClass = !isset($properties['class']) ? 'checked' : $properties['class'] . ' checked';
         }
         $labelFirst = isset($args['labelFirst']) ? $args['labelFirst'] : false;
         $labelArgs = array('label' => $text, 'id' => $properties['id'], 'labelFirst' => $labelFirst);
         $input = '<input ' . htmlHelper::formatProperties($properties) . ' />';
         $row = $this->_getLabel($labelArgs, $input);
         if (isset($rowClass)) {
             $row = '<span class="' . $rowClass . '">' . $row . '</span>';
         }
         $radios[] = $row;
         unset($properties['checked'], $rowClass);
     }
     $this->{$properties['type'] == 'radio' ? 'radios' : 'checkboxes'} = $radios;
     $break = !isset($args['optionBreak']) ? '<br />' : $args['optionBreak'];
     $addFieldset = isset($args['addFieldset']) ? $args['addFieldset'] : isset($args['label']) && $args['label'] || count($args['options']) > 1;
     if ($addFieldset) {
         $return = '<fieldset id="' . $id . '">';
         if (isset($args['label'])) {
             $return .= '<legend>' . get::htmlentities($args['label']) . '</legend>';
         }
         $return .= implode($break, $radios) . '</fieldset>';
     } else {
         $return = implode($break, $radios);
     }
     if (isset($_POST['errors']) && isset($_POST['errors'][$id])) {
         $return = $this->getErrorMessageContainer($id, $_POST['errors'][$id]) . $return;
     }
     return $return;
 }
	<label class="control-label" for="customerLastname"><?php 
echo JTEXT::_('COM_BOOKINGFORCONNECTOR_ORDERS_VIEW_LASTNAME');
?>
</label>
	<div class="controls">
		<input id="customerLastname" name="customerLastname" type="text" />
	</div>
</div>
<div class="control-group">
	<label class="control-label" for="checkIn"><?php 
echo JTEXT::_('COM_BOOKINGFORCONNECTOR_ORDERS_VIEW_CHECKIN');
?>
</label>
	<div class="controls">
			<?php 
echo htmlHelper::calendar($date->format('m/d/Y'), 'checkIn', 'checkIn', 'm/d/Y', 'd/m/Y', 'dd/mm/yy', array('class' => 'calendar'), true, array('minDate' => '\'+0d\'', 'onSelect' => 'function(dateStr) { $("#formCheckMode").validate().element(this); }'));
?>
	</div>
</div>
<script type="text/javascript">
jQuery(function($)
		{
		    $("#formCheckMode").validate(
		    {
		        rules:
		        {
		        	externalOrderId: "required",
		        	checkIn: {
			        		required: true,
			        		dateITA: true
			        	},
예제 #3
0
            </div><!--/span-->
          </div><!--/row-->
          <div class="<?php 
echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_ROW;
?>
">
            <div class="<?php 
echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL;
?>
4">
              <label><?php 
echo JTEXT::_('COM_BOOKINGFORCONNECTOR_CREW_VIEW_BIRTHDATE');
?>
</label>
				<?php 
echo htmlHelper::calendar($birthDate->format('m/d/Y'), 'birthDate' . $currentCrew, 'birthDate' . $currentCrew, 'm/d/Y', 'd/m/Y', 'dd/mm/yy', array('class' => '<?php echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL ?>12'), true, array());
?>
                 
            </div><!--/span-->
            <div class="<?php 
echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL;
?>
4">
              <label><?php 
echo JTEXT::_('COM_BOOKINGFORCONNECTOR_CREW_VIEW_BIRTHLOCATION');
?>
</label>
              <input name="birthLocation<?php 
echo $currentCrew;
?>
" type="text" class="<?php 
예제 #4
0
?>
 </label>
			<?php 
echo htmlHelper::calendar($checkin->format('m/d/Y'), 'form[CheckIn]', $checkinId, 'm/d/Y', 'd/m/Y', 'dd/mm/yy', array('class' => ''), true, array('minDate' => '\'+0d\'', 'onClose' => 'function(dateText, inst) { jQuery(this).attr("disabled", false); }', 'beforeShow' => 'function(dateText, inst) { jQuery(this).attr("disabled", true); }', 'onSelect' => 'function(date) { checkDate' . $checkinId . '(jQuery, jQuery(this), date); }'));
?>
			</div><!--/span-->
			<div class="<?php 
echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL;
?>
4">
				<label><?php 
echo JTEXT::_('COM_BOOKINGFORCONNECTOR_DEFAULT_FORM_CHECKOUT');
?>
 </label>
					<?php 
echo htmlHelper::calendar($checkout->format('m/d/Y'), 'form[CheckOut]', $checkoutId, 'm/d/Y', 'd/m/Y', 'dd/mm/yy', array('class' => ''), true, array('onClose' => 'function(dateText, inst) { jQuery(this).attr("disabled", false); }', 'beforeShow' => 'function(dateText, inst) { jQuery(this).attr("disabled", true); }', 'minDate' => '\'+1d\''));
?>
			</div><!--/span-->
			<div class="<?php 
echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL;
?>
4">
				<label><?php 
echo JTEXT::_('COM_BOOKINGFORCONNECTOR_DEFAULT_FORM_TOTPERSONS');
?>
 </label>
					<?php 
echo JHTML::_('select.integerlist', 0, 10, 1, 'form[Totpersons]', null, 2);
?>
			</div><!--/span-->
		</div>
예제 #5
0
				<div class="mod_bookingforsearch-param mod_bookingforsearch-calendar mod_bookingforsearch-checkin">
					<div class="labelforcalendar"><?php 
echo JTEXT::_('MOD_BOOKINGFORSEARCH_FROM');
?>
:</div>
					<?php 
echo htmlHelper::calendar($checkin->format('m/d/Y'), 'checkin', $checkinId, 'm/d/Y', 'd/m/Y', 'dd/mm/yy', array('class' => 'calendar'), true, array('minDate' => '\'' . $startDate->format('d/m/Y') . '\'', 'maxDate' => '\'' . $endDate->format('d/m/Y') . '\'', 'onSelect' => 'function(date) { checkDate' . $checkinId . '(jQuery, jQuery(this), date); }'));
?>
				</div>
				<div class="mod_bookingforsearch-param mod_bookingforsearch-calendar mod_bookingforsearch-checkout">
					<div class="labelforcalendar"><?php 
echo JTEXT::_('MOD_BOOKINGFORSEARCH_TO');
?>
:</div>
					<?php 
echo htmlHelper::calendar($checkout->format('m/d/Y'), 'checkout', $checkoutId, 'm/d/Y', 'd/m/Y', 'dd/mm/yy', array('class' => 'calendar'), true, array('minDate' => '\'' . $startDate2->format('d/m/Y') . '\'', 'maxDate' => '\'' . $endDate->format('d/m/Y') . '\''));
?>
				</div>
				<div class="clearfix clearboth"></div>
				<div class="mod_bookingforsearch-param mod_bookingforsearch-accomodation">
					<div class="labelforaccomodation"><?php 
echo JTEXT::_('MOD_BOOKINGFORSEARCH_ACCOMODATION');
?>
:</div>
					<div class="selectforaccomodation"><?php 
echo JHTML::_('select.genericlist', $types, 'masterTypeId', array('class' => 'inputtotal'), 'value', 'text', $masterTypeId, 'masterTypeId' . $currModID);
?>
</div>
				</div>
				<div class="clearfix clearboth"></div>
				<div class="mod_bookingforsearch-param mod_bookingforsearch-zones">
?>
:</span>
						<?php 
echo htmlHelper::calendar($checkin->format('m/d/Y'), 'checkin', $checkinId, 'm/d/Y', 'd/m/Y', 'dd/mm/yy', array('class' => 'calendar'), true, array('beforeShowDay' => 'function (date) { return enableSpecificDates(date, 1, daysToEnable); }', 'minDate' => '\'' . $startDate->format('d/m/Y') . '\'', 'maxDate' => '\'' . $endDate->format('d/m/Y') . '\'', 'onSelect' => 'function(date) { checkDate' . $checkinId . '(jQuery, jQuery(this), date); quoteCalculatorChanged(); }'));
?>
					</div>
					<div class="<?php 
echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL;
?>
6" id="calcheckout">
						<span class="com_bookingforconnector_resource-calculatorForm-fieldLabel"><?php 
echo JText::_('COM_BOOKINGFORCONNECTOR_RESOURCE_VIEW_CALCULATOR_CHECKOUT');
?>
:</span>
						<?php 
echo htmlHelper::calendar($checkout->format('m/d/Y'), 'checkout', $checkoutId, 'm/d/Y', 'd/m/Y', 'dd/mm/yy', array('class' => 'calendar'), true, array('beforeShowDay' => 'function (date) { return enableSpecificDates(date, 0, checkOutDaysToEnable); }', 'minDate' => '\'' . $startDate2->format('d/m/Y') . '\'', 'maxDate' => '\'' . $endDate->format('d/m/Y') . '\'', 'onSelect' => 'function(date) { quoteCalculatorChanged(); }'));
?>
					</div>
					<div class="clear"></div>
				</div>
				<br />
				<div class="<?php 
echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_ROW;
?>
">
					<div class="<?php 
echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL;
?>
4">
						<span class="com_bookingforconnector_resource-calculatorForm-fieldLabel"><?php 
echo JText::_('COM_BOOKINGFORCONNECTOR_RESOURCE_VIEW_CALCULATOR_ADULTS');
예제 #7
0
    echo JTEXT::_('MOD_BOOKINGFORSEARCH_TO');
    ?>
</span><br />
				<?php 
    //$checkouttext = '"<div class=\'buttoncalendar checkoutli\'><div class=\'dateone day\'><span>'.$checkout->format("d").'</span></div><div class=\'dateone daterwo monthyear\'><p>'.$checkout->format("D").'<br />'.$checkout->format("M").' '.$checkout->format("Y").'  </p></div><div class=\'dateone\'><i class=\'fa fa-calendar\'></i></div></div>"';
    $checkouttext = '"<div class=\'buttoncalendar checkoutli' . $currModID . '\'><div class=\'dateone day\'><span>' . $checkout->format("d") . '</span></div><div class=\'dateone daterwo monthyear\'><p>' . $checkout->format("D") . '<br />' . $checkout->format("M") . ' ' . $checkout->format("Y") . '  </p></div></div>"';
    ?>
				<div class="dateone lastdate"><input type="hidden" name="checkout" value="<?php 
    echo $checkout->format('d/m/Y');
    ?>
" id="<?php 
    echo $checkoutId;
    ?>
" /></div>
				<?php 
    echo htmlHelper::calendarimage($checkout->format('m/d/Y'), 'checkout', $checkoutId, 'm/d/Y', 'd/m/Y', 'dd/mm/yy', array('class' => 'calendar'), true, array('numberOfMonths' => 2, 'onClose' => 'function(dateText, inst) { jQuery(this).attr("disabled", false);insertNight' . $currModID . '(); }', 'beforeShow' => 'function(dateText, inst) { jQuery(this).attr("disabled", true); insertCheckoutTitle' . $currModID . '(); }', 'onSelect' => 'function(date) { printChangedDate' . $currModID . '(date, jQuery(this)); }', 'onChangeMonthYear' => 'function(dateText, inst) { insertCheckoutTitle' . $currModID . '(); }', 'minDate' => '\'+1d\'', 'showOn' => '"button"', 'beforeShowDay' => 'closed' . $currModID, 'buttonText' => $checkouttext, 'firstDay' => 1));
    ?>
			</div>
			<div class="<?php 
    echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL;
    ?>
2 <?php 
    echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COLSMALL;
    ?>
2">
				<div class="calendarnight" id="calendarnight<?php 
    echo $durationId;
    ?>
"><?php 
    echo $duration->format('%a');
    ?>
예제 #8
0
파일: html.php 프로젝트: Borvik/Munla
                                    $v = htmlElement::$enumAttributes[$n][$v];
                                } elseif (in_array($n, htmlElement::$boolAttributes)) {
                                    if (is_bool($v) && !$v || !is_bool($v) && $v !== 'true') {
                                        continue;
                                    }
                                    $v = $n;
                                }
                                $attributes[$n] = $v;
                            }
                        }
                    }
                }
            }
        }
        //get url
        $attributes['src'] = get::file_url($src);
        $e = new he_img($attributes);
        if (!$this->echoOff) {
            echo $e;
        }
        return $e;
    }
}
/* Get the directory of THIS file so we can more easily specify sub directories */
$thisdir = strtr(dirname(__FILE__), '\\', '/');
if (substr($thisdir, -1) != '/') {
    $thisdir .= '/';
}
htmlHelper::$heFolder = $thisdir . 'html/';
require htmlHelper::$heFolder . 'htmlElement.php';
spl_autoload_register(array('htmlHelper', 'autoload'), true, true);
		</div>
	</div>
	<div class="<?php 
echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_ROW;
?>
">
		<div class="<?php 
echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL;
?>
4">
			<label><?php 
echo JTEXT::_('COM_BOOKINGFORCONNECTOR_CREW_VIEW_BIRTHDATE');
?>
</label>
			<?php 
echo htmlHelper::calendar($birthDate->format('m/d/Y'), 'birthDate' . $currentCrew, 'birthDate' . $currentCrew, 'm/d/Y', 'd/m/Y', 'dd/mm/yy', array('class' => 'full-width'), true, array('numberOfMonths' => '2'));
?>
                 

		</div>
		<div class="<?php 
echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL;
?>
4">
			<label><?php 
echo JTEXT::_('COM_BOOKINGFORCONNECTOR_CREW_VIEW_BIRTHLOCATION');
?>
</label>
			<input name="birthLocation<?php 
echo $currentCrew;
?>
예제 #10
0
            </div><!--/span-->
          </div><!--/row-->           
           <div class="<?php 
echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_ROW;
?>
">
            <div class="<?php 
echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL;
?>
6">
               <label><?php 
echo JTEXT::_('COM_BOOKINGFORCONNECTOR_CREW_VIEW_DOCUMENTDATE');
?>
</label>
				<?php 
echo htmlHelper::calendar($documentDate->format('m/d/Y'), 'documentDate', 'documentDate', 'm/d/Y', 'd/m/Y', 'dd/mm/yy', array('class' => '<?php echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL ?>12'), true, array('onSelect' => 'function(dateStr) { $("#formCheckMode").validate().element(this); }'));
?>
                
            </div><!--/span-->
            <div class="<?php 
echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL;
?>
6">
               <label><?php 
echo JTEXT::_('COM_BOOKINGFORCONNECTOR_CREW_VIEW_DOCUMENTRELEASE');
?>
</label>
               <input name="documentRelease" type="text" class="<?php 
echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL;
?>
12" placeholder="State" value="<?php 
예제 #11
0
		</div>
	</div>
	<div class="<?php 
    echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_ROW;
    ?>
">
		<div class="<?php 
    echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL;
    ?>
6">
			<label><?php 
    echo JTEXT::_('COM_BOOKINGFORCONNECTOR_CREW_VIEW_DOCUMENTDATE');
    ?>
</label>
			<?php 
    echo htmlHelper::calendar($documentDate->format('m/d/Y'), 'documentDate', 'documentDate', 'm/d/Y', 'd/m/Y', 'dd/mm/yy', array('class' => 'full-width'), true, array('numberOfMonths' => '2'));
    ?>
					  
		</div>
		<div class="<?php 
    echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL;
    ?>
6">
			<label><?php 
    echo JTEXT::_('COM_BOOKINGFORCONNECTOR_CREW_VIEW_DOCUMENTRELEASE');
    ?>
</label>
			<input name="documentRelease" type="text" placeholder="" value="<?php 
    echo $documentRelease;
    ?>
" maxlength="255" class="full-width">