Skip to content

Commit

Permalink
Merge pull request #292 from biocore/csymons_melissa_dupe_check_fix
Browse files Browse the repository at this point in the history
Address Adjustment Improvement
  • Loading branch information
cassidysymons authored Sep 26, 2023
2 parents 9b9bb3b + 8e284fe commit 5964b7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
2 changes: 1 addition & 1 deletion microsetta_interface/implementation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3394,7 +3394,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

0 comments on commit 5964b7a

Please sign in to comment.