Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
+7
-19
@@ -217,11 +217,6 @@ class task extends control
|
||||
foreach(explode(',', $this->config->task->customCreateFields) as $field) $customFields[$field] = $this->lang->task->$field;
|
||||
if($execution->type == 'ops') unset($customFields['story']);
|
||||
|
||||
$this->loadModel('gitlab');
|
||||
$allGitlabs = $this->gitlab->getPairs();
|
||||
$gitlabProjects = $this->gitlab->getProjectsByExecution($executionID);
|
||||
foreach($allGitlabs as $id => $name) if($id and !isset($gitlabProjects[$id])) unset($allGitlabs[$id]);
|
||||
|
||||
$this->view->customFields = $customFields;
|
||||
$this->view->showFields = $this->config->task->custom->createFields;
|
||||
$this->view->showAllModule = $showAllModule;
|
||||
@@ -237,8 +232,6 @@ class task extends control
|
||||
$this->view->members = $members;
|
||||
$this->view->blockID = $blockID;
|
||||
$this->view->moduleOptionMenu = $moduleOptionMenu;
|
||||
$this->view->gitlabList = $allGitlabs;
|
||||
$this->view->gitlabProjects = $gitlabProjects;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -357,7 +350,7 @@ class task extends control
|
||||
$this->view->actions = $this->loadModel('action')->getList('task', $taskID);
|
||||
|
||||
/* Set menu. */
|
||||
$this->execution->setMenu($this->execution->getPairs(), $this->view->execution->id);
|
||||
$this->execution->setMenu($this->view->execution->id);
|
||||
$this->view->position[] = html::a($this->createLink('execution', 'browse', "execution={$this->view->task->execution}"), $this->view->execution->name);
|
||||
}
|
||||
|
||||
@@ -372,7 +365,6 @@ class task extends control
|
||||
public function edit($taskID, $comment = false)
|
||||
{
|
||||
$this->commonAction($taskID);
|
||||
$this->execution->setMenu($this->view->task->execution);
|
||||
|
||||
if(!empty($_POST))
|
||||
{
|
||||
@@ -792,7 +784,7 @@ class task extends control
|
||||
}
|
||||
|
||||
if($this->viewType == 'json') return $this->send(array('result' => 'success'));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', 'this', "function(){parent.parent.location.reload();}"));
|
||||
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
|
||||
}
|
||||
|
||||
@@ -951,7 +943,7 @@ class task extends control
|
||||
}
|
||||
}
|
||||
}
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', 'this', "function(){parent.parent.location.reload();}"));
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api')
|
||||
{
|
||||
return $this->send(array('result' => 'success', 'data' => $taskID));
|
||||
@@ -1095,10 +1087,10 @@ class task extends control
|
||||
|
||||
$this->executeHooks($taskID);
|
||||
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', 'this', "function(){parent.parent.location.reload();}"));
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api')
|
||||
{
|
||||
die(array('status' => 'success', 'data' => $taskID));
|
||||
return $this->send(array('status' => 'success', 'data' => $taskID));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1299,11 +1291,6 @@ class task extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Delete related issue in gitlab. */
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('task', $taskID);
|
||||
if(!empty($relation)) $this->gitlab->deleteIssue('task', $taskID, $relation->issueID);
|
||||
|
||||
$this->task->delete(TABLE_TASK, $taskID);
|
||||
if($task->parent > 0)
|
||||
{
|
||||
@@ -1315,7 +1302,8 @@ class task extends control
|
||||
|
||||
$this->executeHooks($taskID);
|
||||
|
||||
return print(js::locate($this->session->taskList, 'parent'));
|
||||
$locateLink = $this->session->taskList ? $this->session->taskList : $this->createLink('execution', 'task', "executionID={$task->execution}");
|
||||
return print(js::locate($locateLink, 'parent'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,35 @@ $(function()
|
||||
if(taskConsumed > 0) alert(addChildTask);
|
||||
});
|
||||
|
||||
$(document).on('change', "[name^='estStarted'], [name^='deadline']", function()
|
||||
{
|
||||
toggleCheck($(this));
|
||||
})
|
||||
|
||||
/**
|
||||
* Toggle checkbox.
|
||||
*
|
||||
* @param object $obj
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function toggleCheck(obj)
|
||||
{
|
||||
var $this = $(obj);
|
||||
var date = $this.val();
|
||||
var $ditto = $this.closest('div').find("input[type='checkBox']");
|
||||
if(date == '')
|
||||
{
|
||||
$ditto.attr('checked', true);
|
||||
$ditto.closest('.input-group-addon').show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$ditto.removeAttr('checked');
|
||||
$ditto.closest('.input-group-addon').hide();
|
||||
}
|
||||
}
|
||||
|
||||
/* Get select of stories.*/
|
||||
function setStories(moduleID, executionID, num)
|
||||
{
|
||||
|
||||
@@ -479,23 +479,6 @@ $(document).ready(function()
|
||||
$('#moduleIdBox #module').val(moduleID).attr('onchange', "setStories(this.value, " + executionID + ")").chosen();
|
||||
});
|
||||
});
|
||||
|
||||
$('#gitlab').change(function()
|
||||
{
|
||||
host = $('#gitlab').val();
|
||||
if(host == '') return false;
|
||||
projects = '';
|
||||
$.each(gitlabProjects[host], function(id, obj){projects = projects + ',' + obj.gitlabProject});
|
||||
url = createLink('repo', 'ajaxgetgitlabprojects', "host=" + host + "&projects=" + projects);
|
||||
|
||||
$.get(url, function(response)
|
||||
{
|
||||
$('#gitlabProject').html('').append(response);
|
||||
$('#gitlabProject').chosen().trigger("chosen:updated");;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$(document).on('click', '#testStory_chosen,#story_chosen', function()
|
||||
|
||||
+26
-71
@@ -121,10 +121,6 @@ class taskModel extends model
|
||||
|
||||
$taskID = $this->dao->lastInsertID();
|
||||
|
||||
/* Sync this task to gitlab issue. */
|
||||
$object = $this->getByID($taskID);
|
||||
$this->loadModel('gitlab')->apiCreateIssue($this->post->gitlab, $this->post->gitlabProject, 'task', $taskID, $object);
|
||||
|
||||
/* Mark design version.*/
|
||||
if(isset($task->design) && !empty($task->design))
|
||||
{
|
||||
@@ -196,7 +192,7 @@ class taskModel extends model
|
||||
}
|
||||
|
||||
$teams = array();
|
||||
if($this->post->multiple)
|
||||
if($this->post->multiple and count(array_filter($this->post->team)) > 1)
|
||||
{
|
||||
foreach($this->post->team as $row => $account)
|
||||
{
|
||||
@@ -282,6 +278,8 @@ class taskModel extends model
|
||||
$module = 0;
|
||||
$type = '';
|
||||
$assignedTo = '';
|
||||
$estStarted = '0000-00-00';
|
||||
$deadline = '0000-00-00';
|
||||
|
||||
/* Get task data. */
|
||||
$extendFields = $this->getFlowExtendFields();
|
||||
@@ -289,10 +287,12 @@ class taskModel extends model
|
||||
$data = array();
|
||||
foreach($tasks->name as $i => $name)
|
||||
{
|
||||
$story = !isset($tasks->story[$i]) || $tasks->story[$i] == 'ditto' ? $story : $tasks->story[$i];
|
||||
$module = !isset($tasks->module[$i]) || $tasks->module[$i] == 'ditto' ? $module : $tasks->module[$i];
|
||||
$type = !isset($tasks->type[$i]) || $tasks->type[$i] == 'ditto' ? $type : $tasks->type[$i];
|
||||
$assignedTo = !isset($tasks->assignedTo[$i]) || $tasks->assignedTo[$i] == 'ditto' ? $assignedTo: $tasks->assignedTo[$i];
|
||||
$story = (!isset($tasks->story[$i]) or $tasks->story[$i] == 'ditto') ? $story : $tasks->story[$i];
|
||||
$module = (!isset($tasks->module[$i]) or $tasks->module[$i] == 'ditto') ? $module : $tasks->module[$i];
|
||||
$type = (!isset($tasks->type[$i]) or $tasks->type[$i] == 'ditto') ? $type : $tasks->type[$i];
|
||||
$assignedTo = (!isset($tasks->assignedTo[$i]) or $tasks->assignedTo[$i] == 'ditto') ? $assignedTo : $tasks->assignedTo[$i];
|
||||
$estStarted = (!isset($tasks->estStarted[$i]) or isset($tasks->estStartedDitto[$i])) ? $estStarted : $tasks->estStarted[$i];
|
||||
$deadline = (!isset($tasks->deadline[$i]) or isset($tasks->deadlineDitto[$i])) ? $deadline : $tasks->deadline[$i];
|
||||
|
||||
if(empty($tasks->name[$i])) continue;
|
||||
|
||||
@@ -309,8 +309,8 @@ class taskModel extends model
|
||||
$data[$i]->left = $tasks->estimate[$i];
|
||||
$data[$i]->project = $this->config->systemMode == 'new' ? $projectID : 0;
|
||||
$data[$i]->execution = $executionID;
|
||||
$data[$i]->estStarted = empty($tasks->estStarted[$i]) ? '0000-00-00' : $tasks->estStarted[$i];
|
||||
$data[$i]->deadline = empty($tasks->deadline[$i]) ? '0000-00-00' : $tasks->deadline[$i];
|
||||
$data[$i]->estStarted = $estStarted;
|
||||
$data[$i]->deadline = $deadline;
|
||||
$data[$i]->status = 'wait';
|
||||
$data[$i]->openedBy = $this->app->user->account;
|
||||
$data[$i]->openedDate = $now;
|
||||
@@ -385,10 +385,6 @@ class taskModel extends model
|
||||
|
||||
$taskID = $this->dao->lastInsertID();
|
||||
|
||||
/* Sync this task to gitlab issue. */
|
||||
$object = $this->getByID($taskID);
|
||||
$this->loadModel('gitlab')->apiCreateIssue($this->post->gitlab, $this->post->gitlabProject,'task', $taskID, $object);
|
||||
|
||||
$taskSpec = new stdClass();
|
||||
$taskSpec->task = $taskID;
|
||||
$taskSpec->version = $task->version;
|
||||
@@ -475,6 +471,7 @@ class taskModel extends model
|
||||
$task->estimate = 0;
|
||||
$task->estStarted = '0000-00-00';
|
||||
$task->left = 1;
|
||||
$task->pri = 3;
|
||||
$task->type = 'devel';
|
||||
|
||||
$this->dao->insert(TABLE_TASK)->data($task, $skip = 'id,product')
|
||||
@@ -670,6 +667,9 @@ class taskModel extends model
|
||||
|
||||
if($parentTask->story) $this->loadModel('story')->setStage($parentTask->story);
|
||||
$newParentTask = $this->dao->select('*')->from(TABLE_TASK)->where('id')->eq($parentID)->fetch();
|
||||
|
||||
unset($oldParentTask->subStatus);
|
||||
unset($newParentTask->subStatus);
|
||||
$changes = common::createChanges($oldParentTask, $newParentTask);
|
||||
$action = '';
|
||||
if($status == 'done' and $parentTask->status != 'done') $action = 'Finished';
|
||||
@@ -901,7 +901,7 @@ class taskModel extends model
|
||||
$task = $this->loadModel('file')->processImgURL($task, $this->config->task->editor->edit['id'], $this->post->uid);
|
||||
|
||||
$teams = array();
|
||||
if($this->post->multiple)
|
||||
if($this->post->multiple and count(array_unique(array_filter($this->post->team))) > 1)
|
||||
{
|
||||
if(strpos(',done,closed,cancel,', ",{$task->status},") === false && $this->post->assignedTo && !in_array($this->post->assignedTo, $this->post->team))
|
||||
{
|
||||
@@ -981,11 +981,6 @@ class taskModel extends model
|
||||
->batchCheckIF($task->closedReason == 'cancel', 'finishedBy, finishedDate', 'empty')
|
||||
->where('id')->eq((int)$taskID)->exec();
|
||||
|
||||
/* update task to gitlab issue. */
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('task', $taskID);
|
||||
if(!empty($relation)) $this->gitlab->apiUpdateIssue($relation->gitlabID, $relation->projectID, $relation->issueID, 'task', $task, $taskID);
|
||||
|
||||
if(!dao::isError())
|
||||
{
|
||||
/* Mark design version.*/
|
||||
@@ -1220,21 +1215,12 @@ class taskModel extends model
|
||||
$tasks[$taskID] = $task;
|
||||
}
|
||||
|
||||
$this->loadModel('gitlab');
|
||||
$issues = $this->gitlab->getIssueListByObjects('task', $taskID);
|
||||
foreach($tasks as $taskID => $task)
|
||||
{
|
||||
$issue = zget($issues, $taskID, 0);
|
||||
if(!$issue) continue;
|
||||
$this->gitlab->apiUpdateIssue($issue->gitlabID, $issue->projectID, $issue->issueID, $task);
|
||||
}
|
||||
|
||||
/* Check field not empty. */
|
||||
foreach($tasks as $taskID => $task)
|
||||
{
|
||||
if($task->status == 'done' and $task->consumed == false) die(js::error('task#' . $taskID . sprintf($this->lang->error->notempty, $this->lang->task->consumedThisTime)));
|
||||
if($task->status == 'cancel') continue;
|
||||
if($task->estStarted > $task->deadline) die(js::error('task#' . $taskID . $this->lang->task->error->deadlineSmall));
|
||||
if(!empty($task->deadline) and $task->estStarted > $task->deadline) die(js::error('task#' . $taskID . $this->lang->task->error->deadlineSmall));
|
||||
foreach(explode(',', $this->config->task->edit->requiredFields) as $field)
|
||||
{
|
||||
$field = trim($field);
|
||||
@@ -1298,11 +1284,6 @@ class taskModel extends model
|
||||
if($task->status == 'done') $this->loadModel('score')->create('task', 'finish', $taskID);
|
||||
if($task->status == 'closed') $this->loadModel('score')->create('task', 'close', $taskID);
|
||||
$allChanges[$taskID] = common::createChanges($oldTask, $task);
|
||||
|
||||
/* Update task to gitlab issue. */
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('task', $taskID);
|
||||
if(!empty($relation)) $this->gitlab->apiUpdateIssue($relation->gitlabID, $relation->projectID, $relation->issueID, 'task', $task, $taskID);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1387,11 +1368,8 @@ class taskModel extends model
|
||||
->data($task)
|
||||
->autoCheck()
|
||||
->check('left', 'float')
|
||||
->where('id')->eq($taskID)->exec();
|
||||
|
||||
$task = $this->getById($taskID);
|
||||
$relation = $this->loadModel('gitlab')->getRelationByObject('task', $taskID);
|
||||
if(!empty($relation)) $this->gitlab->apiUpdateIssue($relation->gitlabID, $relation->projectID, $relation->issueID, 'task', $task, $taskID);
|
||||
->where('id')->eq($taskID)
|
||||
->exec();
|
||||
|
||||
if(!dao::isError()) return common::createChanges($oldTask, $task);
|
||||
}
|
||||
@@ -1634,7 +1612,7 @@ class taskModel extends model
|
||||
|
||||
$task = fixer::input('post')
|
||||
->setIF(is_numeric($this->post->consumed), 'consumed', (float)$this->post->consumed)
|
||||
->setIF(helper::isZeroDate($oldTask->realStarted), 'realStarted', $now)
|
||||
->setIF(!$this->post->realStarted and helper::isZeroDate($oldTask->realStarted), 'realStarted', $now)
|
||||
->setDefault('left', 0)
|
||||
->setDefault('assignedTo', $oldTask->openedBy)
|
||||
->setDefault('assignedDate', $now)
|
||||
@@ -1728,14 +1706,6 @@ class taskModel extends model
|
||||
->where('id')->eq((int)$taskID)
|
||||
->exec();
|
||||
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('task', $taskID);
|
||||
if(!empty($relation))
|
||||
{
|
||||
$currentIssue = $this->gitlab->apiGetSingleIssue($relation->gitlabID, $relation->projectID, $relation->issueID);
|
||||
if($currentIssue->state != 'closed') $this->gitlab->apiUpdateIssue($relation->gitlabID, $relation->projectID, $relation->issueID, 'task', $task, $taskID);
|
||||
}
|
||||
|
||||
if($oldTask->parent > 0) $this->updateParentStatus($taskID);
|
||||
if($oldTask->story) $this->loadModel('story')->setStage($oldTask->story);
|
||||
if($task->status == 'done' && !dao::isError()) $this->loadModel('score')->create('task', 'finish', $taskID);
|
||||
@@ -1792,14 +1762,6 @@ class taskModel extends model
|
||||
|
||||
$this->dao->update(TABLE_TASK)->data($task)->autoCheck()->where('id')->eq((int)$taskID)->exec();
|
||||
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('task', $taskID);
|
||||
if(!empty($relation))
|
||||
{
|
||||
$currentIssue = $this->gitlab->apiGetSingleIssue($relation->gitlabID, $relation->projectID, $relation->issueID);
|
||||
if($currentIssue->state != 'closed') $this->gitlab->apiUpdateIssue($relation->gitlabID, $relation->projectID, $relation->issueID, 'bug', $task, $taskID);
|
||||
}
|
||||
|
||||
if(!dao::isError())
|
||||
{
|
||||
if($oldTask->parent > 0) $this->updateParentStatus($taskID);
|
||||
@@ -1844,14 +1806,6 @@ class taskModel extends model
|
||||
}
|
||||
if($oldTask->story) $this->loadModel('story')->setStage($oldTask->story);
|
||||
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('task', $taskID);
|
||||
if(!empty($relation))
|
||||
{
|
||||
$currentIssue = $this->gitlab->apiGetSingleIssue($relation->gitlabID, $relation->projectID, $relation->issueID);
|
||||
if($currentIssue->state != 'closed') $this->gitlab->apiUpdateIssue($relation->gitlabID, $relation->projectID, $relation->issueID, 'task', $task, $taskID);
|
||||
}
|
||||
|
||||
if(!dao::isError()) return common::createChanges($oldTask, $task);
|
||||
}
|
||||
|
||||
@@ -1917,10 +1871,6 @@ class taskModel extends model
|
||||
}
|
||||
if($oldTask->story) $this->loadModel('story')->setStage($oldTask->story);
|
||||
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('task', $taskID);
|
||||
if(!empty($relation)) $this->gitlab->apiUpdateIssue($relation->gitlabID, $relation->projectID, $relation->issueID, 'task', $task, $taskID);
|
||||
|
||||
if(!dao::isError()) return common::createChanges($oldTask, $task);
|
||||
}
|
||||
|
||||
@@ -2192,6 +2142,11 @@ class taskModel extends model
|
||||
foreach($taskTeam as $taskID => $team) $tasks[$taskID]->team = $team;
|
||||
}
|
||||
|
||||
$projectList = array();
|
||||
foreach($tasks as $task) $projectList[] = $task->project;
|
||||
$projectPairs = $this->dao->select('id,name')->from(TABLE_PROJECT)->where('id')->in($projectList)->fetchPairs('id');
|
||||
foreach($tasks as $task) $task->projectName = zget($projectPairs, $task->project);
|
||||
|
||||
if($tasks) return $this->processTasks($tasks);
|
||||
return array();
|
||||
}
|
||||
@@ -3070,7 +3025,7 @@ class taskModel extends model
|
||||
echo $this->lang->task->typeList[$task->type];
|
||||
break;
|
||||
case 'status':
|
||||
$storyChanged ? print("<span class='status-story status-changed'>{$this->lang->story->changed}</span>") : print("<span class='status-task status-{$task->status}'> " . $this->processStatus('task', $task) . "</span>");
|
||||
$storyChanged ? print("<span class='status-story status-changed' title='{$this->lang->story->changed}'>{$this->lang->story->changed}</span>") : print("<span class='status-task status-{$task->status}' title='{$this->processStatus('task', $task)}'> " . $this->processStatus('task', $task) . "</span>");
|
||||
break;
|
||||
case 'estimate':
|
||||
echo round($task->estimate, 1) . $this->lang->execution->workHourUnit;
|
||||
|
||||
@@ -68,8 +68,8 @@
|
||||
<th class='w-80px required'><?php echo $lang->typeAB;?></span></th>
|
||||
<th class='w-130px<?php echo zget($visibleFields, 'assignedTo', ' hidden') . zget($requiredFields, 'assignedTo', '', ' required');?>'><?php echo $lang->task->assignedTo;?></th>
|
||||
<th class='w-60px<?php echo zget($visibleFields, 'estimate', ' hidden') . zget($requiredFields, 'estimate', '', ' required');?>'><?php echo $lang->task->estimateAB;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'estStarted', ' hidden') . zget($requiredFields, 'estStarted', '', ' required');?>'><?php echo $lang->task->estStarted;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'deadline', ' hidden') . zget($requiredFields, 'deadline', '', ' required');?>'><?php echo $lang->task->deadline;?></th>
|
||||
<th class='w-120px<?php echo zget($visibleFields, 'estStarted', ' hidden') . zget($requiredFields, 'estStarted', '', ' required');?>'><?php echo $lang->task->estStarted;?></th>
|
||||
<th class='w-120px<?php echo zget($visibleFields, 'deadline', ' hidden') . zget($requiredFields, 'deadline', '', ' required');?>'><?php echo $lang->task->deadline;?></th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'desc', ' hidden') . zget($requiredFields, 'desc', '', ' required');?>'><?php echo $lang->task->desc;?></th>
|
||||
<th class='w-80px<?php echo zget($visibleFields, 'pri', ' hidden') . zget($requiredFields, 'pri', '', ' required');?>'><?php echo $lang->task->pri;?></th>
|
||||
<?php
|
||||
@@ -134,8 +134,22 @@
|
||||
<td><?php echo html::select("type[$i]", $lang->task->typeList, $type, 'class=form-control');?></td>
|
||||
<td <?php echo zget($visibleFields, 'assignedTo', "class='hidden'")?> style='overflow:visible'><?php echo html::select("assignedTo[$i]", $members, $member, "class='form-control chosen'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'estimate', "class='hidden'")?>><?php echo html::input("estimate[$i]", '', "class='form-control text-center'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'estStarted', "class='hidden'")?>><?php echo html::input("estStarted[$i]", '', "class='form-control text-center form-date'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'deadline', "class='hidden'")?>><?php echo html::input("deadline[$i]", '', "class='form-control text-center form-date'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'estStarted', "class='hidden'")?>>
|
||||
<div class='input-group'>
|
||||
<?php
|
||||
echo html::input("estStarted[$i]", '', "class='form-control text-center form-date' onkeyup='toggleCheck(this)'");
|
||||
if($i != 0) echo "<span class='input-group-addon estStartedBox'><input type='checkbox' name='estStartedDitto[$i]' id='estStartedDitto$i' " . ($i> 0 ? "checked" : '') . " /> {$lang->task->ditto}</span>";
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
<td <?php echo zget($visibleFields, 'deadline', "class='hidden'")?>>
|
||||
<div class='input-group'>
|
||||
<?php
|
||||
echo html::input("deadline[$i]", '', "class='form-control text-center form-date' onkeyup='toggleCheck(this)'");
|
||||
if($i != 0) echo "<span class='input-group-addon deadlineBox'><input type='checkbox' name='deadlineDitto[$i]' id='deadlineDitto$i' " . ($i> 0 ? "checked" : '') . " /> {$lang->task->ditto}</span>";
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
<td <?php echo zget($visibleFields, 'desc', "class='hidden'")?>><?php echo html::textarea("desc[$i]", '', "rows='1' class='form-control autosize'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'pri', "class='hidden'")?>><?php echo html::select("pri[$i]", (array)$lang->task->priList, $pri, 'class=form-control');?></td>
|
||||
<?php foreach($extendFields as $extendField) echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->loadModel('flow')->getFieldControl($extendField, '', $extendField->field . "[$i]") . "</td>";?>
|
||||
@@ -187,8 +201,21 @@
|
||||
<td><?php echo html::select("type[%s]", $lang->task->typeList, $type, 'class="form-control"');?></td>
|
||||
<td <?php echo zget($visibleFields, 'assignedTo', "class='hidden'")?> style='overflow:visible'><?php echo html::select("assignedTo[%s]", $members, $member, "class='form-control chosen'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'estimate', "class='hidden'")?>><?php echo html::input("estimate[%s]", '', "class='form-control text-center'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'estStarted', "class='hidden'")?>><?php echo html::input("estStarted[%s]", '', "class='form-control text-center form-date'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'deadline', "class='hidden'")?>><?php echo html::input("deadline[%s]", '', "class='form-control text-center form-date'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'estStarted', "class='hidden'")?>>
|
||||
<div class='input-group'>
|
||||
<?php
|
||||
echo html::input("estStarted[%s]", '', "class='form-control text-center form-date' onkeyup='toggleCheck(this)'");
|
||||
echo "<span class='input-group-addon estStartedBox'><input type='checkbox' name='estStartedDitto[%s]' id='estStartedDitto%s' checked/>{$lang->task->ditto}</span>";
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
<td <?php echo zget($visibleFields, 'deadline', "class='hidden'")?>>
|
||||
<div class='input-group'>
|
||||
<?php
|
||||
echo html::input("deadline[%s]", '', "class='form-control text-center form-date' onkeyup='toggleCheck(this)'");
|
||||
echo "<span class='input-group-addon deadlineBox'><input type='checkbox' name='deadlineDitto[%s]' id='deadlineDitto%s' checked/>{$lang->task->ditto}</span>";
|
||||
?>
|
||||
</div>
|
||||
<td <?php echo zget($visibleFields, 'desc', "class='hidden'")?>><?php echo html::textarea("desc[%s]", '', "rows='1' class='form-control autosize'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'pri', "class='hidden'")?>><?php echo html::select("pri[%s]", (array)$lang->task->priList, $pri, 'class=form-control');?></td>
|
||||
<?php foreach($extendFields as $extendField) echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->loadModel('flow')->getFieldControl($extendField, '', $extendField->field . "[%s]") . "</td>";?>
|
||||
|
||||
@@ -128,12 +128,12 @@ js::set('dittoNotice', $dittoNotice);
|
||||
<td class='text-left<?php echo zget($visibleFields, 'assignedTo', ' hidden')?>' style='overflow:visible'><?php echo html::select("assignedTos[$taskID]", $taskMembers, $tasks[$taskID]->assignedTo, "class='form-control chosen' {$disableAssignedTo}");?></td>
|
||||
<td><?php echo html::select("types[$taskID]", $typeList, $tasks[$taskID]->type, "class='form-control'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'status', "class='hidden'")?>><?php echo html::select("statuses[$taskID]", $statusList, $tasks[$taskID]->status, "class='form-control'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'estStarted', "class='hidden'")?>><?php echo html::input("estStarteds[$taskID]", $tasks[$taskID]->estStarted, "class='form-control text-center form-date'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'deadline', "class='hidden'")?>><?php echo html::input("deadlines[$taskID]", $tasks[$taskID]->deadline, "class='form-control text-center form-date'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'pri', "class='hidden'")?>><?php echo html::select("pris[$taskID]", $priList, $tasks[$taskID]->pri, "class='form-control'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'estStarted', "class='hidden'")?>><?php echo html::input("estStarteds[$taskID]", helper::isZeroDate($tasks[$taskID]->estStarted) ? '' : $tasks[$taskID]->estStarted, "class='form-control text-center form-date'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'deadline', "class='hidden'")?>><?php echo html::input("deadlines[$taskID]", helper::isZeroDate($tasks[$taskID]->deadline) ? '' : $tasks[$taskID]->deadline, "class='form-control text-center form-date'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'pri', "class='hidden'")?>><?php echo html::select("pris[$taskID]", $priList, $tasks[$taskID]->pri, "class='form-control'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'estimate', "class='hidden'")?>><?php echo html::input("estimates[$taskID]", $tasks[$taskID]->estimate, "class='form-control text-center' {$disableHour}");?></td>
|
||||
<td <?php echo zget($visibleFields, 'record', "class='hidden'")?>><?php echo html::input("consumeds[$taskID]", '', "class='form-control text-center' {$disableHour}");?></td>
|
||||
<td <?php echo zget($visibleFields, 'left', "class='hidden'")?>><?php echo html::input("lefts[$taskID]", $tasks[$taskID]->left, "class='form-control text-center' {$disableHour}");?></td>
|
||||
<td <?php echo zget($visibleFields, 'left', "class='hidden'")?>><?php echo html::input("lefts[$taskID]", $tasks[$taskID]->left, "class='form-control text-center' {$disableHour}");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'finishedBy', ' hidden')?>' style='overflow:visible'><?php echo html::select("finishedBys[$taskID]", $members, $tasks[$taskID]->finishedBy, "class='form-control chosen'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'canceledBy', ' hidden')?>' style='overflow:visible'><?php echo html::select("canceledBys[$taskID]", $members, $tasks[$taskID]->canceledBy, "class='form-control chosen'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'closedBy', ' hidden')?>' style='overflow:visible'><?php echo html::select("closedBys[$taskID]", $members, $tasks[$taskID]->closedBy, "class='form-control chosen'");?></td>
|
||||
|
||||
@@ -85,7 +85,6 @@
|
||||
<?php echo html::select('story', array($task->story => empty($stories) ? '': $stories[$task->story]), $task->story, "class='form-control chosen' onchange='setStoryRelated();'");?>
|
||||
<span class='input-group-btn' id='preview'><a href='#' class='btn iframe'><?php echo $lang->preview;?></a></span>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -175,11 +175,11 @@
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='thWidth'><?php echo $lang->task->estStarted;?></th>
|
||||
<td><?php echo html::input('estStarted', $task->estStarted, "class='form-control form-date'");?></td>
|
||||
<td><?php echo html::input('estStarted', helper::isZeroDate($task->estStarted) ? '' : $task->estStarted, "class='form-control form-date'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->deadline;?></th>
|
||||
<td><?php echo html::input('deadline', $task->deadline, "class='form-control form-date'");?></td>
|
||||
<td><?php echo html::input('deadline', helper::isZeroDate($task->deadline) ? '' : $task->deadline, "class='form-control form-date'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->estimate;?></th>
|
||||
|
||||
Reference in New Issue
Block a user