* Finish task #58554.
This commit is contained in:
@@ -675,14 +675,16 @@ class custom extends control
|
||||
$account = $this->app->user->account;
|
||||
if($this->server->request_method == 'POST')
|
||||
{
|
||||
$fields = $this->post->fields;
|
||||
$fields = $this->post->fields;
|
||||
if(is_array($fields)) $fields = join(',', $fields);
|
||||
$this->loadModel('setting')->setItem("$account.$module.$section.$key", $fields);
|
||||
if(in_array($module, array('task', 'bug', 'testcase', 'story')) and $section == 'custom' and in_array($key, array('createFields', 'batchCreateFields'))) return;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->loadModel('setting')->deleteItems("owner=$account&module=$module§ion=$section&key=$key");
|
||||
}
|
||||
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,31 @@ $(function()
|
||||
if($('th.c-name').width() < 200) $('th.c-name').width(200);
|
||||
if(taskConsumed > 0) bootbox.alert(addChildTask);
|
||||
$('#customField').on('click', function(){$('#tableBody .chosen-with-drop').removeClass('chosen-with-drop chosen-container-active')});
|
||||
|
||||
$('#customField').click(function()
|
||||
{
|
||||
disabledRequireFields();
|
||||
});
|
||||
|
||||
$('#formSettingForm .btn-primary').click(function()
|
||||
{
|
||||
$('#formSettingForm > .checkboxes > .checkbox-primary > input').removeAttr('disabled');
|
||||
var fields = '';
|
||||
$('#formSettingForm > .checkboxes > .checkbox-primary > input:checked').each(function()
|
||||
{
|
||||
fields += ',' + $(this).val();
|
||||
});
|
||||
|
||||
var link = createLink('custom', 'ajaxSaveCustomFields', 'module=task§ion=custom&key=batchCreateFields');
|
||||
$.post(link, {'fields' : fields}, function()
|
||||
{
|
||||
checkedShowFields(fields);
|
||||
disabledRequireFields();
|
||||
$('#formSetting').parent().removeClass('open');
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('change', "[name^='estStarted'], [name^='deadline']", function()
|
||||
|
||||
@@ -20,3 +20,63 @@ function setStoryModule()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checked show fields.
|
||||
*
|
||||
* @param string fields
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function checkedShowFields(fields)
|
||||
{
|
||||
var fieldList = ',' + fields + ',';
|
||||
$('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function()
|
||||
{
|
||||
var field = ',' + $(this).val() + ',';
|
||||
var $fieldBox = $('.' + $(this).val() + 'Box' );
|
||||
if(fieldList.indexOf(field) >= 0)
|
||||
{
|
||||
|
||||
$(this).attr('checked', true);
|
||||
$fieldBox.removeClass('hidden');
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!$fieldBox.hasClass('hidden')) $fieldBox.addClass('hidden');
|
||||
}
|
||||
});
|
||||
|
||||
if(config.currentMethod == 'create');
|
||||
{
|
||||
if(fieldList.indexOf(',estStarted,') >= 0 && fieldList.indexOf(',deadline,') >= 0)
|
||||
{
|
||||
$('.borderBox').removeClass('hidden');
|
||||
}
|
||||
else if(fieldList.indexOf(',estStarted,') >= 0 || fieldList.indexOf(',deadline,') >= 0)
|
||||
{
|
||||
$('.datePlanBox').removeClass('hidden');
|
||||
if(!$('.borderBox').hasClass('hidden')) $('.borderBox').addClass('hidden');
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!$('.borderBox').hasClass('hidden')) $('.borderBox').addClass('hidden');
|
||||
if(!$('.datePlanBox').hasClass('hidden')) $('.datePlanBox').addClass('hidden');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Disabled require field.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function disabledRequireFields()
|
||||
{
|
||||
$('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function()
|
||||
{
|
||||
var field = ',' + $(this).val() + ',';
|
||||
var required = ',' + requiredFields + ',';
|
||||
if(required.indexOf(field) >= 0) $(this).attr('disabled', 'disabled');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,3 +1,31 @@
|
||||
$(function()
|
||||
{
|
||||
$('#customField').click(function()
|
||||
{
|
||||
disabledRequireFields();
|
||||
});
|
||||
|
||||
$('#formSettingForm .btn-primary').click(function()
|
||||
{
|
||||
$('#formSettingForm > .checkboxes > .checkbox-primary > input').removeAttr('disabled');
|
||||
var fields = '';
|
||||
$('#formSettingForm > .checkboxes > .checkbox-primary > input:checked').each(function()
|
||||
{
|
||||
fields += ',' + $(this).val();
|
||||
});
|
||||
|
||||
var link = createLink('custom', 'ajaxSaveCustomFields', 'module=task§ion=custom&key=createFields');
|
||||
$.post(link, {'fields' : fields}, function()
|
||||
{
|
||||
checkedShowFields(fields);
|
||||
disabledRequireFields();
|
||||
$('#formSetting').parent().removeClass('open');
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
})
|
||||
|
||||
/**
|
||||
* Load module, stories and members.
|
||||
*
|
||||
|
||||
@@ -15,6 +15,26 @@
|
||||
<?php js::set('taskConsumed', $taskConsumed);?>
|
||||
<?php js::set('addChildTask', $lang->task->addChildTask);?>
|
||||
<?php js::set('isonlybody', isonlybody())?>
|
||||
<?php js::set('requiredFields', $config->task->create->requiredFields);?>
|
||||
<?php
|
||||
$visibleFields = array();
|
||||
$requiredFields = array();
|
||||
foreach(explode(',', $showFields) as $field)
|
||||
{
|
||||
if($field) $visibleFields[$field] = '';
|
||||
}
|
||||
|
||||
foreach(explode(',', $config->task->create->requiredFields) as $field)
|
||||
{
|
||||
if($field)
|
||||
{
|
||||
$requiredFields[$field] = '';
|
||||
if(strpos(",{$config->task->customBatchCreateFields},", ",{$field},") !== false) $visibleFields[$field] = '';
|
||||
}
|
||||
}
|
||||
$colspan = count($visibleFields) + 3;
|
||||
?>
|
||||
<?php js::set('showFields', $showFields);?>
|
||||
<div id="mainContent" class="main-content fade">
|
||||
<div class="main-header clearfix">
|
||||
<h2 class="pull-left">
|
||||
@@ -40,32 +60,15 @@
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$visibleFields = array();
|
||||
$requiredFields = array();
|
||||
foreach(explode(',', $showFields) as $field)
|
||||
{
|
||||
if($field)$visibleFields[$field] = '';
|
||||
}
|
||||
foreach(explode(',', $config->task->create->requiredFields) as $field)
|
||||
{
|
||||
if($field)
|
||||
{
|
||||
$requiredFields[$field] = '';
|
||||
if(strpos(",{$config->task->customBatchCreateFields},", ",{$field},") !== false) $visibleFields[$field] = '';
|
||||
}
|
||||
}
|
||||
$colspan = count($visibleFields) + 3;
|
||||
?>
|
||||
<form method='post' class='batch-actions-form' target='hiddenwin' enctype='multipart/form-data' id="batchCreateForm">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-form" id="tableBody">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='c-id'><?php echo $lang->idAB;?></th>
|
||||
<th class='c-module<?php echo zget($visibleFields, 'module', ' hidden') . zget($requiredFields, 'module', '', ' required');?>'><?php echo $lang->task->module?></th>
|
||||
<th class='c-module<?php echo zget($visibleFields, 'module', ' hidden') . zget($requiredFields, 'module', '', ' required');?> moduleBox'><?php echo $lang->task->module?></th>
|
||||
<?php if($execution->type != 'ops'):?>
|
||||
<th class='c-story<?php echo zget($visibleFields, 'story', ' hidden') . zget($requiredFields, 'story', '', ' required');?>'><?php echo $lang->task->story;?></th>
|
||||
<th class='c-story<?php echo zget($visibleFields, 'story', ' hidden') . zget($requiredFields, 'story', '', ' required');?> storyBox'><?php echo $lang->task->story;?></th>
|
||||
<?php endif;?>
|
||||
<th class='c-name required has-btn'><?php echo $lang->task->name;?></span></th>
|
||||
<?php if($execution->type == 'kanban'):?>
|
||||
@@ -73,12 +76,12 @@
|
||||
<th class='c-module'><?php echo $lang->kanbancard->lane;?></th>
|
||||
<?php endif;?>
|
||||
<th class='c-type required'><?php echo $lang->typeAB;?></span></th>
|
||||
<th class='c-assigned<?php echo zget($visibleFields, 'assignedTo', ' hidden') . zget($requiredFields, 'assignedTo', '', ' required');?>'><?php echo $lang->task->assignedTo;?></th>
|
||||
<th class='c-estimate<?php echo zget($visibleFields, 'estimate', ' hidden') . zget($requiredFields, 'estimate', '', ' required');?>'><?php echo $lang->task->estimateAB;?></th>
|
||||
<th class='c-date<?php echo zget($visibleFields, 'estStarted', ' hidden') . zget($requiredFields, 'estStarted', '', ' required');?>'><?php echo $lang->task->estStarted;?></th>
|
||||
<th class='c-date<?php echo zget($visibleFields, 'deadline', ' hidden') . zget($requiredFields, 'deadline', '', ' required');?>'><?php echo $lang->task->deadline;?></th>
|
||||
<th class='c-desc<?php echo zget($visibleFields, 'desc', ' hidden') . zget($requiredFields, 'desc', '', ' required');?>'><?php echo $lang->task->desc;?></th>
|
||||
<th class='c-pri<?php echo zget($visibleFields, 'pri', ' hidden') . zget($requiredFields, 'pri', '', ' required');?>'><?php echo $lang->task->pri;?></th>
|
||||
<th class='c-assigned<?php echo zget($visibleFields, 'assignedTo', ' hidden') . zget($requiredFields, 'assignedTo', '', ' required');?> assignedToBox'><?php echo $lang->task->assignedTo;?></th>
|
||||
<th class='c-estimate<?php echo zget($visibleFields, 'estimate', ' hidden') . zget($requiredFields, 'estimate', '', ' required');?> estimateBox'><?php echo $lang->task->estimateAB;?></th>
|
||||
<th class='c-date<?php echo zget($visibleFields, 'estStarted', ' hidden') . zget($requiredFields, 'estStarted', '', ' required');?> estStartedBox'><?php echo $lang->task->estStarted;?></th>
|
||||
<th class='c-date<?php echo zget($visibleFields, 'deadline', ' hidden') . zget($requiredFields, 'deadline', '', ' required');?> deadlineBox'><?php echo $lang->task->deadline;?></th>
|
||||
<th class='c-desc<?php echo zget($visibleFields, 'desc', ' hidden') . zget($requiredFields, 'desc', '', ' required');?> descBox'><?php echo $lang->task->desc;?></th>
|
||||
<th class='c-pri<?php echo zget($visibleFields, 'pri', ' hidden') . zget($requiredFields, 'pri', '', ' required');?> priBox'><?php echo $lang->task->pri;?></th>
|
||||
<?php
|
||||
$extendFields = $this->task->getFlowExtendFields();
|
||||
foreach($extendFields as $extendField)
|
||||
@@ -113,12 +116,12 @@
|
||||
<?php $pri = 3;?>
|
||||
<tr>
|
||||
<td class='text-center'><?php echo $i;?></td>
|
||||
<td <?php echo zget($visibleFields, 'module', "class='hidden'")?> style='overflow:visible'>
|
||||
<td class="<?php echo zget($visibleFields, 'module', 'hidden')?> moduleBox" style='overflow:visible'>
|
||||
<?php echo html::select("module[$i]", $modules, $moduleID, "class='form-control chosen'")?>
|
||||
<?php echo html::hidden("parent[$i]", $parent);?>
|
||||
</td>
|
||||
<?php if($execution->type != 'ops'):?>
|
||||
<td <?php echo zget($visibleFields, 'story', "class='hidden'");?> style='overflow: visible'>
|
||||
<td class="<?php echo zget($visibleFields, 'story', 'hidden');?> storyBox" style='overflow: visible'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select("story[$i]", $stories, $currentStory, "class='form-control chosen' onchange='setStoryRelated($i)'");?>
|
||||
<span class='input-group-btn'>
|
||||
@@ -146,9 +149,9 @@
|
||||
<td><?php echo html::select("lanes[$i]", $lanePairs, $laneID, "class='form-control chosen'");?></td>
|
||||
<?php endif;?>
|
||||
<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'")?>>
|
||||
<td class="<?php echo zget($visibleFields, 'assignedTo', 'hidden')?> assignedToBox" style='overflow:visible'><?php echo html::select("assignedTo[$i]", $members, $member, "class='form-control chosen'");?></td>
|
||||
<td class="<?php echo zget($visibleFields, 'estimate', 'hidden')?> estimateBox"><?php echo html::input("estimate[$i]", '', "class='form-control text-center'");?></td>
|
||||
<td class="<?php echo zget($visibleFields, 'estStarted', 'hidden')?> estStartedBox">
|
||||
<div class='input-group'>
|
||||
<?php
|
||||
echo html::input("estStarted[$i]", '', "class='form-control text-center form-date' onkeyup='toggleCheck(this)'");
|
||||
@@ -156,7 +159,7 @@
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
<td <?php echo zget($visibleFields, 'deadline', "class='hidden'")?>>
|
||||
<td class="<?php echo zget($visibleFields, 'deadline', 'hidden')?> deadlineBox">
|
||||
<div class='input-group'>
|
||||
<?php
|
||||
echo html::input("deadline[$i]", '', "class='form-control text-center form-date' onkeyup='toggleCheck(this)'");
|
||||
@@ -164,8 +167,8 @@
|
||||
?>
|
||||
</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>
|
||||
<td class="<?php echo zget($visibleFields, 'desc', 'hidden')?> descBox"><?php echo html::textarea("desc[$i]", '', "rows='1' class='form-control autosize'");?></td>
|
||||
<td class="<?php echo zget($visibleFields, 'pri', 'hidden')?> priBox"><?php echo html::select("pri[$i]", (array)$lang->task->priList, $pri, 'class=form-control');?></td>
|
||||
<?php
|
||||
$this->loadModel('flow');
|
||||
foreach($extendFields as $extendField) echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[$i]") . "</td>";
|
||||
@@ -189,11 +192,11 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class='text-center'>%s</td>
|
||||
<td <?php echo zget($visibleFields, 'module', "class='hidden'")?> style='overflow:visible'>
|
||||
<td class="<?php echo zget($visibleFields, 'module', 'hidden')?> moduleBox" style='overflow:visible'>
|
||||
<?php echo html::select("module[%s]", $modules, $moduleID, "class='form-control chosen' onchange='setStories(this.value, $execution->id, \"%s\")'")?>
|
||||
<?php echo html::hidden("parent[%s]", $parent);?>
|
||||
</td>
|
||||
<td <?php echo zget($visibleFields, 'story', "class='hidden'");?> style='overflow: visible'>
|
||||
<td class="<?php echo zget($visibleFields, 'story', 'hidden');?> storyBox" style='overflow: visible'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select("story[%s]", $stories, $currentStory, "class='form-control chosen' onchange='setStoryRelated(\"%s\")'");?>
|
||||
<span class='input-group-btn'>
|
||||
@@ -216,9 +219,9 @@
|
||||
</div>
|
||||
</td>
|
||||
<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'")?>>
|
||||
<td class="<?php echo zget($visibleFields, 'assignedTo', 'hidden')?> assignedToBox" style='overflow:visible'><?php echo html::select("assignedTo[%s]", $members, $member, "class='form-control chosen'");?></td>
|
||||
<td class="<?php echo zget($visibleFields, 'estimate', 'hidden')?> estimateBox"><?php echo html::input("estimate[%s]", '', "class='form-control text-center'");?></td>
|
||||
<td class="<?php echo zget($visibleFields, 'estStarted', 'hidden')?> estStartedBox">
|
||||
<div class='input-group'>
|
||||
<?php
|
||||
echo html::input("estStarted[%s]", '', "class='form-control text-center form-date' onkeyup='toggleCheck(this)'");
|
||||
@@ -226,15 +229,15 @@
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
<td <?php echo zget($visibleFields, 'deadline', "class='hidden'")?>>
|
||||
<td class="<?php echo zget($visibleFields, 'deadline', 'hidden')?> deadlineBox">
|
||||
<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>
|
||||
<td class="<?php echo zget($visibleFields, 'desc', 'hidden')?> descBox"><?php echo html::textarea("desc[%s]", '', "rows='1' class='form-control autosize'");?></td>
|
||||
<td class="<?php echo zget($visibleFields, 'pri', 'hidden')?> priBox"><?php echo html::select("pri[%s]", (array)$lang->task->priList, $pri, 'class=form-control');?></td>
|
||||
<?php
|
||||
$this->loadModel('flow');
|
||||
foreach($extendFields as $extendField) echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[%s]") . "</td>";
|
||||
|
||||
@@ -17,9 +17,17 @@
|
||||
<?php js::set('blockID', $blockID);?>
|
||||
<?php js::set('teamMemberError', $lang->task->error->teamMember);?>
|
||||
<?php js::set('vision', $config->vision);?>
|
||||
<?php js::set('requiredFields', $config->task->create->requiredFields);?>
|
||||
<?php if(!empty($storyID)):?>
|
||||
<style> .title-group.required > .required:after {right: 110px;}</style>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
foreach(explode(',', $config->task->create->requiredFields) as $field)
|
||||
{
|
||||
if($field and strpos($showFields, $field) === false) $showFields .= ',' . $field;
|
||||
}
|
||||
?>
|
||||
<?php js::set('showFields', $showFields);?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
@@ -29,12 +37,6 @@
|
||||
<?php include '../../common/view/customfield.html.php';?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
foreach(explode(',', $config->task->create->requiredFields) as $field)
|
||||
{
|
||||
if($field and strpos($showFields, $field) === false) $showFields .= ',' . $field;
|
||||
}
|
||||
?>
|
||||
<form class='main-form form-ajax' method='post' enctype='multipart/form-data' id='dataform'>
|
||||
<table class='table table-form'>
|
||||
<?php if($execution->type != 'kanban' or $this->config->vision == 'lite'):?>
|
||||
@@ -97,8 +99,8 @@
|
||||
<td><?php echo html::hidden('status', 'wait');?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields('', 'table', 'columns=3');?>
|
||||
<?php if(strpos(",$showFields,", ',story,') !== false and $execution->lifetime != 'ops'):?>
|
||||
<tr>
|
||||
<?php $hiddenStory = (strpos(",$showFields,", ',story,') !== false and $execution->lifetime != 'ops') ? '' : 'hidden'?>
|
||||
<tr class="<?php echo $hiddenStory?> storyBox">
|
||||
<th><?php echo $lang->task->story;?></th>
|
||||
<td colspan='3'>
|
||||
<span id='storyBox' class="<?php if(!empty($stories)) echo 'hidden';?> "><?php printf($lang->task->noticeLinkStory, html::a($this->createLink('execution', 'linkStory', "executionID=$execution->id"), $lang->execution->linkStory, '', 'class="text-primary"'), html::a("javascript:loadStories($execution->id)", $lang->refresh, '', 'class="text-primary"'));?></span>
|
||||
@@ -110,7 +112,6 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if($execution->type != 'ops'):?>
|
||||
<tr id='testStoryBox' class='hidden'>
|
||||
<th><?php echo $lang->task->selectTestStory;?></th>
|
||||
@@ -174,8 +175,8 @@
|
||||
<a href='javascript:copyStoryTitle();' id='copyButton' class='input-control-icon-right'><?php echo $lang->task->copyStoryTitle;?></a>
|
||||
<?php echo html::hidden("storyEstimate") . html::hidden("storyDesc") . html::hidden("storyPri");?>
|
||||
</div>
|
||||
<?php if(strpos(",$showFields,", ',pri,') !== false): // begin print pri selector?>
|
||||
<span class="input-group-addon fix-border br-0"><?php echo $lang->task->pri;?></span>
|
||||
<?php $hiddenPri = strpos(",$showFields,", ',pri,') !== false ? '' : 'hidden'; // begin print pri selector?>
|
||||
<span class="input-group-addon fix-border br-0 <?php echo $hiddenPri;?> priBox"><?php echo $lang->task->pri;?></span>
|
||||
<?php
|
||||
$hasCustomPri = false;
|
||||
foreach($lang->task->priList as $priKey => $priValue)
|
||||
@@ -195,9 +196,9 @@
|
||||
}
|
||||
?>
|
||||
<?php if($hasCustomPri):?>
|
||||
<?php echo html::select('pri', (array)$priList, $task->pri, "class='form-control'");?>
|
||||
<?php echo html::select('pri', (array)$priList, $task->pri, "class='form-control $hiddenPri'");?>
|
||||
<?php else: ?>
|
||||
<div class="input-group-btn pri-selector" data-type="pri">
|
||||
<div class="input-group-btn pri-selector <?php echo $hiddenPri;?> priBox" data-type="pri">
|
||||
<button type="button" class="btn dropdown-toggle br-0" data-toggle="dropdown">
|
||||
<span class="pri-text"><span class="label-pri label-pri-<?php echo empty($task->pri) ? '0' : $task->pri?>" title="<?php echo $task->pri?>"><?php echo $task->pri?></span></span> <span class="caret"></span>
|
||||
</button>
|
||||
@@ -206,15 +207,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; // end print pri selector ?>
|
||||
<?php if(strpos(",$showFields,", ',estimate,') !== false):?>
|
||||
<div class='table-col w-120px'>
|
||||
<?php $hiddenEstimate = strpos(",$showFields,", ',estimate,') !== false ? '' : 'hidden';?>
|
||||
<div class="table-col w-120px <?php echo $hiddenEstimate;?> estimateBox">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon fix-border br-0"><?php echo $lang->task->estimateAB;?></span>
|
||||
<input type="text" name="estimate" id="estimate" value="<?php echo $task->estimate;?>" class="form-control" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@@ -231,29 +230,23 @@
|
||||
<td colspan='3'><?php echo $this->fetch('file', 'buildform');?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$hiddenEstStarted = strpos(",$showFields,", ',estStarted,') === false;
|
||||
$hiddenDeadline = strpos(",$showFields,", ',deadline,') === false;
|
||||
$hiddenEstStarted = strpos(",$showFields,", ',estStarted,') === false ? 'hidden' : '';
|
||||
$hiddenDeadline = strpos(",$showFields,", ',deadline,') === false ? 'hidden' : '';
|
||||
$hiddenDatePlan = (!$hiddenEstStarted or !$hiddenDeadline) ? '' : 'hidden';
|
||||
?>
|
||||
<?php if(!$hiddenEstStarted or !$hiddenDeadline):?>
|
||||
<tr>
|
||||
<tr class="<?php echo $hiddenDatePlan?> datePlanBox">
|
||||
<th><?php echo $lang->task->datePlan;?></th>
|
||||
<td colspan='2'>
|
||||
<div class='input-group'>
|
||||
<?php if(!$hiddenEstStarted):?>
|
||||
<?php echo html::input('estStarted', $task->estStarted, "class='form-control form-date' placeholder='{$lang->task->estStarted}'");?>
|
||||
<?php endif;?>
|
||||
<?php if(!$hiddenEstStarted and !$hiddenDeadline):?>
|
||||
<span class='input-group-addon fix-border'>~</span>
|
||||
<?php endif;?>
|
||||
<?php if(!$hiddenDeadline):?>
|
||||
<?php echo html::input('deadline', $task->deadline, "class='form-control form-date' placeholder='{$lang->task->deadline}'");?>
|
||||
<?php endif;?>
|
||||
<?php echo html::input('estStarted', $task->estStarted, "class='form-control form-date $hiddenEstStarted estStartedBox' placeholder='{$lang->task->estStarted}'");?>
|
||||
<?php $hiddenborder = (!$hiddenEstStarted and !$hiddenDeadline) ? '' : 'hidden';?>
|
||||
<span class="input-group-addon fix-border <?php echo $hiddenborder?> borderBox">~</span>
|
||||
<?php echo html::input('deadline', $task->deadline, "class='form-control form-date $hiddenDeadline deadlineBox' placeholder='{$lang->task->deadline}'");?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if(strpos(",$showFields,", ',mailto,') !== false):?>
|
||||
<tr>
|
||||
<?php $hiddenMailto = strpos(",$showFields,", ',mailto,') !== false ? '' : 'hidden';?>
|
||||
<tr class="<?php echo $hiddenMailto?> mailtoBox">
|
||||
<th><?php echo $lang->story->mailto;?></th>
|
||||
<td colspan='3'>
|
||||
<div class="input-group">
|
||||
@@ -262,7 +255,6 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<tr id='after-tr'>
|
||||
<th><?php echo $lang->task->afterSubmit;?></th>
|
||||
|
||||
Reference in New Issue
Block a user