diff --git a/java/google/registry/ui/js/registrar/contact_settings.js b/java/google/registry/ui/js/registrar/contact_settings.js index 5b0c8444f..c5daf2844 100644 --- a/java/google/registry/ui/js/registrar/contact_settings.js +++ b/java/google/registry/ui/js/registrar/contact_settings.js @@ -115,7 +115,9 @@ registry.registrar.ContactSettings.prototype.renderItem = function(rspObj) { var contact = contacts[c]; var types = contact.types; if (!types) { - continue; + // If the contact has no types, synthesize an "OTHER" type so that it + // still will be displayed in the console. + types = 'OTHER'; } types = types.split(','); for (var t in types) { diff --git a/java/google/registry/ui/soy/registrar/ContactSettings.soy b/java/google/registry/ui/soy/registrar/ContactSettings.soy index d61e9b42c..2edb2d69f 100644 --- a/java/google/registry/ui/soy/registrar/ContactSettings.soy +++ b/java/google/registry/ui/soy/registrar/ContactSettings.soy @@ -25,7 +25,8 @@ ['legal', 'Legal', 'Contact for all legal communications.'], ['marketing', 'Marketing', 'Contact for registry promotions and campaigns.'], ['abuse', 'Abuse', 'Contact for abuse complaints.'], - ['whois', 'WHOIS-Inquiry', 'Contact for inquiries about WHOIS accuracy.']] /} + ['whois', 'WHOIS-Inquiry', 'Contact for inquiries about WHOIS accuracy.'], + ['other', 'Other', 'Contact that is none of the above types']] /}

Contact settings

diff --git a/javatests/google/registry/ui/js/registrar/contact_settings_test.js b/javatests/google/registry/ui/js/registrar/contact_settings_test.js index 856dc2495..6160bba5d 100644 --- a/javatests/google/registry/ui/js/registrar/contact_settings_test.js +++ b/javatests/google/registry/ui/js/registrar/contact_settings_test.js @@ -73,6 +73,8 @@ function tearDown() { function testCollectionView() { + testContactWithoutType = createTestContact('notype@example.com'); + testContactWithoutType.types = ''; registry.registrar.ConsoleTestUtil.visit(test, { path: 'contact-settings', xsrfToken: test.testXsrfToken, @@ -86,11 +88,12 @@ function testCollectionView() { status: 'SUCCESS', message: 'OK', results: [{ - contacts: [testContact] + contacts: [testContact, testContactWithoutType] }] } ); assertEquals(1, $('admin-contacts').childNodes.length); + assertEquals(1, $('other-contacts').childNodes.length); // XXX: Needs more field testing. }