Skip to content

Commit

Permalink
Merge pull request #39 from tractorcow/pulls/fix-status
Browse files Browse the repository at this point in the history
BUG Fix dropdown not selecting correct status
  • Loading branch information
nyeholt committed May 11, 2015
2 parents 00141d1 + a1e47b0 commit d4d83e7
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions code/dataobjects/QueuedJobDescriptor.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,18 +161,19 @@ public function getCMSFields() {
QueuedJob::LARGE => 'Large'
))
);
$statuses = array(
QueuedJob::STATUS_NEW,
QueuedJob::STATUS_INIT,
QueuedJob::STATUS_RUN,
QueuedJob::STATUS_WAIT,
QueuedJob::STATUS_COMPLETE,
QueuedJob::STATUS_PAUSED,
QueuedJob::STATUS_CANCELLED,
QueuedJob::STATUS_BROKEN
);
$fields->replaceField(
'JobStatus',
new DropdownField('JobStatus', $this->fieldLabel('JobStatus'), array(
QueuedJob::STATUS_NEW,
QueuedJob::STATUS_INIT,
QueuedJob::STATUS_RUN,
QueuedJob::STATUS_WAIT,
QueuedJob::STATUS_COMPLETE,
QueuedJob::STATUS_PAUSED,
QueuedJob::STATUS_CANCELLED,
QueuedJob::STATUS_BROKEN
))
new DropdownField('JobStatus', $this->fieldLabel('JobStatus'), array_combine($statuses, $statuses))
);


Expand Down

0 comments on commit d4d83e7

Please sign in to comment.