Exemplo n.º 1
0
</strong>
					</td>
				</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td align="left" nowrap="nowrap">
				<?php 
echo $AppUI->_('Import tasks from');
?>
:<br/>
			</td>
			<td colspan="3">
<?php 
echo projectSelectWithOptGroup($AppUI->user_id, 'import_tasks_from', 'size="1" class="text"', false, $project_id);
?>
			</td>
		</tr>
		<tr>
			<td align="left" nowrap="nowrap">
				<?php 
echo $AppUI->_('Scale Imported Tasks');
?>
:<br/>
			</td>
			<td colspan="3">
				<input type="checkbox" name="scale_project" id="scale_project" value="1" />
			</td>
		</tr>
		<tr>
Exemplo n.º 2
0
function file_show_attr()
{
    global $AppUI, $obj, $ci, $canAdmin, $projects, $file_project, $file_task, $task_name, $preserve, $file_helpdesk_item;
    if ($ci) {
        $str_out = '<tr><td align="right" nowrap="nowrap">' . $AppUI->_('Minor Revision') . '</td><td><input type="Radio" name="revision_type" value="minor" checked />' . '</td><tr><td align="right" nowrap="nowrap">' . $AppUI->_('Major Revision') . '</td><td><input type="Radio" name="revision_type" value="major" /></td>';
    } else {
        $str_out = '<tr><td align="right" nowrap="nowrap">' . $AppUI->_('Version') . ':</td>';
    }
    $str_out .= '<td align="left">';
    if ($ci || $canAdmin && $obj->file_checkout == 'final') {
        $str_out .= '<input type="hidden" name="file_checkout" value="" /><input type="hidden" name="file_co_reason" value="" />';
    }
    if ($ci) {
        $the_value = strlen($obj->file_version) > 0 ? $obj->file_version + 0.01 : '1';
        $str_out .= '<input type="hidden" name="file_version" value="' . $the_value . '" />';
    } else {
        $the_value = strlen($obj->file_version) > 0 ? $obj->file_version : '1';
        $str_out .= '<input type="text" name="file_version" maxlength="10" size="5" value="' . $the_value . '" />';
    }
    $str_out .= '</td>';
    $select_disabled = ' ';
    $onclick_task = ' onclick="popTask()" ';
    if ($ci && $preserve) {
        $select_disabled = ' disabled="disabled" ';
        $onclick_task = ' ';
        // need because when a html is disabled, it's value it's not sent in submit
        $str_out .= '<input type="hidden" name="file_project" value="' . $file_project . '" />';
        $str_out .= '<input type="hidden" name="file_category" value="' . $obj->file_category . '" />';
    }
    // Category
    $str_out .= '<tr><td align="right" nowrap="nowrap">' . $AppUI->_('Category') . ':</td>';
    $str_out .= '<td align="left">' . arraySelect(w2PgetSysVal('FileType'), 'file_category', '' . $select_disabled, $obj->file_category, true) . '<td>';
    // ---------------------------------------------------------------------------------
    if ($file_helpdesk_item) {
        $hd_item = new CHelpDeskItem();
        $hd_item->load($file_helpdesk_item);
        //Helpdesk Item
        $str_out .= '<tr><td align="right" nowrap="nowrap">' . $AppUI->_('Helpdesk Item') . ':</td>';
        $str_out .= '<td align="left"><strong>' . $hd_item->item_id . ' - ' . $hd_item->item_title . '</strong></td></tr>';
        // Project
        $str_out .= '<input type="hidden" name="file_project" value="' . $file_project . '" />';
        // Task
        $str_out .= '<input type="hidden" name="file_task" value="0" />';
    } else {
        // Project
        $str_out .= '<tr><td align="right" nowrap="nowrap">' . $AppUI->_('Project') . ':</td>';
        $str_out .= '<td align="left">' . projectSelectWithOptGroup($AppUI->user_id, 'file_project', 'size="1" class="text" style="width:270px"' . $select_disabled, $file_project) . '</td></tr>';
        // ---------------------------------------------------------------------------------
        // Task
        $str_out .= '<tr><td align="right" nowrap="nowrap">' . $AppUI->_('Task') . ':</td><td align="left" colspan="2" valign="top"><input type="hidden" name="file_task" value="' . $file_task . '" /><input type="text" class="text" name="task_name" value="' . $task_name . '" size="40" disabled /><input type="button" class="button" value="' . $AppUI->_('select task') . '..."' . $onclick_task . '/></td></tr>';
    }
    return $str_out;
}
Exemplo n.º 3
0
function file_show_attr($AppUI, $form)
{
    global $object, $ci, $canAdmin, $file_project, $file_task, $task_name, $preserve;
    if ($ci) {
        $str_out = '<p>' . $form->addLabel('Minor Revision') . '<input type="Radio" name="revision_type" value="minor" checked /></p>';
        $str_out .= '<p>' . $form->addLabel('Major Revision') . '<input type="Radio" name="revision_type" value="major" />';
    } else {
        $str_out = '<p>' . $form->addLabel('Version');
    }
    if ($ci) {
        $the_value = strlen($object->file_version) > 0 ? $object->file_version + 0.01 : '1';
        $str_out .= '<input type="hidden" name="file_version" value="' . $the_value . '" />';
    } else {
        $the_value = strlen($object->file_version) > 0 ? $object->file_version : '1';
        $str_out .= '<input type="text" name="file_version" maxlength="10" size="5" value="' . $the_value . '" class="text" />';
    }
    if ($ci || $canAdmin && $object->file_checkout == 'final') {
        $str_out .= '<input type="hidden" name="file_checkout" value="" /><input type="hidden" name="file_co_reason" value="" />';
    }
    $str_out .= '</p>';
    $select_disabled = ' ';
    $onclick_task = ' onclick="popTask()" ';
    if ($ci && $preserve) {
        $select_disabled = ' disabled="disabled" ';
        $onclick_task = ' ';
        // need because when a html is disabled, it's value it's not sent in submit
        $str_out .= '<input type="hidden" name="file_project" value="' . $file_project . '" />';
        $str_out .= '<input type="hidden" name="file_category" value="' . $object->file_category . '" />';
    }
    // Category
    $str_out .= '<p>' . $form->addLabel('Category');
    $str_out .= arraySelect(w2PgetSysVal('FileType'), 'file_category', 'class="text"' . $select_disabled, $object->file_category, true) . '</p>';
    // ---------------------------------------------------------------------------------
    $str_out .= '<p>' . $form->addLabel('Project');
    $str_out .= projectSelectWithOptGroup($AppUI->user_id, 'file_project', 'size="1" class="text"' . $select_disabled, $file_project) . '</p>';
    // ---------------------------------------------------------------------------------
    // Task
    $str_out .= '<p>' . $form->addLabel('Task');
    $str_out .= '<input type="hidden" name="file_task" value="' . $file_task . '" /><input type="text" class="text" name="task_name" value="' . $task_name . '" size="40" disabled /><input type="button" class="button btn btn-primary btn-mini" value="' . $AppUI->_('select task') . '..."' . $onclick_task . '/></p>';
    return $str_out;
}