Commit 04f9953e authored by Tom Graham's avatar Tom Graham

Merge branch '7.x-1.x' of https://git.drupal.org/project/d3_sankey

parents a7167ed3 2157c0c2
......@@ -6,10 +6,3 @@ package = Visualization
dependencies[] = libraries (>=2.0)
dependencies[] = d3
dependencies[] = xautoload (>= 7.x-5.0)
; Information added by Drupal.org packaging script on 2016-10-27
version = "7.x-1.x-dev"
core = "7.x"
project = "d3_sankey"
datestamp = "1477583498"
......@@ -18,10 +18,3 @@ dependencies[] = d3.chart.sankey
; chart; and;
; - if we override the original d3_views plugins, we will conflict with other
; modules that need to do the same thing.
; Information added by Drupal.org packaging script on 2016-10-27
version = "7.x-1.x-dev"
core = "7.x"
project = "d3_sankey"
datestamp = "1477583498"
......@@ -4,10 +4,3 @@ core = 7.x
package = Visualization
dependencies[] = d3_sankey
; Information added by Drupal.org packaging script on 2016-10-27
version = "7.x-1.x-dev"
core = "7.x"
project = "d3_sankey"
datestamp = "1477583498"
......@@ -6,10 +6,3 @@ package = Visualization
dependencies[] = d3_sankey
dependencies[] = composer_manager
dependencies[] = xautoload (>= 7.x-5.0)
; Information added by Drupal.org packaging script on 2016-10-27
version = "7.x-1.x-dev"
core = "7.x"
project = "d3_sankey"
datestamp = "1477583498"
......@@ -109,7 +109,7 @@ function d3_sankey_table_group_pp_field_formatter_settings_form($field, $instanc
$element['iterations'] = array(
'#type' => 'textfield',
'#title' => t('Iterations'),
'#element_validate' => array('element_validate_integer_positive'),
'#element_validate' => array('_d3_sankey_table_group_pp_element_validate_integer_positive_or_zero'),
'#default_value' => $settings['iterations'],
);
......@@ -343,3 +343,15 @@ function _d3_sankey_table_group_pp_default_chart_options() {
'type' => 'sankey',
);
}
/* Form callbacks. */
/**
* Form element validation handler for integers that must be positive or zero.
*/
function _d3_sankey_table_group_pp_element_validate_integer_positive_or_zero($element, &$form_state) {
$value = $element['#value'];
if ($value !== '' && (!is_numeric($value) || intval($value) != $value || $value < 0)) {
form_error($element, t('%name must be a positive integer or zero.', array('%name' => $element['#title'])));
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment