Skip to content
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

Address Adjustment Improvement #292

Merged
merged 3 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion microsetta_interface/implementation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3378,7 +3378,7 @@ def post_update_address(body):
"email": body['email'],
"address_1": body['address_1'],
"address_2": body['address_2'],
"address_3": body['address_3'],
"address_3": body.get('address_3', ""),
"city": body['city'],
"state": body['state'],
"postal": body['postal'],
Expand Down
18 changes: 3 additions & 15 deletions microsetta_interface/templates/update_address.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
.text(state[1]);
$("#state").append(option);
}
$("#form_group_address_3, #form_group_address_type").show();
} else {
for (var country of COUNTRIES_LIST)
{
Expand Down Expand Up @@ -104,9 +103,6 @@ $(document).ready(function(){
address_2: function () {
return $("#address_2").val();
},
address_3: function () {
return $("#address_3").val();
},
city: function() {
return $("#city").val();
},
Expand All @@ -115,7 +111,8 @@ $(document).ready(function(){
},
country: function() {
return $("#country").val();
}
},
address_3: ""
}
}
},
Expand Down Expand Up @@ -147,11 +144,6 @@ $(document).ready(function(){
</script>

<style type="text/css">

#form_group_address_3, #form_group_address_type {
display:none;
}

body {
padding-left: 0;
margin: 0;
Expand Down Expand Up @@ -214,11 +206,7 @@ $(document).ready(function(){
</div>
<div class="form-group mb-2">
<label for="address_2" name="address_2_label">{{ _('Address 2') }}</label>
<input id="address_2" name="address_2" class="form-control" type="text" value="{{ user_info['address_2'] |e }}" />
</div>
<div class="form-group mb-2" id="form_group_address_3">
<label for="address_3" name="address_3_label">{{ _('Address 3') }}</label>
<input id="address_3" name="address_3" class="form-control" value="{{ user_info['address_3'] |e }}" type="text" />
<input id="address_2" name="address_2" class="form-control" type="text" value="{{ user_info['address_2'] if user_info['address_2'] is not none else '' }}" />
</div>
<div class="form-group mb-2">
<label for="city" name="city_label">{{ _('City') }}*</label>
Expand Down