* Fix bug #17208.
This commit is contained in:
@@ -648,7 +648,7 @@ function toggleProgram(obj)
|
||||
$programs.attr('disabled', 'disabled');
|
||||
$('.programStatus').show();
|
||||
$('#programStatus').val('wait');
|
||||
$('#programStatus').removeAttr('disabled').trigger("chosen:updated");
|
||||
$('#programStatus').trigger("chosen:updated");
|
||||
|
||||
$('form #newProject0').prop('checked', true);
|
||||
$('form #newLine0').prop('checked', true);
|
||||
@@ -660,7 +660,6 @@ function toggleProgram(obj)
|
||||
$('form .pgm-exist').removeClass('hidden');
|
||||
$('form .pgm-no-exist').addClass('hidden');
|
||||
$('.programStatus').hide();
|
||||
$('#programStatus').attr('disabled', 'disabled');
|
||||
|
||||
if(!$('#newProgram0').prop('disabled'))
|
||||
{
|
||||
|
||||
@@ -4369,6 +4369,12 @@ class upgradeModel extends model
|
||||
$this->loadModel('action')->create('program', $programID, 'openedbysystem');
|
||||
if($data->programStatus == 'closed') $this->loadModel('action')->create('program', $programID, 'closedbysystem');
|
||||
}
|
||||
else
|
||||
{
|
||||
$programID = $data->programID ? $data->programID : $data->programs;
|
||||
$this->dao->update(TABLE_PROGRAM)->set('status')->eq($data->programStatus)->where('id')->eq($programID)->exec();
|
||||
if($data->programStatus == 'closed') $this->loadModel('action')->create('program', $programID, 'openedbysystem');
|
||||
}
|
||||
|
||||
if(isset($data->newLine))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user