本文整理汇总了PHP中pick_date_widget2函数的典型用法代码示例。如果您正苦于以下问题:PHP pick_date_widget2函数的具体用法?PHP pick_date_widget2怎么用?PHP pick_date_widget2使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pick_date_widget2函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$listeners = array('on_selection_change' => 'og.reload_milestone_form_selectors()');
if ($milestone->isNew()) {
render_member_selectors($milestone->manager()->getObjectTypeId(), $genid, null, array('select_current_context' => true, 'listeners' => $listeners), null, null, false);
} else {
render_member_selectors($milestone->manager()->getObjectTypeId(), $genid, $milestone->getMemberIds(), array('listeners' => $listeners), null, null, false);
}
?>
<div class="clear"></div>
</div>
<div class="dataBlock">
<?php
echo label_tag(lang('due date'));
?>
<?php
echo pick_date_widget2('milestone[due_date_value]', array_var($milestone_data, 'due_date'), $genid, 90);
?>
</div>
<div id="<?php
echo $genid;
?>
add_milestone_description_div" class="dataBlock">
<label><?php
echo lang("description");
?>
:</label>
<?php
echo textarea_field('milestone[description]', array_var($milestone_data, 'description'), array('class' => 'long', 'id' => $genid . 'milestoneFormDesc', 'tabindex' => '20'));
?>
</div>
示例2: pick_date_widget2
?>
<option value="<?php
echo $value['id'];
?>
"><?php
echo $value['name'];
?>
</option>
<?php
}
?>
</select>
<?php
} else {
if ($col_type == DATA_TYPE_DATE || $col_type == DATA_TYPE_DATETIME) {
echo pick_date_widget2("params[" . $condition->getId() . "]");
} else {
?>
<input type="text" id="<?php
echo $condId;
?>
" name="params[<?php
echo $condition->getId();
?>
]" />
<?php
}
}
?>
</td>
<?php
示例3: array_var
$style = "";
$st = DateTimeValueLib::dateFromFormatAndString(user_config_option('date_format'), array_var($report_data, 'start_value'));
$et = DateTimeValueLib::dateFromFormatAndString(user_config_option('date_format'), array_var($report_data, 'end_value'));
} else {
$style = 'display:none;';
$st = DateTimeValueLib::now();
$et = $st;
}
?>
<tr class="dateTr" style="<?php echo $style ?>">
<td><span class="bold"><?php echo lang("start date") ?>: </span></td>
<td align='left'><?php echo pick_date_widget2('report[start_value]', $st, $genid);?></td>
</tr>
<tr class="dateTr" style="<?php echo $style ?>">
<td style="padding-bottom:18px"><span class="bold"><?php echo lang("end date") ?>: </span></td>
<td align='left'><?php echo pick_date_widget2('report[end_value]', $et, $genid);?></td>
</tr>
<tr style='height:30px;'>
<td><span class="bold"><?php echo lang("timeslots") ?>: </span></td>
<td align='left'><?php
echo select_box('report[timeslot_type]', array(
option_tag(lang('task timeslots'), 0, array_var($report_data, "timeslot_type") == '0' ? array('selected' => 'selected') : null),
option_tag(lang('time timeslots'), 1, array_var($report_data, "timeslot_type") == '1' ? array('selected' => 'selected') : null),
option_tag(lang('all timeslots'), 2, array_var($report_data, "timeslot_type") == '2' ? array('selected' => 'selected') : null)
), array('onchange' => 'og.timeslotTypeSelectChange(this, \'' . $genid . '\')'));
?>
<span id="<?php echo $genid?>task_ts_desc" class="desc" style="display:<?php echo array_var($report_data, "timeslot_type") == '0' ? '' : 'none'?>"><?php echo lang('task timeslots report desc')?></span>
<span id="<?php echo $genid?>general_ts_desc" class="desc" style="display:<?php echo array_var($report_data, "timeslot_type") == '1' ? '' : 'none'?>"><?php echo lang('general timeslots report desc')?></span>
</td>
</tr>
<tr style='height:30px;'>
示例4: lang
<table><tr style="padding-bottom:4px;">
<td align="right" style="padding-right:10px;padding-bottom:6px;padding-top:2px"><?php
echo lang('from date');
?>
</td>
<td><?php
echo pick_date_widget2('from_date', $from_date, $genid, 20);
?>
</td></tr>
<tr style="padding-bottom:4px;">
<td align="right" style="padding-right:10px;padding-bottom:6px;padding-top:2px"><?php
echo lang('to date');
?>
</td>
<td><?php
echo pick_date_widget2('to_date', $to_date, $genid, 30);
?>
</td></tr>
<tr style="padding-bottom:4px;">
<td align="right" style="padding-right:10px;padding-bottom:6px;padding-top:2px"><?php
echo lang('name');
?>
</td>
<td><?php
echo text_field('calendar_name', logged_user()->getObjectName(), array("style" => "width:120px;", 'tabindex' => '40'));
?>
</td><td><span class="desc"><?php
echo lang('calendar name desc');
?>
</span></td></tr>
</table>
示例5: foreach
}
echo '<table id="table' . $genid . $customProp->getId() . '">';
foreach ($fieldValues as $val) {
$value = DateTimeValueLib::dateFromFormatAndString("Y-m-d H:i:s", $val->getValue());
echo '<tr><td style="width:150px;">';
echo pick_date_widget2($name, $value, null, $startTi + $ti, null, $genid . 'cp' . $customProp->getId());
echo '</td><td>';
echo '<a href="#" class="link-ico ico-delete" onclick="og.removeCPDateValue(\'' . $genid . '\',' . $customProp->getId() . ',' . $count . ')"></a>';
echo '</td></tr>';
$count++;
}
echo '</table>';
echo ' <a href="#" class="link-ico ico-add" onclick="og.addCPDateValue(\'' . $genid . '\',' . $customProp->getId() . ')">' . lang('add value') . '</a><br/>';
} else {
$value = DateTimeValueLib::dateFromFormatAndString("Y-m-d H:i:s", $default_value);
echo pick_date_widget2($name, $value, null, $startTi + $ti, null, $genid . 'cp' . $customProp->getId());
}
break;
case 'list':
$options = array();
if (!$customProp->getIsRequired()) {
$options[] = '<option value=""></option>';
}
$totalOptions = 0;
$multValues = CustomPropertyValues::getCustomPropertyValues($_custom_properties_object->getId(), $customProp->getId());
$toSelect = array();
foreach ($multValues as $m) {
$toSelect[] = $m->getValue();
}
foreach (explode(',', $customProp->getValues()) as $value) {
$selected = $value == $default_value || ($customProp->getIsMultipleValues() && in_array($value, explode(',', $default_value)) || in_array($value, $toSelect));
示例6: lang
<td><b><?php
echo lang("start date");
?>
: </b></td>
<td align='left'><?php
echo pick_date_widget2('report[start]', DateTimeValueLib::now(), $genid);
?>
</td>
</tr>
<tr style='height:30px;'>
<td ><b><?php
echo lang("end date");
?>
: </b></td>
<td align='left'><?php
echo pick_date_widget2('report[end]', DateTimeValueLib::now(), $genid);
?>
</td>
</tr>
<tr style='height:30px;'>
<td><b><?php
echo lang("user");
?>
: </b></td>
<td align='left'><?php
$options = array();
$options[] = option_tag('-- ' . lang('anyone') . ' --', 0, array('selected' => 'selected'));
foreach ($users as $user) {
$options[] = option_tag($user->getObjectName(), $user->getId());
}
echo select_box('report[user]', $options);
示例7: pick_date_widget2
: </b></td>
<td align='left'><?php
echo pick_date_widget2('report[start_value]', $st, $genid);
?>
</td>
</tr>
<tr class="dateTr" style="<?php
echo $style;
?>
">
<td style="padding-bottom:18px"><b><?php
echo lang("end date");
?>
: </b></td>
<td align='left'><?php
echo pick_date_widget2('report[end_value]', $et, $genid);
?>
</td>
</tr>
<tr style='height:30px;'>
<td><b><?php
echo lang("timeslots");
?>
: </b></td>
<td align='left'><?php
echo select_box('report[timeslot_type]', array(option_tag(lang('task timeslots'), 0, array_var($report_data, "timeslot_type") == 0 ? array('selected' => 'selected') : null), option_tag(lang('time timeslots'), 1, array_var($report_data, "timeslot_type") == 1 ? array('selected' => 'selected') : null), option_tag(lang('all timeslots'), 2, array_var($report_data, "timeslot_type") == 2 ? array('selected' => 'selected') : null)), array('onchange' => 'og.timeslotTypeSelectChange(this, \'' . $genid . '\')'));
?>
</td>
</tr>
<tr style='height:30px;'>
<td><b><?php
示例8: text_field
<td><?php
echo text_field('contact[o_phone_number2]', array_var($contact_data, 'o_phone_number2'), array('id' => $genid . 'profileFormOPhoneNumber2', 'tabindex' => '255', 'maxlength' => 50));
?>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td><br />
<div><?php
echo label_tag(lang('birthday'), $genid . 'profileFormBirthday');
?>
<?php
echo pick_date_widget2('contact[birthday]', array_var($contact_data, 'birthday'), $genid, 265);
?>
</div>
</td>
</tr>
</table>
</fieldset>
</div>
<div id='<?php
echo $genid;
?>
add_custom_properties_div' style="<?php
echo $visible_cps > 0 ? "" : "display:none";
?>
">
示例9: radio_field
echo radio_field('event[repeat_option]', $rsel1, array('id' => $genid . 'repeat_opt_forever', 'value' => '1', 'onclick' => 'og.viewDays(false)')) . " " . lang('CAL_REPEAT_FOREVER');
?>
</td></tr>
<tr><td colspan="2" style="vertical-align:middle">
<?php
echo radio_field('event[repeat_option]', $rsel2, array('id' => $genid . 'repeat_opt_times', 'value' => '2', 'onclick' => 'og.viewDays(true)')) . " " . lang('CAL_REPEAT');
echo " " . text_field('event[repeat_num]', $rnum, array('size' => '3', 'id' => 'repeat_num', 'maxlength' => '3', 'style' => 'width:25px', 'onchange' => 'og.selectRepeatMode(2);')) . " " . lang('CAL_TIMES');
?>
</td></tr>
<tr><td style="vertical-align:middle">
<?php
echo radio_field('event[repeat_option]', $rsel3, array('id' => $genid . 'repeat_opt_until', 'value' => '3', 'onclick' => 'og.viewDays(false)')) . " " . lang('CAL_REPEAT_UNTIL');
?>
</td><td style="padding-left:8px;">
<?php
echo pick_date_widget2('event[repeat_end]', $rend, $genid, 95);
?>
</td></tr>
</table>
</div>
<div id="cal_extra3" style="width: 400px; align: center; text-align: left; <?php
echo $hide2;
?>
'">
<?php
echo lang('CAL_REPEAT') . " ";
$options = array(option_tag(lang('1st'), 1, array_var($event_data, 'repeat_wnum') == 1 ? array("selected" => "selected") : null), option_tag(lang('2nd'), 2, array_var($event_data, 'repeat_wnum') == 2 ? array("selected" => "selected") : null), option_tag(lang('3rd'), 3, array_var($event_data, 'repeat_wnum') == 3 ? array("selected" => "selected") : null), option_tag(lang('4th'), 4, array_var($event_data, 'repeat_wnum') == 4 ? array("selected" => "selected") : null));
echo select_box('event[repeat_wnum]', $options, array("id" => $genid . "event[repeat_wnum]", "onchange" => "og.updateEventStartDate();"));
$options = array(option_tag(lang('sunday'), 1, array_var($event_data, 'repeat_dow') == 1 ? array("selected" => "selected") : null), option_tag(lang('monday'), 2, array_var($event_data, 'repeat_dow') == 2 ? array("selected" => "selected") : null), option_tag(lang('tuesday'), 3, array_var($event_data, 'repeat_dow') == 3 ? array("selected" => "selected") : null), option_tag(lang('wednesday'), 4, array_var($event_data, 'repeat_dow') == 4 ? array("selected" => "selected") : null), option_tag(lang('thursday'), 5, array_var($event_data, 'repeat_dow') == 5 ? array("selected" => "selected") : null), option_tag(lang('friday'), 6, array_var($event_data, 'repeat_dow') == 6 ? array("selected" => "selected") : null), option_tag(lang('saturday'), 7, array_var($event_data, 'repeat_dow') == 7 ? array("selected" => "selected") : null));
echo select_box('event[repeat_dow]', $options, array("id" => $genid . "event[repeat_dow]", "onchange" => "og.updateEventStartDate();"));
echo " " . lang('every') . " ";
示例10: pick_time_widget2
if (config_option('use_time_in_task_dates')) {
?>
<div style="float:left;margin-left:10px;"><?php
echo pick_time_widget2('task_start_time', array_var($task_data, 'start_date'), $genid, 65);
?>
</div>
<?php
}
?>
</td></tr><tr><td style="padding-right: 10px">
<?php
echo label_tag(lang('due date'));
?>
</td><td>
<div style="float:left;"><?php
echo pick_date_widget2('task_due_date', array_var($task_data, 'due_date'), $genid, 70);
?>
</div>
<?php
if (config_option('use_time_in_task_dates')) {
?>
<div style="float:left;margin-left:10px;"><?php
echo pick_time_widget2('task_due_time', array_var($task_data, 'due_date'), $genid, 65);
?>
</div>
<?php
}
?>
</td></tr><tr><td style="padding-right: 10px">
<label><?php
echo lang('assign to');
示例11: if
<div class="coInputMainBlock adminMainBlock">
<?php if (!isset($result_msg)) { ?>
<span><b><?php echo lang('calendar will be exported in icalendar format') ?></b></span>
<?php
$from_date = DateTimeValueLib::now();
$from_date->add('M', -6);
$to_date = DateTimeValueLib::now();
$to_date->add('M', 6);
?>
<fieldset><legend><?php echo lang('range of events') ?></legend>
<table><tr style="padding-bottom:4px;">
<td align="right" style="padding-right:10px;padding-bottom:6px;padding-top:2px"><?php echo lang('from date') ?></td>
<td><?php echo pick_date_widget2('from_date', $from_date, $genid, 20); ?></td></tr>
<tr style="padding-bottom:4px;">
<td align="right" style="padding-right:10px;padding-bottom:6px;padding-top:2px"><?php echo lang('to date') ?></td>
<td><?php echo pick_date_widget2('to_date', $to_date, $genid, 30); ?></td></tr>
<tr style="padding-bottom:4px;">
<td align="right" style="padding-right:10px;padding-bottom:6px;padding-top:2px"><?php echo lang('name') ?></td>
<td><?php echo text_field('calendar_name', logged_user()->getObjectName(), array("style" => "width:120px;", 'tabindex' => '40')) ?></td><td><span class="desc"><?php echo lang('calendar name desc') ?></span></td></tr>
</table>
</fieldset>
<table style="width:535px">
<tr><td><?php echo button(lang('export'), 'e', array('style'=>'margin-top:0px;margin-left:10px', 'tabindex' => '50', 'id' => $genid.'cal_export_submit1', 'onclick'=>"og.submitCalendarExport();")) ?></td></tr></table>
</div>
<?php } else { ?>
<div><b><?php echo $result_msg ?></b></div>
<?php } ?>
</div>
</form>
<script>
示例12: radio_field
<?php
echo radio_field('task[repeat_option]', $rsel1, array('id' => $genid . 'repeat_opt_forever', 'value' => '1', 'style' => 'vertical-align:middle', 'onclick' => 'og.viewDays(true)')) . " " . lang('CAL_REPEAT_FOREVER');
?>
</td></tr>
<tr><td colspan="2" style="vertical-align:middle">
<?php
echo radio_field('task[repeat_option]', $rsel2, array('id' => $genid . 'repeat_opt_times', 'value' => '2', 'style' => 'vertical-align:middle', 'onclick' => 'og.viewDays(true)')) . " " . lang('CAL_REPEAT');
echo " " . text_field('task[repeat_num]', $rnum, array('size' => '3', 'id' => $genid . 'repeat_num', 'maxlength' => '3', 'style' => 'width:25px', 'onchange' => 'og.selectRepeatMode(2);')) . " " . lang('CAL_TIMES');
?>
</td></tr>
<tr><td style="vertical-align:middle"><?php
echo radio_field('task[repeat_option]', $rsel3, array('id' => $genid . 'repeat_opt_until', 'value' => '3', 'style' => 'vertical-align:middle', 'onclick' => 'og.viewDays(true)')) . " " . lang('CAL_REPEAT_UNTIL');
?>
</td>
<td style="padding-left:8px;"><?php
echo pick_date_widget2('task[repeat_end]', $rend, $genid, 99);
?>
</td></tr>
</table>
<script type="text/javascript">
var els = document.getElementsByName('task[repeat_end]');
for (i=0; i<els.length; i++) {
els[i].onchange = function() {
og.selectRepeatMode(3);
}
}
</script>
<div style="padding-top: 4px;">
<?php
echo lang('repeat by') . ' ';
?>
示例13: foreach
<?php $counter = 0; ?>
<?php foreach ($events as $event) { ?>
<?php $counter++; ?>
<tr class="cronEventsRow <?php echo $counter % 2 ? 'even' : 'odd' ?>">
<td class="cronEventsName">
<label><?php echo $event->getDisplayName() ?>:</label>
<?php if (trim($event_description = $event->getDisplayDescription())) { ?>
<div class="desc"><?php echo clean($event_description) ?></div>
<?php } // if ?>
</td>
<td class="cronEventsDate">
<?php if ($event->getDate() instanceof DateTimeValue)
$date = new DateTimeValue($event->getDate()->getTimestamp() + logged_user()->getTimezone() * 3600);
else $date = null;
?>
<table><tbody><tr><td><?php echo pick_date_widget2('cron_events['.$event->getId().'][date]', $date, null, false) ?>
</td><td><?php echo pick_time_widget2('cron_events['.$event->getId().'][time]', $date) ?>
</td></tr></tbody></table>
</td>
<td class="cronEventsDelay">
<?php echo input_field('cron_events['.$event->getId().'][delay]', $event->getDelay(), array('class' => 'short')) ?>
<span class="desc"><?php echo lang('minutes') ?></span>
</td>
<td class="cronEventsEnabled">
<?php echo checkbox_field('cron_events['.$event->getId().'][enabled]', $event->getEnabled()) ?>
</td>
</tr>
<?php } // foreach ?>
</tbody></table>
示例14: lang
<label for="addTaskText<?php echo $task_list->getId() ?>"><?php echo lang('description') ?>:</label>
<?php echo textarea_field("task[text]", null, array('class' => 'short', 'id' => 'addTaskText' . $task_list->getId())) ?>
</div>
<div style="padding-top:4px">
<?php /*echo label_tag(lang('dates'))*/ ?>
<table><tbody><tr><td style="padding-right: 10px">
<?php echo label_tag(lang('start date')) ?>
</td><td>
<div style="float:left;"><?php echo pick_date_widget2('task_start_date', array_var($task_data, 'start_date'),$genid, 60) ?></div>
<?php if (config_option('use_time_in_task_dates')) { ?>
<div style="float:left;margin-left:10px;"><?php echo pick_time_widget2('task_start_time', array_var($task_data, 'start_date'), $genid, 65); ?></div>
<?php } ?>
</td></tr><tr><td style="padding-right: 10px">
<?php echo label_tag(lang('due date')) ?>
</td><td>
<div style="float:left;"><?php echo pick_date_widget2('task_due_date', array_var($task_data, 'due_date'),$genid, 70) ?></div>
<?php if (config_option('use_time_in_task_dates')) { ?>
<div style="float:left;margin-left:10px;"><?php echo pick_time_widget2('task_due_time', array_var($task_data, 'due_date'), $genid, 65); ?></div>
<?php } ?>
</td></tr><tr><td style="padding-right: 10px">
<label><?php echo lang('assign to') ?>:</label>
</td><td>
<div class="taskListAddTaskAssignedTo" style="margin-top:1px;">
<?php
echo assign_to_select_box('task[assigned_to_contact_id]', $task_list->getMembers(), $task_list->getAssignedToContactId());
?>
</div>
</td></tr></tbody></table>
</div>
<input type="hidden" id="addTaskMilestoneId<?php echo $task_list->getId() ?>" name="task[milestone_id]" value="<?php echo $task_list->getMilestoneId() ?>"/>
<input type="hidden" id="addTaskPriority<?php echo $task_list->getId() ?>" name="task[priority]" value="<?php echo $task_list->getPriority() ?>"/>
示例15: simple_select_box
?>
:</label>
<?php
echo simple_select_box('task[assigned_to_contact_id]', $users, null, array('class' => 'assigned-to'));
?>
</div>
<div class="field due">
<label><?php
echo lang('due date');
?>
:</label>
<?php
echo pick_date_widget2('task[task_due_date]', null, $genid, 70, false, $genid . 'due_date');
?>
</div>
<?php
if (config_option('use_time_in_task_dates')) {
?>
<div class="field due">
<label> </label>
<?php
echo pick_time_widget2('task[task_due_time]', null, $genid, 75);
?>
</div>
<?php
}
?>