Пример #1
0
  <div>
    <?php 
echo label_tag(lang('projects shift dates'), 'projectFormShiftDates');
?>
    <?php 
echo checkbox_field('project[shift_dates]', true, array_var($project_data, 'shift_dates'), array('id' => 'projectFormShiftDates'));
?>
  </div>

  <div>
    <?php 
echo label_tag(lang('add days'), 'projectFormAddDaysFromNow');
?>
    <?php 
echo input_field('project[add_days]', array_var($project_data, 'add_days'), array('class' => 'short', 'id' => 'projectFormAddDays'));
?>
  </div>

  <div>
    <?php 
echo label_tag(lang('projects copy details'), 'projectFormCopyDetails');
?>
    <?php 
echo checkbox_field('project[copy_details]', true, array_var($project_data, 'copy_details'), array('id' => 'projectFormCopyDetails'));
?>
  </div>

  <div>
    <?php 
echo label_tag(lang('projects copy milestones'), 'projectFormCopyMilestones');
Пример #2
0
		<div id="userboxWrapper"><?php 
echo render_user_box(logged_user());
?>
</div>
		<div id="searchbox">
			<form name='search_form' class="internalForm" action="<?php 
echo ROOT_URL . '/index.php';
?>
" method="get">
				<table><tr><td>
				<?php 
$search_field_default_value = lang('search') . '...';
$search_field_attrs = array('onfocus' => 'if (value == \'' . $search_field_default_value . '\') value = \'\'', 'onblur' => 'if (value == \'\') value = \'' . $search_field_default_value . '\'');
?>
				<?php 
echo input_field('search_for', $search_field_default_value, $search_field_attrs);
?>
				</td>
				<td id="searchboxSearch">
					<div id="searchboxButton"></div>
					<input style="display:none" id="searchButtonReal" type="submit" />
					<input type="hidden" name="c" value="search" />
					<input type="hidden" name="a" value="search" />
					<input type="hidden" name="current" value="search" />
					<input type="hidden" id="hfVars" name="vars" value="dashboard" />
				</td>
				<td style="padding-left:10px">
					<div id="quickAdd"></div>
				</td>
				</tr></table>
			</form>
Пример #3
0
?>
</a>
		</fieldset>
	</div>
	
	<div>
	<?php 
echo label_tag(lang('description'), 'templateFormDescription', false);
?>
	<?php 
echo editor_widget('template[description]', array_var($template_data, 'description'), array('id' => $genid . 'templateFormDescription', 'class' => 'long', 'tabindex' => '2'));
?>
	</div>
	<?php 
if (isset($add_to) && $add_to) {
    echo input_field("add_to", "true", array("type" => "hidden"));
}
?>
	
	<?php 
foreach ($categories as $category) {
    ?>
	<div <?php 
    if (!$category['visible']) {
        echo 'style="display:none"';
    }
    ?>
 id="<?php 
    echo $genid . $category['name'];
    ?>
">
Пример #4
0
 $att_form = '';
 if (!$event->isNew() && !$event->isTrashed()) {
     $event_inv = EventInvitations::findById(array('event_id' => $event->getId(), 'contact_id' => logged_user()->getId()));
     if ($event_inv != null) {
         $event->addInvitation($event_inv);
         $event_inv_state = $event_inv->getInvitationState();
         if (!SystemPermissions::userHasSystemPermission(logged_user(), 'can_update_other_users_invitations')) {
             $options = array(option_tag(lang('yes'), 1, $event_inv_state == 1 ? array('selected' => 'selected') : null), option_tag(lang('no'), 2, $event_inv_state == 2 ? array('selected' => 'selected') : null), option_tag(lang('maybe'), 3, $event_inv_state == 3 ? array('selected' => 'selected') : null));
             if ($event_inv_state == 0) {
                 $options[] = option_tag(lang('decide later'), 0, $event_inv_state == 0 ? array('selected' => 'selected') : null);
             }
             $att_form = '<form style="height:100%;background-color:white" class="internalForm" action="' . get_url('event', 'change_invitation_state') . '" method="post">';
             $att_form .= '<table><tr><td style="padding-right:6px;"><b>' . lang('attendance') . '<b></td><td>';
             $att_form .= select_box('event_attendance', $options, array('id' => 'viewEventFormComboAttendance')) . '</td><td>';
             $att_form .= input_field('event_id', $event->getId(), array('type' => 'hidden'));
             $att_form .= input_field('user_id', logged_user()->getId(), array('type' => 'hidden'));
             $att_form .= submit_button(lang('Save'), null, array('style' => 'margin-top:0px;margin-left:10px')) . '</td></tr></table></form>';
         }
     }
     //if
 }
 // if
 $otherInvitationsTable = '';
 if (!$event->isNew()) {
     $otherInvitations = EventInvitations::findAll(array('conditions' => 'event_id = ' . $event->getId()));
     if (isset($otherInvitations) && is_array($otherInvitations)) {
         $otherInvitationsTable .= '<div class="coInputMainBlock adminMainBlock" style="width:70%;">';
         $otherInvitationsTable .= '<table style="width:100%;"><col width="50%" /><col width="50%" />';
         $otherInvitationsTable .= '<tr><th><b>' . lang('name') . '</b></th><th><b>' . lang('participate') . '</b></th></tr>';
         $isAlt = false;
         $cant = 0;
Пример #5
0
 /**
  * Creates a new text field.
  *
  * @param string $name
  * @param string|null $value
  * @param array $attributes
  * @return string
  */
 function text_field($name, $value = null, $attributes = [])
 {
     return input_field($name, $value, 'text', $attributes);
 }
Пример #6
0
echo label_tag(lang('due date'), null, true);
?>
    <?php 
echo pick_date_widget('milestone_due_date', array_var($milestone_data, 'due_date'));
?>
  </div>

<?php 
if (logged_user()->getProjectPermission($milestone->getProject(), 'milestones-edit_goal')) {
    ?>
  <div>
    <?php 
    echo label_tag(lang('goal'), 'milestoneFormGoal');
    ?>
    <?php 
    echo input_field('milestone[goal]', array_var($milestone_data, 'goal'), array('class' => 'short', 'id' => 'milestoneFormGoal'));
    ?>
  </div>
<?php 
}
// if
?>
  
<?php 
if (logged_user()->isMemberOfOwnerCompany()) {
    ?>
  <div class="formBlock">
    <label><?php 
    echo lang('private milestone');
    ?>
: <span class="desc">(<?php 
Пример #7
0
echo label_tag(lang('priority'), 'taskListFormPriority');
?>
    <?php 
echo input_field('task_list[priority]', array_var($task_list_data, 'priority'), array('class' => 'short', 'id' => 'taskListFormPriority'));
?>
  </div>

<?php 
if (config_option('enable_efqm') == 'yes' && logged_user()->getProjectPermission($task_list->getProject(), 'tasks-edit_score')) {
    ?>
  <div>
    <?php 
    echo label_tag(lang('score'), 'taskListFormScore');
    ?>
    <?php 
    echo input_field('task_list[score]', array_var($task_list_data, 'score'), array('class' => 'short', 'id' => 'taskListFormScore'));
    ?>
    <?php 
    echo '<a href="' . get_url('task', 'edit_score') . '">' . lang('edit score') . '</a>';
    ?>
  </div>
<?php 
}
// if
?>
      
  <div>
    <?php 
echo label_tag(lang('description'), 'taskListFormDescription');
?>
    <?php 
Пример #8
0
			<div id="<?php echo $genid ?>assignto_container_div"></div>
			
		</td><td style="padding-left:10px"><div  id="<?php echo $genid ?>taskFormSendNotificationDiv" style="display:none">
			<?php echo checkbox_field('task[send_notification]', array_var($task_data, 'send_notification'), array('id' => $genid . 'taskFormSendNotification')) ?>
			<label for="<?php echo $genid ?>taskFormSendNotification" class="checkbox"><?php echo lang('send task assigned to notification') ?></label>
		</div>
		<?php if (!$task->isNew()) { ?>
			<?php echo checkbox_field('task[apply_assignee_subtasks]', array_var($task_data, 'apply_assignee_subtasks'), array('id' => $genid . 'taskFormApplyAssignee')) ?>
			<label for="<?php echo $genid ?>taskFormApplyAssignee" class="checkbox"><?php echo lang('apply assignee to subtasks') ?></label>
		<?php } ?>
		</td></tr></table>
		
	</div>
	<?php Hook::fire('draw_additional_task_html', $genid, $task); ?>
	
	<?php echo input_field("task[is_template]", array_var($task_data, 'is_template', false), array("type" => "hidden", 'tabindex' => '160')); ?>
	<?php echo submit_button($task->isNew() ? (array_var($task_data, 'is_template', false) ? lang('save template') : lang('add task list')) : lang('save changes'), 's', array('tabindex' => '20000')) ?>
</div>
</div>
</form>

<script>

	var assigned_user = '******'assigned_to_contact_id', 0) ?>';
	var start = true;
	
	og.drawAssignedToSelectBox = function(companies, only_me, groups) {
		usersStore = ogTasks.buildAssignedToComboStore(companies, only_me, groups);
		var assignCombo = new Ext.form.ComboBox({
			renderTo:'<?php echo $genid ?>assignto_container_div',
			name: 'taskFormAssignedToCombo',
Пример #9
0
?>
        <?php 
$options = array('project', 'task list', 'task', 'all');
#need to add milestone
foreach ($options as $option) {
    $option_attributes = $reminder_prefs->getSummarizedBy() == $option ? array('selected' => 'selected') : null;
    $formOptions[] = option_tag(lang($option), $option, $option_attributes);
}
print select_box('prefs_form[summarized_by]', $formOptions);
?>
    		
        <?php 
echo label_tag(lang('show tasks in future'), null, false);
?>
        <?php 
echo input_field("prefs_form[future]", $reminder_prefs->getRemindersFuture(), array('size' => '2'));
?>
        <?php 
echo label_tag(lang('include whom question'), null, false);
?>
        <?php 
echo yes_no_widget('prefs_form[ivsteam]', 'reminderFormDailySummarized', $reminder_prefs->getIncludeEveryone(), lang('for all'), lang('for me'));
?>
        <?php 
echo label_tag(lang('days to send'), null, true);
?>
        <table>
          <tr>
          <?php 
for ($i = $dayOfWeek; $i < $dayOfWeek + 7; $i++) {
    echo "<th><center>" . lang($weekArray[$i % 7]) . "</center></th>";
Пример #10
0
  <div>
    <?php 
echo label_tag(lang('due date'), null, true);
?>
    <?php 
echo pick_date_widget('task_list_due_date', array_var($task_list_data, 'due_date'));
?>
  </div>

  <div>
    <?php 
echo label_tag(lang('priority'), 'taskListFormPriority');
?>
    <?php 
echo input_field('task_list[priority]', array_var($task_list_data, 'priority'), array('class' => 'short', 'id' => 'taskListFormPriority'));
?>
  </div>
      
  <div>
    <?php 
echo label_tag(lang('description'), 'taskListFormDescription');
?>
    <?php 
echo textarea_field('task_list[description]', array_var($task_list_data, 'description'), array('class' => 'short', 'id' => 'taskListFormDescription'));
?>
  </div>
  
  <div class="formBlock">
    <?php 
echo label_tag(lang('milestone'), 'taskListFormMilestone');
Пример #11
0
    echo $genid;
    ?>
add_linked_objects_div" class="form-tab">
			<?php 
    echo render_object_link_form($milestone);
    ?>
		</div>
	<?php 
}
// if
?>
	
	

	<?php 
echo input_field("milestone[is_template]", array_var($milestone_data, 'is_template', false), array("type" => "hidden"));
?>

		
		<?php 
foreach ($categories as $category) {
    ?>
		<div id="<?php 
    echo $genid . $category['name'];
    ?>
" class="form-tab">
			<?php 
    echo $category['content'];
    ?>
		</div>
		<?php 
Пример #12
0
				<?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>

	<?php echo submit_button(lang('save')) ?>&nbsp;<button class="submit" type="reset"><?php echo lang('reset') ?></button>
<?php } else { ?>
	<p><?php echo lang('no cron events to display') ?></p>
<?php } // if ?>
	</div>
</form>
Пример #13
0
/**
 * Show button with javascript to add tag from combo to text box
 * $src source control name
 * $dest destination control name
 */
function show_addtag_button($src, $dest, $attributes = null)
{
    $src = 'document.getElementById(\'' . $src . '\').value';
    $dest = 'document.getElementById(\'' . $dest . '\').value';
    $js = 'javascript:' . 'if(' . $dest . '==\'\') ' . ' ' . $dest . ' = ' . $src . '; ' . ' else ' . ' ' . $dest . ' = ' . ' ' . $dest . '  + ", " +(' . $src . ')';
    $attributes['type'] = 'button';
    $attributes['onclick'] = $js;
    return input_field('addTagButton', '>', $attributes);
}
Пример #14
0
<?php } // if {?>
<?php } // foreach ?>
            </ul>
<?php } // if ?>
          </div>
<?php trace(__FILE__,'body searchBox') ?>
          <div id="searchBox">
            <form action="<?php echo active_project()->getSearchUrl() ?>" method="get">
              <div>
<?php
  $search_field_default_value = lang('search') . '...';
  $search_field_attrs = array(
    'onfocus' => 'if (value == \'' . $search_field_default_value . '\') value = \'\'',
    'onblur' => 'if (value == \'\') value = \'' . $search_field_default_value . '\'');
?>
                <?php echo input_field('search_for', array_var($_GET, 'search_for', $search_field_default_value), $search_field_attrs) ?><button type="submit"><?php echo lang('search button caption') ?></button>
                <input type="hidden" name="c" value="project" />
                <input type="hidden" name="a" value="search" />
                <input type="hidden" name="active_project" value="<?php echo active_project()->getId() ?>" />
              </div>
            </form>
          </div>
        </div>
      </div>
      
<?php trace(__FILE__,'body contentWrapper') ?>
      <!-- content wrapper -->
      <div id="outerContentWrapper">
<?php if (is_array(page_actions())) { ?>
          <div id="page_actionsWrapper">
           <div id="page_actionsBlock">
Пример #15
0
		
		<div class="desc mail-account-item dataBlock"><?php 
echo lang('personal settings desc');
?>
</div>
		<div class="mail-account-item dataBlock">
			<label for="<?php 
echo $genid;
?>
sender_name">
				<?php 
echo lang('mail account sender name');
?>
			</label>
			<?php 
echo input_field('sender_name', array_var($user_settings, 'sender_name', ''), array('id' => $genid . "sender_name", 'tabindex' => 1210));
?>
			<span class="desc"><?php 
echo lang('mail account sender name description');
?>
</span>
		</div>
		
		<?php 
if ($is_admin) {
    ?>
		<div class="mail-account-item dataBlock">
			<label for="<?php 
    echo $genid;
    ?>
assign_to">
Пример #16
0
    ?>
" >
  <?php 
    //Adding hidden fields because the form is sending data in query string and overrides params in form action
    ?>
  <?php 
    echo input_field('c', 'wiki', array('type' => 'hidden'));
    ?>
  <?php 
    echo input_field('a', 'diff', array('type' => 'hidden'));
    ?>
  <?php 
    echo input_field('active_project', $page->getProjectId(), array('type' => 'hidden'));
    ?>
  <?php 
    echo input_field('id', $page->getId(), array('type' => 'hidden'));
    ?>
<table>
<tr>
	<th><?php 
    echo lang('wiki page revision');
    ?>
</th>
	<th><?php 
    echo lang('wiki log message');
    ?>
</th>
	<th><?php 
    echo lang('wiki page created on');
    ?>
</th>
Пример #17
0
}
// if
?>
          </div>
          <div id="searchBox">
            <form action="<?php 
echo active_project()->getSearchUrl();
?>
" method="get">
              <div>
<?php 
$search_field_default_value = lang('search') . '...';
$search_field_attrs = array('onfocus' => 'if (value == \'' . $search_field_default_value . '\') value = \'\'', 'onblur' => 'if (value == \'\') value = \'' . $search_field_default_value . '\'');
?>
                <?php 
echo input_field('search_for', array_var($_GET, 'search_for', $search_field_default_value), $search_field_attrs);
?>
<button type="submit"><?php 
echo lang('search button caption');
?>
</button>
                <input type="hidden" name="c" value="project" />
                <input type="hidden" name="a" value="search" />
                <input type="hidden" name="active_project" value="<?php 
echo active_project()->getId();
?>
" />
              </div>
            </form>
          </div>
        </div>
Пример #18
0
						</td>
						<td>
							<?php echo lang('upload anyway')?>
						</td>
					</tr>
				</table>
				<table id="<?php echo $genid ?>upload-table">
				</table>
				</div>
			</div>
		</div>
		<?php if ($comments_required) { ?>
			<?php echo label_tag(lang('revision comment'), $genid.'fileFormRevisionComment', $comments_required) ?>
			<?php echo textarea_field('file[revision_comment]', array_var($file_data, 'revision_comment', lang('initial versions')), array('id' => $genid.'fileFormRevisionComment', 'class' => 'long')) ?>
		<?php } else { ?>
			<?php echo input_field('file[revision_comment]', array_var($file_data, 'revision_comment', lang('initial versions')), array('type' => 'hidden', 'id' => $genid.'fileFormRevisionComment')) ?>
		<?php } ?>
		<input type='hidden' id ="<?php echo $genid ?>RevisionCommentsRequired" value="<?php echo $comments_required? '1':'0'?>"/>

	<?php }  else {//----------------------------------------------------------------EDIT?>

		<div class="content">
			<?php 
			if($file->getType() == ProjectFiles::TYPE_DOCUMENT){
				if (!isset($checkin)) {?>
				<div class="header">
					<?php echo checkbox_field('file[update_file]', array_var($file_data, 'update_file'), array('class' => 'checkbox', 'id' => $genid . 'fileFormUpdateFile', 'tabindex' => '60', 'onclick' => 'App.modules.addFileForm.updateFileClick(\'' . $genid .'\')')) ?>
					<?php echo label_tag(lang('update file'), $genid .'fileFormUpdateFile', false, array('class' => 'checkbox'), '') ?>
				</div>
				<div id="<?php echo $genid ?>updateFileDescription">
					<p><?php echo lang('replace file description') ?></p>
Пример #19
0
    echo $category['content'];
    ?>
	</fieldset>
	</div>
	<?php 
}
?>
	
	<div>
		<?php 
echo render_object_custom_properties($user, 'Users', true);
?>
	</div>

  <?php 
echo input_field('user[contact_id]', array_var($user_data, 'contact_id', ''), array('type' => 'hidden'));
echo submit_button($user->isNew() ? lang('add user') : lang('save changes'), 's', array('tabindex' => '1500'));
?>
  </div>
</div>
</form>

<script>
Ext.get('<?php 
echo $genid;
?>
userFormName').focus();

og.eventManager.addListener("company added", function(company) {
	var id = '<?php 
echo $genid . 'userFormCompany';
Пример #20
0
/**
 * Render checkbox field
 *
 * @access public
 * @param string $name Field name
 * @param mixed $value
 * @param boolean $checked Checked?
 * @param array $attributes Additional attributes
 * @return string
 */
function checkbox_field($name, $checked = false, $attributes = null)
{
    // Prepare attributes array
    if (is_array($attributes)) {
        $attributes['type'] = 'checkbox';
        if (!isset($attributes['class'])) {
            $attributes['class'] = 'checkbox';
        }
    } else {
        $attributes = array('type' => 'checkbox', 'class' => 'checkbox');
    }
    // if
    // Value
    $value = array_var($attributes, 'value', false);
    if ($value === false) {
        $value = 'checked';
    }
    // Checked
    if ($checked) {
        $attributes['checked'] = 'checked';
    } else {
        if (isset($attributes['checked'])) {
            unset($attributes['checked']);
        }
    }
    // if
    // And done
    return input_field($name, $value, $attributes);
}
Пример #21
0
  <div>
    <?php 
echo label_tag(lang('parent project'), 'projectSource', true);
?>
    <?php 
echo select_project('project[parent_id]', '', array_var($project_data, 'parent_id'), array('id' => 'projectFormParentId'));
?>
  </div>

  <div>
    <?php 
echo label_tag(lang('priority'), 'projectFormPriority');
?>
    <?php 
echo input_field('project[priority]', array_var($project_data, 'priority'), array('class' => 'short', 'id' => 'projectFormPriority'));
?>
  </div>
    
  <div>
    <?php 
echo label_tag(lang('description'), 'projectFormDescription');
?>
    <?php 
echo textarea_field('project[description]', array_var($project_data, 'description'), array('id' => 'projectFormDescription'));
?>
  </div>
  
  <div>
    <?php 
echo label_tag(lang('show project desciption in overview'));
" class="form-tab">
			<?php 
    echo $category['content'];
    ?>
		</div>
		<?php 
}
?>
		
	</div>
	<?php 
if (!array_var($_REQUEST, 'modal')) {
    echo submit_button($milestone->isNew() ? array_var($milestone_data, 'is_template', false) ? lang('save template') : lang('add milestone') : lang('save changes'), 's', array('tabindex' => '20000'));
} else {
    if (array_var($_REQUEST, 'use_ajx')) {
        echo input_field('use_ajx', array_var($_REQUEST, 'use_ajx'), array('type' => 'hidden'));
    }
}
?>
</div>
</div>
</form>

<script>

	og.reload_milestone_form_selectors = function() {
		var dimension_members_json = Ext.util.JSON.encode(member_selector['<?php 
echo $genid;
?>
'].sel_context);
		
Пример #23
0
<?php

set_page_title(lang('search results'));
project_tabbed_navigation();
project_crumbs(lang('search results'));
add_stylesheet_to_page('project/search_results.css');
?>
<div id="searchForm">
  <form action="<?php 
echo active_project()->getSearchUrl();
?>
" method="get">
    <?php 
echo input_field('search_for', array_var($_GET, 'search_for'));
?>
    <input type="hidden" name="c" value="project" />
    <input type="hidden" name="a" value="search" />
    <input type="hidden" name="active_project" value="<?php 
echo active_project()->getId();
?>
" />
    <?php 
echo submit_button(lang('search'));
?>
    <?php 
echo lang('search hint');
?>
  </form>
</div>

<?php 
Пример #24
0
</button>

<div id="addwork" style="display:none">
<table><tr><td>
	<?php 
echo label_tag(lang("end work description"), "closeTimeslotDescription", false);
?>
    <?php 
echo textarea_field("timeslot[description]", '', array('class' => 'short', 'id' => 'closeTimeslotDescription', 'tabstop' => '100'));
?>
</td><td style="padding-left:10px">
	<?php 
echo label_tag(lang('total time'), "closeTimeslotTotalTime", false);
?>
    <?php 
echo input_field("timeslot[time]", '', array('class' => 'short', 'id' => 'closeTimeslotTotalTime', 'tabstop' => '200'));
?>
&nbsp;<?php 
echo lang('hours');
?>
</td></tr></table>

<?php 
echo submit_button(lang('add work'));
?>
<button class="submit" style="margin-left:15px" id="buttonAddWorkCancel" type="button" onclick="document.getElementById('addwork').style.display='none';document.getElementById('buttonAddWork').style.display='inline';document.getElementById('tdstartwork').style.display='';return false;"><?php 
echo lang('cancel');
?>
</button>
</div>