VIVO-491 cleaning up some minor address stuff

This commit is contained in:
tworrall 2013-11-06 16:13:46 -05:00
parent 23e0a4d390
commit 14e83ecc6c
2 changed files with 23 additions and 0 deletions

View file

@ -10,6 +10,8 @@ var mailingAddressUtils = {
if ( editMode != "add" ) {
this.setStreetAddressDisplayFields();
}
this.setAddressFieldsIfErrors();
},
initObjectReferences: function() {
@ -18,9 +20,16 @@ var mailingAddressUtils = {
this.street1 = $('#streetAddressOne');
this.street2 = $('#streetAddressTwo');
this.streetAddress = $('#streetAddress');
this.errorSection = $('section#error-alert');
},
setAddressFieldsIfErrors: function() {
if ( this.errorSection.length ) {
mailingAddressUtils.setStreetAddressDisplayFields();
}
},
bindEventListeners: function() {
this.idCache = {};