Skip to content
This repository was archived by the owner on Oct 29, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,13 @@ function dosomething_signup_data_validate_address($form, &$form_state) {

// Did we not get any results?
if (in_array('sorry', $formatted_address)) {
drupal_goto($_SERVER['REQUEST_URI'], array('fragment' => 'modal-signup-data-form'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this reload the page and the user has to fill out the form again?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, but only on form errors (which would currently reload the page but not include the modal hash at the end).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The difference for current behavior though is that the form reloads with the user input still filled out (but they do need to figure out to click on the link again). Not going to keep me up at night or anything, its just something we lose by doing the drupal_goto.

form_set_error('dosomething_user_validate_address', t('Hmmm, we couldn’t find that address. Please try again.'));
}
// Did it come back from the api as ambiguous? -- Check with the user.
elseif (in_array('ambiguous', $formatted_address)) {
dosomething_signup_data_set_address_values($form, $form_state, $formatted_address);
drupal_goto($_SERVER['REQUEST_URI'], array('fragment' => 'modal-signup-data-form'));
form_set_error('dosomething_user_ambiguous_address', t('Hmmm, we couldn’t find that address. Did you mean:'));
}
// We have a full address, save it!
Expand Down
2 changes: 1 addition & 1 deletion lib/themes/dosomething/paraneue_dosomething/bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"tests"
],
"dependencies": {
"neue": "DoSomething/neue#~3.3.0",
"neue": "DoSomething/neue#~3.4.0",
"jquery": "~1.11.0",
"mailcheck": "~1.0.3",
"html5shiv": "~3.7.0",
Expand Down