reverted node form columns du to scroll bug
http://studio.g-u-i.net/en/materio/node/1535
This commit is contained in:
parent
c70a4bed11
commit
7011e6c691
@ -5,9 +5,9 @@ dependencies[] = biblio
|
|||||||
core = 7.x
|
core = 7.x
|
||||||
package = Node form columns
|
package = Node form columns
|
||||||
|
|
||||||
; Information added by Drupal.org packaging script on 2016-09-16
|
; Information added by Drupal.org packaging script on 2014-01-15
|
||||||
version = "7.x-1.1"
|
version = "7.x-1.0"
|
||||||
core = "7.x"
|
core = "7.x"
|
||||||
project = "nodeformcols"
|
project = "nodeformcols"
|
||||||
datestamp = "1474036440"
|
datestamp = "1389798806"
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ function nfcbiblio_nodeformcols_variants_alter(&$variants, $type) {
|
|||||||
WHERE tid >= :tid
|
WHERE tid >= :tid
|
||||||
AND visible = :visible
|
AND visible = :visible
|
||||||
ORDER BY weight ASC', array(':tid' => 0, ':visible' => 1));
|
ORDER BY weight ASC', array(':tid' => 0, ':visible' => 1));
|
||||||
while ($option = $res->fetchObject()) {
|
while ($option = db_fetch_object($res)) {
|
||||||
$variants[$option->tid] = $option->name;
|
$variants[$option->tid] = $option->name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -35,8 +35,8 @@ function _nfcbiblio_top_visible_type() {
|
|||||||
return db_query_range("SELECT tid
|
return db_query_range("SELECT tid
|
||||||
FROM {biblio_types}
|
FROM {biblio_types}
|
||||||
WHERE visible = :visible
|
WHERE visible = :visible
|
||||||
AND tid >= :tid
|
AND tid> = :tid>
|
||||||
ORDER BY weight ASC", 0, 1, array(':visible' => 1, ':tid' => 0))->fetchField();
|
ORDER BY weight ASC", array(':visible' => 1, ':tid>' => 0))->fetchField();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -5,9 +5,9 @@ dependencies[] = captcha
|
|||||||
core = 7.x
|
core = 7.x
|
||||||
package = Node form columns
|
package = Node form columns
|
||||||
|
|
||||||
; Information added by Drupal.org packaging script on 2016-09-16
|
; Information added by Drupal.org packaging script on 2014-01-15
|
||||||
version = "7.x-1.1"
|
version = "7.x-1.0"
|
||||||
core = "7.x"
|
core = "7.x"
|
||||||
project = "nodeformcols"
|
project = "nodeformcols"
|
||||||
datestamp = "1474036440"
|
datestamp = "1389798806"
|
||||||
|
|
||||||
|
@ -21,20 +21,6 @@ function _nodeformcols_get_node_type_form($type) {
|
|||||||
);
|
);
|
||||||
$fs += form_state_defaults();
|
$fs += form_state_defaults();
|
||||||
$nf = drupal_retrieve_form($nfid, $fs);
|
$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_prepare_form($nfid, $nf, $fs);
|
||||||
drupal_process_form($nfid, $nf, $fs);
|
drupal_process_form($nfid, $nf, $fs);
|
||||||
return $nf;
|
return $nf;
|
||||||
@ -49,10 +35,8 @@ function nodeformcols_update_placements($type, $variant, &$placements) {
|
|||||||
$field = $form[$key];
|
$field = $form[$key];
|
||||||
if (
|
if (
|
||||||
substr($key, 0, 8) == 'section_' ||
|
substr($key, 0, 8) == 'section_' ||
|
||||||
// Exclude hidden fields.
|
|
||||||
(isset($field['#type']) && in_array($field['#type'], array('value', 'hidden', 'token'))) ||
|
(isset($field['#type']) && in_array($field['#type'], array('value', 'hidden', 'token'))) ||
|
||||||
// Exclude the vertical tabs.
|
(isset($field['#type'], $field['#group']) && $field['#type'] === 'fieldset')
|
||||||
(isset($field['#group']) && $field['#group'] == 'additional_settings')
|
|
||||||
) {
|
) {
|
||||||
// Remove placements that meet exclusion rules.
|
// Remove placements that meet exclusion rules.
|
||||||
if (isset($placements[$key])) {
|
if (isset($placements[$key])) {
|
||||||
@ -144,7 +128,7 @@ function nodeformcols_configuration_form($form, $form_state, $node_type, $varian
|
|||||||
$form['variant'] = array(
|
$form['variant'] = array(
|
||||||
'#type' => 'item',
|
'#type' => 'item',
|
||||||
'#title' => t('Select a form variant'),
|
'#title' => t('Select a form variant'),
|
||||||
'#markup' => theme('links', array('links' => $variant_links)),
|
'#value' => theme('links', array('links' => $variant_links)),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,9 +3,9 @@ description = Separates the node forms into two columns and a footer.
|
|||||||
core = 7.x
|
core = 7.x
|
||||||
package = Node form columns
|
package = Node form columns
|
||||||
|
|
||||||
; Information added by Drupal.org packaging script on 2016-09-16
|
; Information added by Drupal.org packaging script on 2014-01-15
|
||||||
version = "7.x-1.1"
|
version = "7.x-1.0"
|
||||||
core = "7.x"
|
core = "7.x"
|
||||||
project = "nodeformcols"
|
project = "nodeformcols"
|
||||||
datestamp = "1474036440"
|
datestamp = "1389798806"
|
||||||
|
|
||||||
|
@ -160,8 +160,8 @@ function template_preprocess_node_form(&$aVars) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($regions as $name => $data) {
|
foreach ($has_elements as $name => $has) {
|
||||||
if (!empty($has_elements[$name])) {
|
if ($has) {
|
||||||
$class[] = 'node-form-has-region-' . $name;
|
$class[] = 'node-form-has-region-' . $name;
|
||||||
$form['nodeformcols_region_' . $name] = $regions[$name];
|
$form['nodeformcols_region_' . $name] = $regions[$name];
|
||||||
}
|
}
|
||||||
@ -191,8 +191,8 @@ function nodeformcols_node_type_update($info) {
|
|||||||
$base = 'nodeformscols_field_placements_' . $info->old_type;
|
$base = 'nodeformscols_field_placements_' . $info->old_type;
|
||||||
$new_base = 'nodeformscols_field_placements_' . $info->type;
|
$new_base = 'nodeformscols_field_placements_' . $info->type;
|
||||||
$result = db_select('variable')
|
$result = db_select('variable')
|
||||||
->fields('variable', array('name'))
|
|
||||||
->condition('name', $base . '%', 'LIKE')
|
->condition('name', $base . '%', 'LIKE')
|
||||||
|
->fields('variable', array('name'))
|
||||||
->execute();
|
->execute();
|
||||||
foreach ($result as $row) {
|
foreach ($result as $row) {
|
||||||
$value = variable_get($row->name, NULL);
|
$value = variable_get($row->name, NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user