function boxes_form_block_admin_configure_alter in Boxes 6
Same name and namespace in other branches
- 7 boxes.module \boxes_form_block_admin_configure_alter()
Implementation of hook_form_alter for block_admin_configure.
File
- ./
boxes.module, line 335
Code
function boxes_form_block_admin_configure_alter(&$form, &$form_state) {
if ($form['module']['#value'] == 'boxes') {
$box = boxes_load($form['delta']['#value']);
if ($box->export_type & EXPORT_IN_DATABASE && $box->export_type & EXPORT_IN_CODE) {
$form['revert'] = array(
'#type' => 'submit',
'#value' => t('Revert'),
'#submit' => array(
'boxes_block_delete_submit',
),
);
}
elseif (!($box->export_type & EXPORT_IN_CODE)) {
$form['delete'] = array(
'#type' => 'submit',
'#value' => t('Delete'),
'#submit' => array(
'boxes_block_delete_submit',
),
);
}
}
}