You are here

function configuration_tracking_form_validate in Configuration Management 7

1 string reference to 'configuration_tracking_form_validate'
configuration_tracking_form in ./configuration.admin.inc
Menu Callback Form.

File

./configuration.admin.inc, line 734

Code

function configuration_tracking_form_validate($form, &$form_state) {
  if ($form_state['values']['op'] == t('Write Activestore to Datastore')) {
    $configuration_export = $form_state['configuration_export'];
    foreach ($configuration_export as $component => $config) {
      $num_on = count(array_filter($config));
      if ($num_on != 0 && $num_on != $form[$component]['items']['#overridden']) {
        form_set_error('packages', t('Writing to activestore requires writing the entire component to datastore. Select all checkboxes on the %component tab to write to datastore.', array(
          '%component' => $component,
        )));
      }
    }
  }
}