diff --git a/src/Entity/JobItem.php b/src/Entity/JobItem.php index 09149b4..42f02f3 100644 --- a/src/Entity/JobItem.php +++ b/src/Entity/JobItem.php @@ -576,7 +576,7 @@ class JobItem extends ContentEntityBase implements JobItemInterface { */ public function isAbortable() { if ($this->isActive() || $this->isNeedsReview()) { - return $this->isActive(); + return TRUE; } else { return FALSE; diff --git a/src/Form/JobItemForm.php b/src/Form/JobItemForm.php index 91ec8f0..b9ffa21 100644 --- a/src/Form/JobItemForm.php +++ b/src/Form/JobItemForm.php @@ -167,7 +167,7 @@ class JobItemForm extends TmgmtFormBase { // Add the form actions as well. $actions['abort_job_item'] = array( '#type' => 'submit', - '#value' => t('Abort Item'), + '#value' => t('Abort'), '#redirect' => 'admin/tmgmt/items/' . $item->id() . '/abort', '#submit' => array('tmgmt_submit_redirect'), '#access' => $item->isAbortable(), diff --git a/src/Tests/TMGMTUiTest.php b/src/Tests/TMGMTUiTest.php index 32b11e0..79f7f92 100644 --- a/src/Tests/TMGMTUiTest.php +++ b/src/Tests/TMGMTUiTest.php @@ -354,7 +354,7 @@ class TMGMTUiTest extends EntityTestBase { ))); $end_rows = $this->xpath('//tbody/tr'); $this->assertEqual(count($end_rows), 4); - $this->drupalPostForm('admin/tmgmt/items/' . $item4->id(), array(), t('Abort Item')); + $this->drupalPostForm('admin/tmgmt/items/' . $item4->id(), array(), t('Abort')); $this->drupalPostForm(NULL, array(), t('Confirm')); }