You are here

public function EntityTranslationCommerceProductHandler::entityForm in Commerce Core 7

Tweaks the product form to support multilingual elements.

Overrides EntityTranslationDefaultHandler::entityForm

File

modules/product/includes/commerce_product.translation_handler.inc, line 39
Translation handler for the Commerce Product entity.

Class

EntityTranslationCommerceProductHandler
Commerce Product translation handler.

Code

public function entityForm(&$form, &$form_state) {
  parent::entityForm($form, $form_state);
  if (isset($form['change_history']['#weight'])) {
    $form['translation']['#weight'] = $form['change_history']['#weight'] - 0.01;
  }
  $form['actions']['delete_translation']['#suffix'] = $form['actions']['submit']['#suffix'];
  unset($form['actions']['submit']['#suffix']);
}