You are here

function delta_layout_delete in Delta 7.2

delta_template_configure function.

@access public

Parameters

mixed $form:

mixed &$form_state:

mixed $layout. (default: FALSE):

Return value

void

1 string reference to 'delta_layout_delete'
delta_ui_menu in ./delta_ui.module
Implementation of hook_menu().

File

./delta_ui.admin.inc, line 289
Delta UI functionality

Code

function delta_layout_delete($form, &$form_state, $layout = FALSE) {
  if ($layout) {
    $data = delta_get_layout_data($layout);
    drupal_set_title(t('Deleting ' . $data['name']));
  }
  if (isset($data['theme'])) {
    $form = array();
    $form['tid'] = array(
      '#type' => 'value',
      '#value' => isset($data['tid']) ? $data['tid'] : NULL,
    );
    $form['template_delete'] = array(
      '#markup' => '<p><strong>WARNING:</strong> Deleting this theme settings layout will immediately make it unavailable.</p>',
    );
    $form['#submit'] = array(
      'delta_ui_layout_delete_submit',
    );
    $form['actions'] = array(
      '#type' => 'actions',
    );
    $form['actions']['submit'] = array(
      '#type' => 'submit',
      '#value' => t('Delete Layout'),
    );
    return $form;
  }
  return 'Error Loading Theme Settings form...';
}