/** * Returns a html date control. * * @param object $object An object. * @param string $method An object column. * @param array $options Date options. * @param string $default_value Date default value. * * @return string An html string which represents a date control. * */ function object_input_date_tag($object, $method, $options = array(), $default_value = null) { $options = _parse_attributes($options); $value = _get_object_value($object, $method, $default_value, $param = 'Y-m-d G:i'); return input_date_tag(_convert_method_to_name($method, $options), $value, $options); }
?> </td></tr> <tr><td > <label><?php echo __('Time in'); ?> </label><br/> <?php echo object_input_date_tag($attendance, 'getTimeIn', array('readonly' => true, 'maxlength' => 16, 'size' => 16, 'rich' => true, 'calendar_button_img' => '/images/calendar.gif', 'withtime' => true), date('Y/m/d h:i')); ?> <?php echo form_error('time_in'); ?> </td></tr> <tr><td > <label><?php echo __('Time out'); ?> </label><br/> <?php echo input_date_tag('time_out', date('Y/m/d h:i'), array('readonly' => true, 'maxlength' => 16, 'size' => 16, 'rich' => true, 'calendar_button_img' => '/images/calendar.gif', 'withtime' => true)); ?> <?php echo form_error('time_out'); ?> </td></tr> </tbody> </table> </td></tr> </table> </form>
echo 'style=""'; } ?> > <td class='filter'><?php echo submit_image_tag('/images/magnifier.png', array('class' => 'sort', 'onclick' => "blur();")); ?> </td> <td class='filter_first'><?php echo object_select_tag(isset($filters['ACADEMIC_CALENDAR_ID']) ? $filters['ACADEMIC_CALENDAR_ID'] : null, null, array('include_blank' => true, 'related_class' => 'AcademicCalendar', 'text_method' => '__toString', 'control_name' => 'filters[ACADEMIC_CALENDAR_ID]', 'peer_method' => 'doSelectFiltered', 'style' => 'width: 130px;')); ?> </td> <td class="filter"><?php echo input_date_tag('filters[START]', isset($filters['START']) ? $filters['START'] : null, array('rich' => true, 'withtime' => false, 'calendar_button_img' => '/images/calendar.gif')); ?> </td> <td class='filter'> <?php echo input_tag('filters[ACTIVITY_LENGTH]', isset($filters['ACTIVITY_LENGTH']) ? $filters['ACTIVITY_LENGTH'] : null, array('size' => 7)); ?> </td> <td class='filter'><?php echo object_select_tag(isset($filters['ACTIVITY_TYPE_ID']) ? $filters['ACTIVITY_TYPE_ID'] : null, null, array('include_blank' => true, 'related_class' => 'ActivityType', 'text_method' => '__toString', 'control_name' => 'filters[ACTIVITY_TYPE_ID]')); ?> </td> <td class='filter'><?php
<script type="text/javascript"> var cnic = new LiveValidation('cnic', { validMessage: "<?php echo Constant::VALIDATION_SUCCESS; ?> "}); cnic.add( Validate.Presence,{ failureMessage: "<?php echo Constant::VALIDATION_REQUIRED_FIELD; ?> "}); </script> </tr> <tr> <td width="155" align="left" height="30" style="padding-left:10px; padding-top:10px" valign="top">Date of Birth:</td> <td width="445" align="left" height="30" style="padding-left:10px; padding-top:10px"><?php echo input_date_tag('dob', '', array('style' => 'width:100px', 'year_start' => '1910', 'year_end' => '2020', 'use_short_month' => 'true')); ?> </td> </tr> <tr> <td width="155" align="left" height="30" style="padding-left:10px; padding-top:10px" valign="top">Gender:</td> <td width="445" align="left" height="30" style="padding-left:10px; padding-top:10px"> <?php echo radiobutton_tag('gender[]', 'Male', true, array('class' => 'checkbox')); ?> Male <?php echo radiobutton_tag('gender[]', 'Female', false, array('class' => 'checkbox')); ?> Female
} ?> > <td class='filter'><?php echo submit_image_tag('/images/magnifier.png', array('class' => 'sort', 'onclick' => "blur();")); ?> </td> <td class='filter_first'> <?php echo input_tag('filters[MEETING_POINT]', isset($filters['MEETING_POINT']) ? $filters['MEETING_POINT'] : null, array('size' => 5)); ?> </td> <td class='filter'> <?php echo input_date_tag('filters[DATE]', isset($filters['DATE']) ? $filters['DATE'] : null, array('rich' => true, 'calendar_button_img' => '/images/calendar.gif')); ?> </td> <td class='filter'><?php echo input_tag('filters[DETAIL]', isset($filters['DETAIL']) ? $filters['DETAIL'] : null, array('size' => 20)); ?> </td> <td class='filter'> <?php echo select_tag('filters[STATUS]', options_for_select(array(ClassAgenda::FINISH => __('Tuntas'), ClassAgenda::UNFINISH => __('Tidak Tuntas')), isset($filters['STATUS']) ? $filters['STATUS'] : null, array('include_blank' => true))); ?> </td> <td class="filter" colspan="2"> </td> </tr>
echo form_error('last_name'); ?> </div> <div class="row"> <?php echo label_for('gender', __('Gender')); ?> <?php echo select_tag('gender', options_for_select(array(null, 'M' => __('Male'), 'F' => __('Female')), $sf_params->get('gender'))); ?> <?php echo form_error('gender'); ?> </div> <div class="row"> <?php echo label_for('birthday', __('Birthday')); ?> <?php echo input_date_tag('birthday', $sf_params->get('birthday'), 'rich=true class=date calendar_button_img=date.png'); ?> <?php echo form_error('birthday'); ?> </div> <div class="row right_col"> <?php echo submit_tag(__('Save')); ?> </div> </form>
function input_fecha_tag($name, $fecha = null, $options = array()) { use_helper('DateForm'); $mi_fecha = !$fecha || $fecha == '' ? 'now' : $fecha; $value = ""; $value .= input_date_tag($name . '[date]', $mi_fecha, array('rich' => true, 'calendar_button_img' => '/images/icons/date.png')); return $value; }
?> form-error<?php } ?> "> <?php if ($sf_request->hasError('parametro{fecha}')) { ?> <?php echo form_error('parametro{fecha}', array('class' => 'form-error-msg')); ?> <?php } ?> <?php $value = input_date_tag('parametro[fecha]', $parametro->getFecha(), array('rich' => true)); echo $value ? $value : ' '; ?> </div> </div> <?php } ?> <?php // ###### CADENA ######################################################### if ($parametro_def->getCampoCadena() != "") { ?> <div class="form-row"> <?php echo label_for('parametro[cadena]', $parametro_def->getCampoCadena(), 'class="" ');
<div class="box_title"> <h2><span class="dark_blue">List of Previous Reports</span></h2> </div> <div class="box_text_content"> <div class="box_text"> <table class="form" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr height="30"> <td colspan="4" valign="top"> <h2>Please Select a "Visit Date" to search.</h2> </tr> <tr height="30"> <td width="14%">Visit Date:</td> <td width="86%"> <?php echo input_date_tag('visit_date', '', 'rich=true, size=20'); ?> </td> </tr> <tr height="50"> <td> </td> <td colspan="2" valign="top"> <table width="100%" align="left" border="0" class="form"> <tr> <td width="2%"><?php echo submit_tag(' ', array('class' => 'btn_view', 'style' => 'border:none')); ?> </td> <td width="96%"> </td>
echo form_error('guardian_name'); ?> </td> </tr> <tr> <td><label class="applicant"><?php echo __('Tempat, Tanggal Lahir'); ?> </label></td><td>:</td> <td> <?php echo object_input_tag($guardian, 'getPob', array('size' => 10, 'maxlength' => 15, 'id' => 'guardian_pob', 'name' => 'guardian_pob')); ?> , <?php echo input_date_tag('guardian_dob', $guardian->getDob() ? $guardian->getDob("Y-m-d") : NULL, 'rich=true class=normaldate withtime=true culture=fr_FR format=dd-MM-Y', array('calendar_button_img' => '/images/calendar.gif', 'id' => 'guardian_dob', 'name' => 'guardian_dob')); ?> <br /><?php echo form_error('guardian_pob'); echo form_error('guardian_dob'); ?> </td> </tr> <tr> <td><label class="applicant"><?php echo __('Pekerjaan'); ?> </label></td><td>:</td> <td> <?php echo object_input_tag($guardian, 'getJob', array('size' => 40, 'maxlength' => 255, 'id' => 'guardian_job', 'name' => 'guardian_job'));
function panel_date($name, $input = null, $options = array(), $methode = null) { $out = get_field_wrapper($options, $name); if ($err = sfContext::getInstance()->getRequest()->getError($name)) { $options['class'] .= " error"; } $code = input_date_tag($name, get_val($input, $methode, $name), clear_options($options)); return str_replace('##code##', $code, $out); }
<?php echo radiobutton_tag('evento[recurrencia_fin_tipo][]', '1', $recurrencia_fin_1, array('disabled' => !$activar_repeticion, 'onClick' => 'javascript:HabilitaDeshabilitaRangoFrecuencia(\'evento_recurrencia_fin_repeticion\')')); ?> Terminar después de <?php echo input_tag('evento[recurrencia_fin_repeticion]', $recurrencia_fin_repeticion, array('disabled' => !$activar_repeticion, 'maxlength' => 4, 'size' => 4)); ?> veces.<br> <?php echo radiobutton_tag('evento[recurrencia_fin_tipo][]', '2', $recurrencia_fin_2, array('disabled' => !$activar_repeticion, 'onClick' => 'javascript:HabilitaDeshabilitaRangoFrecuencia(\'evento_recurrencia_fin_fecha\')')); ?> Terminar el: <?php echo input_date_tag('evento[recurrencia_fin_fecha]', $recurrencia_fin_fecha, array('rich' => true, 'calendar_button_img' => sfConfig::get('sf_admin_web_dir') . '/images/date.png', 'control_name' => 'evento[recurrencia_fin_fecha]', 'disabled' => !$activar_repeticion)); ?> <br> </div> <?php echo object_input_hidden_tag($evento, 'getId', array('control_name' => 'id_evento')); ?> </fieldset> <!-- <ul class="sf_admin_actions"> <li><?php echo submit_tag(__('Grabar'), array('name' => 'Grabar', 'class' => 'sf_admin_action_save')); ?>
<?php $i++; } ?> <tr class="sf_admin_row_0"> <td><?php echo input_tag("periodo[{$i}][descripcion]", ''); ?> </td> <td><?php echo input_date_tag("periodo[{$i}][fecha_inicio]", '', "rich=true calendar_button_img=/sf/sf_admin/images/date.png"); ?> </td> <td><?php echo input_date_tag("periodo[{$i}][fecha_fin]", '', "rich=true calendar_button_img=/sf/sf_admin/images/date.png"); ?> </td> <td><?php echo checkbox_tag("periodo[{$i}][calcular]", '1', false); ?> </td> <td><?php echo input_tag("periodo[{$i}][formula]", ''); ?> </td> <td></td> </tr> </tbody> <tfoot>
public function printParam($mandatory, $lable, $param_name, $input_type, $original_extra_params = NULL, $extra_params_for_select = NULL, $should_echo = NULL) { if ($should_echo == NULL) { $should_echo = $this->m_should_echo; } $res = ""; if ($this->m_object_type === self::OBJECT_TYPE_MY_BASE_OBJECT) { $p = $this->m_current_object->getParamFromObject($param_name); } else { if ($this->m_object_type === self::OBJECT_TYPE_ORM_BASE_OBJECT) { $p = baseObjectUtils::getParamFromObject($this->m_current_object, $param_name); } } // use this so the style=font-size:8pt will always be appended to the original_extra_params $extra_params = array(); //["style"] = "font-size:8pt"; kArray::associativePush($extra_params, $original_extra_params); if (kString::isEmpty($this->m_current_prefix)) { $field_name = $param_name; } else { $field_name = $this->m_current_prefix . self::PREFIX_NAME_SEPARATOR . $param_name; } $error = form_error($param_name); if ($this->m_create_tr) { if ($error) { $res .= "<tr><td colspan=2>" . $error . "</td></tr>"; } if ($input_type == "hidden") { $res .= "<tr><td></td>"; } else { $res .= " <tr><td valign=top><label for=\"" . $field_name . "\">" . ($mandatory ? "*" : "") . $lable . ":</label></td>"; } $res .= "<td sytle='font-size:8pt'>"; } else { // do nothing - the format will be done externally } if ($input_type == "text") { $res .= input_tag($field_name, $p, $extra_params); } elseif ($input_type == "hidden") { $res .= input_hidden_tag($field_name, $p, $extra_params); } elseif ($input_type == "textarea") { $res .= textarea_tag($field_name, $p, $extra_params); } elseif ($input_type == "upload") { $res .= self::createUploadStructure($field_name, $p, NULL, $extra_params, NULL, $should_echo); /* echo tag('input', array_merge(array('name' => $field_name, 'value' => $p , 'id' => $field_name, 'READONLY' => '', 'oncomplete' => 'onComplete_'.str_replace('.', '_', $field_name).'()'), $extra_params)); echo tag('input', array_merge(array('type' => 'button', 'value' => 'MyBrowse...', 'onclick' => 'uploadBrowse(this)', 'uploadElement' => "$field_name"), $extra_params)); echo tag('input', array_merge(array('type' => 'button', 'value' => 'Clear', 'onclick' => 'javascript:{$(\''.$field_name.'\').value = \'\';}'), $extra_params)); if ( ! kString::isEmpty ( $p ) ) { echo "<img src='/images/file_exists.png' width='16' height='16'>"; } */ } elseif ($input_type == "file") { $res .= input_file_tag($field_name, $p, $extra_params); } elseif ($input_type == "date") { $extra_params["rich"] = "true"; $extra_params["style"] = "width:80"; kArray::associativePush($extra_params, $original_extra_params); // TODO - see how to format the date there and back from the DB format "dd/mm/yyyy" to " $converted_date = dateUtils::convertFromPhpDate($p); // always append the default "rich=true" to the extra_params //$extra_params[] = 'rich=true' ; $res .= input_date_tag($field_name, $converted_date, $extra_params); } elseif ($input_type == "select") { $more_extra_params = array("style" => "font-size:8pt"); kArray::associativePush($more_extra_params, $extra_params_for_select); $res .= select_tag($field_name, options_for_select($original_extra_params, $p), $more_extra_params); } elseif ($input_type == "radio") { // assume the $lable holda the value of the radio $res .= radiobutton_tag($field_name, $lable, $p == $lable); } elseif ($input_type == "radiogroup") { // assume the $extra_params hold a lable-value array foreach ($extra_params as $lable => $name) { $value = $extra_params[$lable]; $res .= $lable . " " . radiobutton_tag($field_name, $value, $p == $value); } } elseif ($input_type == "checkbox") { $res .= checkbox_tag($field_name, "true", $p == "true", $extra_params); } elseif ($input_type == "color") { die("color is no longer supported !"); // $res .= myColorPicker::getPickerHtml( $p , $field_name ); // TODO - pass on $extra_params ? } elseif ($input_type == "country") { $more_extra_params = array("style" => "font-size:8pt"); kArray::associativePush($more_extra_params, $extra_params_for_select); $res .= select_country_tag($field_name, $p, $more_extra_params); } elseif ($input_type == "language") { $more_extra_params = array("style" => "font-size:8pt"); kArray::associativePush($more_extra_params, $extra_params_for_select); $res .= select_language_tag($field_name, $p, $more_extra_params); } else { throw new Exception("Unknown input_type [" . $input_type . "]"); } if ($this->m_create_tr) { $res .= "</td></tr>\n"; } if ($should_echo) { echo $res; } else { return $res; } }
break; case 6: $fecha = new Date(); $fecha->setFirstDayOfYear(); $valor_fecha = $fecha->getTimestamp(); break; case 7: $fecha = new Date(); $fecha->setLastDayOfYear(); $valor_fecha = $fecha->getTimestamp(); break; } } else { $valor_fecha = $valor->getFecha(); } $value .= input_date_tag($control_name, $valor_fecha, array('control_name' => $control_name, 'rich' => true, 'calendar_button_img' => '/images/icons/date.png')); if ($campo->getMostrarEnPadre()) { use_helper('Javascript'); if ($valor == null) { $valor_sino = false; } else { $valor_sino = $valor->getSiNo(); } $value .= " " . __("Configurar alarma") . ": " . checkbox_tag($campo_name . '[tiene_alarma]', '', $valor_sino, array('control_name' => $campo_name . '[tiene_alarma]', 'onclick' => 'if (this.checked) document.getElementById(\'capa_campo_' . $campo->getIdCampo() . '\').style.display = \'block\'; else document.getElementById(\'capa_campo_' . $campo->getIdCampo() . '\').style.display = \'none\';')); if (!$valor_sino) { $txt_vis = "style=\"display:none;\""; } else { $txt_vis = ""; } $valores = explode("##", $valor ? $valor->getTextoCorto() : ""); //for ($i = 1; $i <= 5 ; $i++){
<tr> <td> <table class="innerlayout"> <tr> <td width="50%">First Offered On</td> <td>Last Offered On</td> </tr> <tr> <td> <?php echo input_date_tag('txtFirstOffered', '', array("rich" => true, "calendar_button_img" => "/images/calendar.gif", "class" => "date")); ?> </td> <td> <?php echo input_date_tag('txtLastOffered', '', array("rich" => true, "calendar_button_img" => "/images/calendar.gif", "class" => "date")); ?> </td> </tr> </table> </td> </tr> </table> </div> </td> </tr> </table> </td> </tr> </table> <?php
<tr> <td style="text-align: center;"><?php echo $i . '.'; ?> </td> <td><?php echo input_tag('child' . $i . '_name', '', array('size' => 40, 'maxlength' => 255)); ?> </td> <td> <?php echo input_tag('pob' . $i, '', array('size' => 10)); ?> , <?php echo input_date_tag('pob' . $i, '', array('rich' => true, 'calendar_button_img' => '/images/calendar.gif')); ?> </td> <td> <?php echo select_tag('relation' . $i, options_for_select(array(EmployeeChilds::RELATION_SON1 => __('RELATION_SON1'), EmployeeChilds::RELATION_SON2 => __('RELATION_SON2'), EmployeeChilds::RELATION_SON3 => __('RELATION_SON3'), EmployeeChilds::RELATION_SON4 => __('RELATION_SON4'), EmployeeChilds::RELATION_SON5 => __('RELATION_SON5')), null, array('include_blank' => true))); ?> </td> <td> <?php echo select_tag('sex' . $i, options_for_select(array('L' => __('Laki-laki'), 'P' => __('Perempuan')), null, array('include_blank' => true))); ?> </td> </tr> <?php }
<td><?php echo object_select_tag('', '', array('name' => 'ward_doc_id', 'id' => 'ward_doc_id', 'related_class' => 'Employee', 'peer_method' => 'GetDoctor', 'include_custom' => 'None')); ?> </td> <td>Ward Bed:</td> <td><?php echo object_select_tag('', '', array('name' => 'ward_bed_id', 'id' => 'ward_bed_id', 'related_class' => 'WardBed', 'peer_method' => 'GetWardBed', 'include_custom' => 'None')); ?> </td> </tr> <tr height="40"> <td>Admission Date:</td> <td><?php echo input_date_tag('admit_date', date('Y-m-d'), 'rich=true, size=20'); ?> </td> <td>Room:</td> <td><?php echo object_select_tag('', '', array('name' => 'room_id', 'id' => 'room_id', 'related_class' => 'Room', 'peer_method' => 'GetRoom', 'include_custom' => 'None')); ?> </td> </tr> <tr> <td> </td> <td colspan="2"> <table width="100%" align="left" border="0"> <tr>
<?php echo input_date_tag($form2->getName() . "[" . $form2['first_offered']->getName() . "]", $form2['first_offered']->getValue(), array("rich" => true, "calendar_button_img" => "/skule_images/calendar.gif", "class" => "date")); ?> </td> </tr> <tr> <td></td><td class="error"><?php echo $form2['first_offered']->renderError(); ?> </td> </tr> <tr> <th>Date Last Offered</th> <td> <?php echo input_date_tag($form2->getName() . "[" . $form2['last_offered']->getName() . "]", $form2['last_offered']->getValue(), array("rich" => true, "calendar_button_img" => "/skule_images/calendar.gif", "class" => "date")); ?> </td> </tr> <tr> <td></td><td class="error"><?php echo $form2['last_offered']->renderError(); ?> </td> </tr> </table> </fieldset> <script type="text/javascript"> toggleDetails(); var descr = Base64.decode(document.getElementsByName('<?php
</label><br/> <?php echo object_select_tag($payment_applicant, 'getPaymentModelId', array('related_class' => 'PaymentModel', 'include_blank' => true, 'peer_method' => 'doSelectOrdered')); ?> <?php echo form_error('payment_model_id'); ?> <div class="tips" style="color: #F00;"><?php echo __('Harap Pastikan Model Pembayaran dan Tanggal Pembayaran sesuai dengan data yang diterima.'); ?> </div> </td> </tr> <tr> <td> <label><?php echo __('Tanggal Pembayaran'); ?> </label><br/> <?php echo input_date_tag('paid_at', $payment_applicant->getPaidAt() ? $payment_applicant->getPaidAt("Y-m-d") : NULL, 'rich=true class=normaldate withtime=true culture=fr_FR format=dd-MM-Y', array('calendar_button_img' => '/images/calendar.jpg')); ?> </td> </tr> </tbody> </table> </td></tr> </table> </form>
</td> </tr> <tr> <td> <div class="form-row"> <label for="title">Bike:</label> <?php echo select_tag('user_bike_id', objects_for_select(UserBikesPeer::getUserBikesWithAll(), 'getUserBikeId', 'getBikeMake', $bike), array('style' => 'width:150px')); ?> </div> </td> <td> <div class="form-row"> <label for="title">To Date:</label> <?php echo input_date_tag('to_date', 'now', 'rich=true'); ?> </div> </td> </tr> <tr> <td> <div class="form-row"> <label for="title">Route:</label> <?php echo select_tag('user_ride_id', objects_for_select(UserRidesPeer::getUserRidesWithAll(), 'getUserRideId', 'getDescription', $route), array('style' => 'width:150px')); ?> </div> </td> <td> <div class="form-row">
<script type="text/javascript"> var cnic = new LiveValidation('cnic', { validMessage: "<?php echo Constant::VALIDATION_SUCCESS; ?> "}); cnic.add( Validate.Format, { pattern: /^[\d\-]*$/,failureMessage: "<?php echo Constant::VALIDATION_INTEGER_FIELD; ?> "} ); </script></td> </tr> <tr height="30"> <td>Date of Birth:</td> <td><?php echo input_date_tag('dob', $patient->getDob(), 'rich=true'); ?> </td> <td>Gender:</td> <td> <?php if ($patient->getGender() == 'Female') { echo radiobutton_tag('gender[]', 'Female', true) . 'Female '; echo radiobutton_tag('gender[]', 'Male', false) . 'Male'; } else { if ($patient->getGender() == Constant::BOOLEAN_WORD_NO) { echo radiobutton_tag('gender[]', 'Female', false) . 'Female '; echo radiobutton_tag('gender[]', 'Male', true) . 'Male'; } }
echo input_tag('year', $student_leave->getYear() ? $student_leave->getYear() : date('Y'), array('size' => 5, 'maxlength' => 4)); ?> <br> <?php echo form_error('year'); ?> </td> </tr> <tr> <td><label class="applicant"><?php echo __('Tanggal'); ?> </label></td><td>:</td> <td> <?php echo input_date_tag('end_date', $student_leave->getEndDate() ? $student_leave->getEndDate("Y-m-d") : NULL, 'rich=true class=normaldate withtime=true culture=fr_FR format=dd-MM-Y', array('calendar_button_img' => '/images/calendar.gif')); ?> <br /> <?php echo form_error('end_date'); ?> <div class="tips"><?php echo __('Tanggal Pindah / Lulus'); ?> </div> </td> </tr> <tr> <td><label class="applicant"><?php echo __('Alasan'); ?>
<fieldset> <div class="form-row"> <label for="title">Ride Date:</label> <?php if ($ride_date) { $curDate = $ride_date; } else { $curDate = 'now'; } echo input_date_tag('ride_date', $curDate, 'rich=false'); ?> </div> <div class="form-row"> <label for="title">Bike:</label> <?php echo select_tag('user_bike_id', objects_for_select(UserBikesPeer::getUserBikes(), 'getUserBikeId', 'getBikeMake', $bike), array('style' => 'width:150px')); ?> </div> <div class="form-row"> <label for="title">Route:</label> <?php echo select_tag('user_ride_id', objects_for_select(UserRidesPeer::getUserRides(), 'getUserRideId', 'getDescription', $route), array('style' => 'width:150px')); ?> </div> <div class="form-row"> <label for="make">Ride Time(minutes):</label> <?php
/** * Returns two XHTML compliant <input> tags to be used as a free-text date fields for a date range. * * Built on the input_date_tag, the input_date_range_tag combines two input tags that allow the user * to specify a from and to date. * You can easily implement a JavaScript calendar by enabling the 'rich' option in the * <i>$options</i> parameter. This includes a button next to the field that when clicked, * will open an inline JavaScript calendar. When a date is selected, it will automatically * populate the <input> tag with the proper date, formatted to the user's culture setting. * * <b>Note:</b> The <i>$name</i> parameter will automatically converted to array names. * For example, a <i>$name</i> of "date" becomes date[from] and date[to] * * <b>Options:</b> * - rich - If set to true, includes an inline JavaScript calendar can auto-populate the date field with the chosen date * - before - string to be displayed before the input_date_range_tag * - middle - string to be displayed between the from and to tags * - after - string to be displayed after the input_date_range_tag * * <b>Examples:</b> * <code> * $date = array('from' => '2006-05-15', 'to' => '2006-06-15'); * echo input_date_range_tag('date', $date, array('rich' => true)); * </code> * * <code> * echo input_date_range_tag('date', null, array('middle' => ' through ', 'rich' => true)); * </code> * * @param string field name * @param array dates: $value['from'] and $value['to'] * @param array additional HTML compliant <input> tag parameters * @return string XHTML compliant <input> tag with optional JS calendar integration * @see input_date_tag */ function input_date_range_tag($name, $value, $options = array()) { $options = _parse_attributes($options); $before = _get_option($options, 'before', ''); $middle = _get_option($options, 'middle', ''); $after = _get_option($options, 'after', ''); return $before . input_date_tag($name . '[from]', $value['from'], $options) . $middle . input_date_tag($name . '[to]', $value['to'], $options) . $after; }
function frontend_date($name, $input = null, $options = array(), $methode = null) { $context = sfContext::getInstance(); $request = $context->getRequest(); $errors = $request->getErrors(); if (array_key_exists("err" . $name, $errors)) { $options["class"] .= " error"; } $errSpan = ""; $code = getDivLabel($options, $name); if (in_array('validate', $options)) { $errSpan = "<span id='" . $name . "Error'></span>"; } $code .= input_date_tag($name, getVal($input, $methode, $name), clearOptions($options)); $code .= $errSpan; return $code; }
</div> </td> </tr> <tr> <td style="vertical-align:middle;"><label class="applicant"><?php echo __('Tempat, Tgl Lahir'); ?> *</label></td> <td style="text-align:center; vertical-align:middle;">:</td> <td style="vertical-align:middle;"> <?php echo object_input_tag($ng_test_applicant, 'getPob', array('size' => 10, 'maxlength' => 15)); ?> , <?php echo input_date_tag('dob', $ng_test_applicant->getDob() ? $ng_test_applicant->getDob("Y-m-d") : NULL, 'rich=true class=normaldate withtime=true culture=fr_FR format=dd-MM-Y', array('calendar_button_img' => '/images/calendar.jpg')); ?> <br /><?php echo form_error('pob'); echo form_error('dob'); ?> </td> </tr> <tr> <td style="vertical-align:middle;"><label class="applicant"><?php echo __('Asal Sekolah'); ?> *</label></td> <td style="text-align:center; vertical-align:middle;">:</td> <td style="vertical-align:middle;">
function backend_date($name, $input = null, $options = array(), $methode = null) { $code = getDivLabel($options, $name); if ($options['validate']) { $errSpan = "<span id='" . $name . "Error'></span>"; } $code .= input_date_tag($name, getVal($input, $methode, $name), clearOptions($options)); $code .= $errSpan; return $code; }
echo input_tag('task_name', 'Task Name'); ?> <?php echo textarea_tag('task_description', 'Task Description', array('rows' => '3')); ?> <?php echo textarea_tag('task_tags', '', array('rows' => '3')); ?> </div> <div id="task-dates" class="float-right" style="text-align:right;"> <label for="task_begin">Task Starts: <?php echo input_date_tag('task_begin', '', array('rich' => 'true')); ?> </label><br /> <label for="task_finish">Task Due: <?php echo input_date_tag('task_finish', '', array('rich' => 'true')); ?> <br /> <?php echo submit_tag('Add Task'); ?> </div> <div style="height:20px"> <p id="indicator" style="display:none"> <?php echo image_tag('indicator.gif'); ?> adding task... </p> </div> </form>
</td> <td class='filter'><?php echo object_select_tag(isset($filters['DEPARTMENT_MEMBER_ID']) ? $filters['DEPARTMENT_MEMBER_ID'] : null, null, array('include_blank' => true, 'related_class' => 'Department', 'text_method' => '__toString', 'peer_method' => 'doSelectFiltered', 'control_name' => 'filters[DEPARTMENT_MEMBER_ID]', 'style' => 'width: 100px;')); ?> </td> <td class='filter'> <?php echo object_select_tag(isset($filters['DEPARTMENT_ID']) ? $filters['DEPARTMENT_ID'] : null, null, array('include_blank' => true, 'related_class' => 'Department', 'text_method' => '__toString', 'peer_method' => 'doSelectFiltered', 'control_name' => 'filters[DEPARTMENT_ID]')); ?> </td> <td class='filter'><?php echo input_date_tag('filters[TIME_IN]', isset($filters['TIME_IN']) ? $filters['TIME_IN'] : null, array('rich' => true, 'calendar_button_img' => '/images/calendar.gif', 'format' => 'dd-MM-Y')); ?> </td> <td class='filter'><?php echo input_date_tag('filters[TIME_OUT]', isset($filters['TIME_OUT']) ? $filters['TIME_OUT'] : null, array('rich' => true, 'calendar_button_img' => '/images/calendar.gif', 'format' => 'dd-MM-Y')); ?> </td> <td class='filter'> </td> </tr> </thead> <tbody> <?php if ($pager->getNbResults() < 1) { ?> <tr class="list"><td colspan="100"><div class="no_record"><?php echo __('No record found'); ?> </div></td></tr> <?php } else {