#372400 by swentel and BrightLoudNoise: Fix 'delete' link on block administration screen.

merge-requests/26/head
Angie Byron 2009-02-11 03:38:46 +00:00
parent 295feb1db4
commit 7addef299c
2 changed files with 2 additions and 1 deletions

View File

@ -80,7 +80,7 @@ function block_admin_display_form(&$form_state, $blocks, $theme = NULL) {
); );
if ($block['module'] == 'block') { if ($block['module'] == 'block') {
$form[$key]['delete'] = array( $form[$key]['delete'] = array(
'#value' => l(t('delete'), '#markup' => l(t('delete'),
'admin/build/block/delete/' . $block['delta']), 'admin/build/block/delete/' . $block['delta']),
); );
} }

View File

@ -54,6 +54,7 @@ class BlockTestCase extends DrupalWebTestCase {
} }
// Delete the created box & verify that it's been deleted and no longer appearing on the page. // Delete the created box & verify that it's been deleted and no longer appearing on the page.
$this->clickLink(t('delete'));
$this->drupalPost('admin/build/block/delete/' . $bid, array(), t('Delete')); $this->drupalPost('admin/build/block/delete/' . $bid, array(), t('Delete'));
$this->assertRaw(t('The block %title has been removed.', array('%title' => $box['info'])), t('Box successfully deleted.')); $this->assertRaw(t('The block %title has been removed.', array('%title' => $box['info'])), t('Box successfully deleted.'));
$this->assertNoText(t($box['title']), t('Box no longer appears on page.')); $this->assertNoText(t($box['title']), t('Box no longer appears on page.'));