* Fix bug #27871.
This commit is contained in:
@@ -2899,9 +2899,10 @@ class taskModel extends model
|
||||
$estimate = fixer::input('post')->cleanINT('consumed,left')->get();
|
||||
$today = helper::today();
|
||||
|
||||
if($estimate->date > $today) return dao::$errors[] = $this->lang->task->error->date;
|
||||
if($estimate->consumed <= 0) return dao::$errors[] = sprintf($this->lang->error->gt, $this->lang->task->record, '0');
|
||||
if($estimate->left < 0) return dao::$errors[] = sprintf($this->lang->error->ge, $this->lang->task->left, '0');
|
||||
if(helper::isZeroDate($estimate->date)) return dao::$errors[] = $this->lang->task->error->dateEmpty;
|
||||
if($estimate->date > $today) return dao::$errors[] = $this->lang->task->error->date;
|
||||
if($estimate->consumed <= 0) return dao::$errors[] = sprintf($this->lang->error->gt, $this->lang->task->record, '0');
|
||||
if($estimate->left < 0) return dao::$errors[] = sprintf($this->lang->error->ge, $this->lang->task->left, '0');
|
||||
|
||||
$task = $this->getById($oldEstimate->objectID);
|
||||
$this->dao->update(TABLE_EFFORT)->data($estimate)
|
||||
|
||||
@@ -23,12 +23,12 @@
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->task->date;?></th>
|
||||
<td class='w-p45'><?php echo html::input('date', $estimate->date, 'class="form-control form-date"');?></td>
|
||||
<td class='w-p45 required'><?php echo html::input('date', $estimate->date, 'class="form-control form-date"');?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->record;?></th>
|
||||
<td><?php echo html::input('consumed', $estimate->consumed, 'class="form-control"');?></td>
|
||||
<td class='required'><?php echo html::input('consumed', $estimate->consumed, 'class="form-control"');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->left;?></th>
|
||||
@@ -57,7 +57,8 @@ $(function()
|
||||
|
||||
var $this = $(this);
|
||||
var $left = $('#left');
|
||||
if(!$left.prop('readonly') && $left.val() === '0')
|
||||
var left = $.trim($left.val());
|
||||
if(!$left.prop('readonly') && left == 0)
|
||||
{
|
||||
e.preventDefault();
|
||||
bootbox.confirm(confirmRecord, function(result)
|
||||
|
||||
Reference in New Issue
Block a user