You are here

function socialbase_form_social_post_entity_form_alter in Open Social 8.6

Same name and namespace in other branches
  1. 8.9 themes/socialbase/includes/form.inc \socialbase_form_social_post_entity_form_alter()
  2. 8 themes/socialbase/includes/form.inc \socialbase_form_social_post_entity_form_alter()
  3. 8.2 themes/socialbase/includes/form.inc \socialbase_form_social_post_entity_form_alter()
  4. 8.3 themes/socialbase/includes/form.inc \socialbase_form_social_post_entity_form_alter()
  5. 8.4 themes/socialbase/includes/form.inc \socialbase_form_social_post_entity_form_alter()
  6. 8.5 themes/socialbase/includes/form.inc \socialbase_form_social_post_entity_form_alter()
  7. 8.7 themes/socialbase/includes/form.inc \socialbase_form_social_post_entity_form_alter()
  8. 8.8 themes/socialbase/includes/form.inc \socialbase_form_social_post_entity_form_alter()

Implements hook_form_FORM_ID_alter().

File

themes/socialbase/includes/form.inc, line 135
The form inc file for the Social base theme.

Code

function socialbase_form_social_post_entity_form_alter(&$form, FormStateInterface $form_state, $form_id) {
  $form['actions']['#inline'] = TRUE;
  $form['field_visibility']['#inline'] = TRUE;

  // Give the `delete` button correct classes.
  if (isset($form['actions']['delete']['#type']) && $form['actions']['delete']['#type'] == 'link') {
    $form['actions']['delete']['#attributes']['class'][] = 'btn btn-flat';
  }
}