-
Notifications
You must be signed in to change notification settings - Fork 448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use default country as standard #7017
Use default country as standard #7017
Conversation
src/CartToFamily.php
Outdated
|
||
if ($sCountry == 'United States' || $sCountry == 'Canada') { | ||
if ($sCountry == $sDefaultCountry) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this logic might be wrong.
I believe you might want to do something like this instead so the application can check if it has state/province information - https://github.com/ChurchCRM/CRM/blob/master/src/Include/StateDropDown.php#L14-L20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seeing that this code is reused, it might be a good idea to move this logic to a function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic is wrong, but not for the reason you gave.
This would only work if everyone in the church was in the same country. Although that will mostly be true, it wont be true all the time.
src/PersonEditor.php
Outdated
$sState = ''; | ||
if ($sCountryTest == 'United States' || $sCountryTest == 'Canada') { | ||
if ($sCountryTest == $sDefaultCountry) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe you might want to do something like this instead so the application can check if it has state/province information - https://github.com/ChurchCRM/CRM/blob/master/src/Include/StateDropDown.php#L14-L20
src/PersonEditor.php
Outdated
@@ -903,7 +904,7 @@ class="form-control"> | |||
<div class="form-group col-md-2"> | |||
<label><?= gettext('None State') ?>:</label> | |||
<input type="text" name="StateTextbox" | |||
value="<?php if ($sPhoneCountry != 'United States' && $sPhoneCountry != 'Canada') { | |||
value="<?php if ($sPhoneCountry != $sDefaultCountry) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be the inverse of the previous check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previous check you commented on?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section needs to be looked at again; "None State" is daft.
e090877
to
75ad907
Compare
b43dc1d
to
7a46906
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also need to check on relationship to #1729
bbcaefd
to
c8bff8e
Compare
The requested changes have opened a big can of worms (and rabbit holes). It's going to still take some time to resolve this properly. |
c8bff8e
to
370ee62
Compare
370ee62
to
5fbac88
Compare
98f4865
to
8a6d30d
Compare
43718ab
to
be440a5
Compare
be440a5
to
d7ea297
Compare
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
@respencer do you still plan on working on this? |
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
This PR was closed because it has been stalled for 15 days with no activity. |
Description & Issue number it closes
Resolves #5986
Screenshots (if appropriate)
None.
How to test the changes?
Visual inspection.
Type of change
How Has This Been Tested?
Visual inspection.
Checklist: