$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>
                    ?>
							<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 
Ejemplo n.º 3
0
				$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") ?>:&nbsp;</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") ?>:&nbsp;</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") ?>:&nbsp;</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;'>
Ejemplo n.º 4
0
	<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>
Ejemplo n.º 5
0
         }
         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 '&nbsp;<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));
			<td><b><?php 
echo lang("start date");
?>
:&nbsp;</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");
?>
:&nbsp;</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");
?>
:&nbsp;</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);
Ejemplo n.º 7
0
:&nbsp;</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");
?>
:&nbsp;</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");
?>
:&nbsp;</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 
Ejemplo n.º 8
0
				<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";
?>
">
Ejemplo n.º 9
0
echo radio_field('event[repeat_option]', $rsel1, array('id' => $genid . 'repeat_opt_forever', 'value' => '1', 'onclick' => 'og.viewDays(false)')) . "&nbsp;" . 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)')) . "&nbsp;" . lang('CAL_REPEAT');
echo "&nbsp;" . text_field('event[repeat_num]', $rnum, array('size' => '3', 'id' => 'repeat_num', 'maxlength' => '3', 'style' => 'width:25px', 'onchange' => 'og.selectRepeatMode(2);')) . "&nbsp;" . 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)')) . "&nbsp;" . 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') . "&nbsp;";
$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 "&nbsp;" . lang('every') . "&nbsp;";
Ejemplo n.º 10
0
    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');
Ejemplo n.º 11
0
<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>
Ejemplo n.º 12
0
								<?php 
    echo radio_field('task[repeat_option]', $rsel1, array('id' => $genid . 'repeat_opt_forever', 'value' => '1', 'style' => 'vertical-align:middle', 'onclick' => 'og.viewDays(true)')) . "&nbsp;" . 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)')) . "&nbsp;" . lang('CAL_REPEAT');
    echo "&nbsp;" . text_field('task[repeat_num]', $rnum, array('size' => '3', 'id' => $genid . 'repeat_num', 'maxlength' => '3', 'style' => 'width:25px', 'onchange' => 'og.selectRepeatMode(2);')) . "&nbsp;" . 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)')) . "&nbsp;" . 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') . ' ';
    ?>
Ejemplo n.º 13
0
	<?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>
Ejemplo n.º 14
0
          <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() ?>"/>
Ejemplo n.º 15
0
    ?>
:</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>&nbsp;</label>
				<?php 
        echo pick_time_widget2('task[task_due_time]', null, $genid, 75);
        ?>
			</div>
			<?php 
    }
    ?>
 /**
 * Render form control
 *
 * @param string $control_name
 * @return string
 */
 function render($control_name) {
   return pick_date_widget2($control_name, $this->getValue());
 } // render
         $fieldValues = CustomPropertyValues::getCustomPropertyValues($_custom_properties_object->getId(), $customProp->getId());
         echo '<table id="table' . $genid . $customProp->getId() . '"><tbody>';
         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);
             echo '</td><td>';
             echo '<a href="#" class="link-ico ico-delete" onclick="og.removeCPDateValue(\'' . $genid . '\',' . $customProp->getId() . ',' . $count . ')"></a>';
             echo '</td></tr>';
             $count++;
         }
         echo '</tbody></table>';
         echo '&nbsp;<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);
     }
     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));
Ejemplo n.º 18
0
		<div class="coInputTitle"><?php echo lang('template parameters')?></div>
	</div>

</div>
<div class="coInputMainBlock">
	
	<div>
		<table><tbody>
		<?php foreach($parameters as $parameter) {?>
			<tr style='height:30px;'>
				<td style="padding:3px 10px 0 10px;"><b><?php echo $parameter['name']; ?></b></td>
				<td align="left">
					<?php if($parameter['type'] == 'string'){ ?>
						<input id="parameterValues[<?php echo $parameter['name'] ?>]" name="parameterValues[<?php echo $parameter['name'] ?>]" />
					<?php }else if($parameter['type'] == 'date'){ ?>
						<?php echo pick_date_widget2('parameterValues['.$parameter['name'].']')?>
					<?php }else{ ?>
						<select name="<?php echo 'parameterValues['.$parameter['name'].']'; ?>">
						<?php
							$companies  = allowed_users_to_assign(active_context());
							foreach ($companies as $c) {?>
								<option value="<?php echo $c['id']; ?>"> <?php echo $c['name']; ?></option>
							<?php 
								$users = $c['users'];
								if ( count($users) ) {
									foreach ($users as $usr) {?>																
										<option value="<?php echo $usr['id'] ?>"> <?php echo $usr['name'] ?></option>
										
								<?php }
								}
							}	
Ejemplo n.º 19
0
									if (btn) btn.dom.style.display = 'block';
								}else{
									if (btn) btn.dom.style.display = 'none';
								}
							}
						</script>
						<table>
							<tr><td colspan="2" style="vertical-align:middle; height: 22px;">
								<?php echo radio_field('task[repeat_option]', $rsel1, array('id' => $genid.'repeat_opt_forever','value' => '1', 'style' => 'vertical-align:middle', 'tabindex' => '95', 'onclick' => 'og.viewDays(false)')) ."&nbsp;". 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', 'tabindex' => '96', 'onclick' => 'og.viewDays(true)')) ."&nbsp;". lang('CAL_REPEAT');
								echo "&nbsp;" . text_field('task[repeat_num]', $rnum, array('size' => '3', 'id' => $genid.'repeat_num', 'maxlength' => '3', 'style'=>'width:25px', 'tabindex' => '97', 'onchange' => 'og.selectRepeatMode(2);')) ."&nbsp;". 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', 'tabindex' => '98', 'onclick' => 'og.viewDays(false)')) ."&nbsp;". 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') . ' ' ?>
							<select name="task[repeat_by]" tabindex="100">
								<option value="start_date" id="<?php echo $genid ?>rep_by_start_date"<?php if (array_var($task_data, 'repeat_by') == 'start_date') echo ' selected="selected"'?>><?php echo lang('field ProjectTasks start_date')?></option>
								<option value="due_date" id="<?php echo $genid ?>rep_by_due_date"<?php if (array_var($task_data, 'repeat_by') == 'due_date') echo ' selected="selected"'?>><?php echo lang('field ProjectTasks due_date')?></option>
Ejemplo n.º 20
0
<div>
<fieldset><legend><?php 
echo lang('CAL_TIME_AND_DURATION');
?>
</legend>
<table>
	<tr style="padding-bottom:4px">
		<td align="right" style="padding-right:10px;padding-bottom:6px;padding-top:2px"><?php 
echo lang('CAL_DATE');
?>
</td>
		<td align='left'><?php 
$dv_start = DateTimeValueLib::make(array_var($event_data, 'hour'), array_var($event_data, 'minute'), 0, $month, $day, $year);
$event->setStart($dv_start);
echo pick_date_widget2('event[start_value]', $event->getStart(), $genid, 120);
?>
		</td>
	</tr>

	<tr style="padding-bottom:4px">
		<td align="right" style="padding-right:10px;padding-bottom:6px;padding-top:2px">
			<?php 
echo lang('CAL_TIME');
?>
		</td>
		<td>
		<?php 
$hr = array_var($event_data, 'hour');
$minute = array_var($event_data, 'minute');
$is_pm = array_var($event_data, 'pm');
Ejemplo n.º 21
0
?>
			</select></td>
		</tr><tr><td>&nbsp;</td></tr>
		<tr>
			<td ><b><?php 
echo lang("end date");
?>
:&nbsp;</b></td>
			<td align='left'><?php 
if ($timeslot->getEndTime() == null) {
    $dt = DateTimeValueLib::now();
    $end_time = new DateTimeValue($dt->getTimestamp() + logged_user()->getTimezone() * 3600);
} else {
    $end_time = new DateTimeValue($timeslot->getEndTime()->getTimestamp() + logged_user()->getTimezone() * 3600);
}
echo pick_date_widget2('timeslot[end_value]', $end_time, $genid, 40);
?>
</td>
		</tr>
		
		<tr>
			<td><b><?php 
echo lang("end time");
?>
:&nbsp;</b></td>
			<td align='left'><select name="timeslot[end_hour]" size="1" tabindex="50">
			<?php 
for ($i = 0; $i < 24; $i++) {
    echo "<option value=\"{$i}\"";
    if ($end_time->getHour() == $i) {
        echo ' selected="selected"';
Ejemplo n.º 22
0
					</td>
					<td style="padding-right: 10px; width:140px;vertical-align:bottom">
						<?php echo label_tag(lang('hours')) ?>
					</td>
                                        <td style="padding-right: 10px; width:140px;vertical-align:bottom">
						<?php echo label_tag(lang('minutes')) ?>
					</td>
					<td style="padding-right: 10px; width:95%; margin-top: 0px;vertical-align:bottom">
						<?php echo label_tag(lang('description')) ?>
					</td>
					<td style="padding-left: 10px;text-align:right; vertical-align: middle;">
					</td>
				</tr>
				<tr>
					<td style="padding-right: 10px; width:140px;">
						<?php echo pick_date_widget2('timeslot[date]', DateTimeValueLib::now(), $genid, 100, false) ?>
					</td>
		
					<td style="padding-right: 10px; width:140px;">
						<?php
							$options = array();
							foreach ($users as $user) {
								$options[] = option_tag($user->getObjectName(), $user->getId(), $selected_user == $user->getId() ? array("selected" => "selected") : null);
							}
							echo select_box("timeslot[contact_id]", $options, array('id' => $genid . 'tsUser', 'tabindex' => '150')); 
						?>
					</td>
				<td style="padding-right: 10px; width: 140px;"><?php echo text_field('timeslot[hours]', 0, 
				array('style' => 'width:28px', 'tabindex' => '200', 'id' => $genid . 'tsHours','onkeypress'=>'og.checkEnterPress(event,\''.$genid.'\')')) ?>
				</td>
				<td style="padding-right: 10px; width: 140px;">
Ejemplo n.º 23
0
</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>