You are here

function mlpanels_form_alter in Multilingual Panels 7

Implements hook_form_alter().

File

./mlpanels.module, line 64
Multilingual panels.

Code

function mlpanels_form_alter(&$form, $form_state, $form_id) {
  if (!empty($form_state['form_info']) && !empty($form_state['form_info']['untranslate text'])) {
    $form['buttons']['untranslate'] = array(
      '#type' => 'button',
      '#value' => $form_state['form_info']['untranslate text'],
      '#wizard type' => 'untranslate',
      '#attributes' => array(
        'style' => !empty($form_state['form_info']['untranslate hidden']) ? 'display:none;' : '',
        'class' => array(
          'pane-untranslate',
        ),
      ),
    );
  }
}