commit 87ede132bacf097aedd0705325d6906d086f5aa1 Author: Devin Zuczek Date: Fri Nov 14 00:19:47 2014 -0500 Issue #1997658: ajax broken for custom location fields or fields outside of content types diff --git a/tests/location_test/location_test.info b/tests/location_test/location_test.info new file mode 100644 index 0000000..236731c --- /dev/null +++ b/tests/location_test/location_test.info @@ -0,0 +1,4 @@ +name = Location tests +core = 7.x +description = Test fixtures for location +hidden = TRUE diff --git a/tests/location_test/location_test.module b/tests/location_test/location_test.module new file mode 100644 index 0000000..de92baf --- /dev/null +++ b/tests/location_test/location_test.module @@ -0,0 +1,54 @@ + 'Location ajax element that does not work', + '#type' => 'location_element', + '#required' => TRUE, + '#location_settings' => array( + 'form' => array( + 'fields' => array( + 'country' => array( + 'collect' => 2, + 'weight' => 2, + ), + 'province' => array( + 'collect' => 2, + 'widget' => 'select', + 'weight' => 3, + ), + 'name' => array( + 'collect' => 0, + ), + 'postal_code' => array( + 'collect' => 0, + ), + 'street' => array( + 'collect' => 0, + ), + 'additional' => array( + 'collect' => 0, + ), + 'locpick' => array( + 'collect' => 0, + ), + ), + ), + ), + ); + + return $form; +} + +function location_test_menu() { + $items = array(); + $items['location-test-form'] = array( + 'title' => 'Location test form', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('location_test_form'), + 'access callback' => TRUE, + ); + return $items; +}