Browse Source

reverted node form columns du to scroll bug
http://studio.g-u-i.net/en/materio/node/1535

Bachir Soussi Chiadmi 7 years ago
parent
commit
7011e6c691

+ 3 - 3
sites/all/modules/contrib/admin/nodeformcols/nfcbiblio.info

@@ -5,9 +5,9 @@ dependencies[] = biblio
 core = 7.x
 package = Node form columns
 
-; Information added by Drupal.org packaging script on 2016-09-16
-version = "7.x-1.1"
+; Information added by Drupal.org packaging script on 2014-01-15
+version = "7.x-1.0"
 core = "7.x"
 project = "nodeformcols"
-datestamp = "1474036440"
+datestamp = "1389798806"
 

+ 3 - 3
sites/all/modules/contrib/admin/nodeformcols/nfcbiblio.module

@@ -19,7 +19,7 @@ function nfcbiblio_nodeformcols_variants_alter(&$variants, $type) {
       WHERE tid >= :tid
         AND visible = :visible
       ORDER BY weight ASC', array(':tid' => 0, ':visible' => 1));
-    while ($option = $res->fetchObject()) {
+    while ($option = db_fetch_object($res)) {
       $variants[$option->tid] = $option->name;
     }
   }
@@ -35,8 +35,8 @@ function _nfcbiblio_top_visible_type() {
   return db_query_range("SELECT tid
     FROM {biblio_types}
     WHERE visible = :visible
-    AND tid >= :tid
-    ORDER BY weight ASC", 0, 1, array(':visible' => 1, ':tid' => 0))->fetchField();
+      AND tid> = :tid>
+    ORDER BY weight ASC", array(':visible' => 1, ':tid>' => 0))->fetchField();
 }
 
 /**

+ 3 - 3
sites/all/modules/contrib/admin/nodeformcols/nfccaptcha.info

@@ -5,9 +5,9 @@ dependencies[] = captcha
 core = 7.x
 package = Node form columns
 
-; Information added by Drupal.org packaging script on 2016-09-16
-version = "7.x-1.1"
+; Information added by Drupal.org packaging script on 2014-01-15
+version = "7.x-1.0"
 core = "7.x"
 project = "nodeformcols"
-datestamp = "1474036440"
+datestamp = "1389798806"
 

+ 2 - 18
sites/all/modules/contrib/admin/nodeformcols/nodeformcols.admin.inc

@@ -21,20 +21,6 @@ function _nodeformcols_get_node_type_form($type) {
   );
   $fs += form_state_defaults();
   $nf = drupal_retrieve_form($nfid, $fs);
-  // Add in field_groups if they exist.
-  if (module_exists('field_group') && !empty($nf['#groups'])) {
-    foreach ($nf['#groups'] as $group) {
-      $group_title = $group->label . ' (' . t('Field group') . ')';
-      $nf[$group->group_name] = array(
-        '#group'  =>  $group,
-        '#weight' =>  $group->weight,
-        '#title'  =>  $group_title,
-      );
-      foreach ($nf['#groups'][$group->group_name]->children as $group_field) {
-        unset($nf[$group_field]);
-      }
-    }
-  }
   drupal_prepare_form($nfid, $nf, $fs);
   drupal_process_form($nfid, $nf, $fs);
   return $nf;
@@ -49,10 +35,8 @@ function nodeformcols_update_placements($type, $variant, &$placements) {
     $field = $form[$key];
     if (
       substr($key, 0, 8) == 'section_' ||
-      // Exclude hidden fields.
       (isset($field['#type']) && in_array($field['#type'], array('value', 'hidden', 'token'))) ||
-      // Exclude the vertical tabs.
-      (isset($field['#group']) && $field['#group'] == 'additional_settings')
+      (isset($field['#type'], $field['#group']) && $field['#type'] === 'fieldset')
     ) {
       // Remove placements that meet exclusion rules.
       if (isset($placements[$key])) {
@@ -144,7 +128,7 @@ function nodeformcols_configuration_form($form, $form_state, $node_type, $varian
     $form['variant'] = array(
       '#type' => 'item',
       '#title' => t('Select a form variant'),
-      '#markup' => theme('links', array('links' => $variant_links)),
+      '#value' => theme('links', array('links' => $variant_links)),
     );
   }
 

+ 3 - 3
sites/all/modules/contrib/admin/nodeformcols/nodeformcols.info

@@ -3,9 +3,9 @@ description = Separates the node forms into two columns and a footer.
 core = 7.x
 package = Node form columns
 
-; Information added by Drupal.org packaging script on 2016-09-16
-version = "7.x-1.1"
+; Information added by Drupal.org packaging script on 2014-01-15
+version = "7.x-1.0"
 core = "7.x"
 project = "nodeformcols"
-datestamp = "1474036440"
+datestamp = "1389798806"
 

+ 3 - 3
sites/all/modules/contrib/admin/nodeformcols/nodeformcols.module

@@ -160,8 +160,8 @@ function template_preprocess_node_form(&$aVars) {
     }
   }
 
-  foreach ($regions as $name => $data) {
-    if (!empty($has_elements[$name])) {
+  foreach ($has_elements as $name => $has) {
+    if ($has) {
       $class[] = 'node-form-has-region-' . $name;
       $form['nodeformcols_region_' . $name] = $regions[$name];
     }
@@ -191,8 +191,8 @@ function nodeformcols_node_type_update($info) {
     $base = 'nodeformscols_field_placements_' . $info->old_type;
     $new_base = 'nodeformscols_field_placements_' . $info->type;
     $result = db_select('variable')
-      ->fields('variable', array('name'))
       ->condition('name', $base . '%', 'LIKE')
+      ->fields('variable', array('name'))
       ->execute();
     foreach ($result as $row) {
       $value = variable_get($row->name, NULL);