Code Duplication    Length = 3-3 lines in 4 locations

themes/commons/commons_origins/template.php 4 locations

@@ 742-744 (lines=3) @@
739
  }
740
741
  // Make the "Save" button more noticeable.
742
  if (isset($variables['form']['#node_edit_form']) && $variables['form']['#node_edit_form']) {
743
    $variables['form']['actions']['submit']['#attributes']['class'][] = 'action-item-primary';
744
  }
745
746
  // Make the comment form "Save" button more noticeable.
747
  if ($variables['form']['#id'] == 'comment-form') {
@@ 747-749 (lines=3) @@
744
  }
745
746
  // Make the comment form "Save" button more noticeable.
747
  if ($variables['form']['#id'] == 'comment-form') {
748
    $variables['form']['actions']['submit']['#attributes']['class'][] = 'action-item-primary';
749
  }
750
751
  // Hide the label and make the search button primary.
752
  if (isset($variables['form']['#search_page']) || (isset($variables['form']['module']) && ($variables['form']['module']['#value'] == 'search_facetapi' || $variables['form']['module']['#value'] == 'user'))) {
@@ 770-772 (lines=3) @@
767
  // Make the links and buttons on the private message forms have the
768
  // appropriate styles.
769
  if ($variables['form']['#form_id'] == 'commons_trusted_contacts_messages_popup' || $variables['form']['#form_id'] == 'privatemsg_new') {
770
    if (isset($variables['form']['actions']['submit'])) {
771
      $variables['form']['actions']['submit']['#attributes']['class'][] = 'action-item-primary';
772
    }
773
    if (isset($variables['form']['actions']['full_form'])) {
774
      $variables['form']['actions']['full_form']['#attributes']['class'][] = 'action-item';
775
    }
@@ 773-775 (lines=3) @@
770
    if (isset($variables['form']['actions']['submit'])) {
771
      $variables['form']['actions']['submit']['#attributes']['class'][] = 'action-item-primary';
772
    }
773
    if (isset($variables['form']['actions']['full_form'])) {
774
      $variables['form']['actions']['full_form']['#attributes']['class'][] = 'action-item';
775
    }
776
    if (isset($variables['form']['actions']['cancel'])) {
777
      $variables['form']['actions']['cancel']['#attributes']['class'][] = 'action-item';
778
      $variables['form']['actions']['cancel']['#weight'] = $variables['form']['actions']['submit']['#weight'] + 1;