diff --git a/java/google/registry/ui/js/registrar/contact.js b/java/google/registry/ui/js/registrar/contact.js index c10a7fcbc..5aa9611fd 100644 --- a/java/google/registry/ui/js/registrar/contact.js +++ b/java/google/registry/ui/js/registrar/contact.js @@ -35,7 +35,7 @@ goog.forwardDeclare('registry.registrar.Console'); registry.registrar.Contact = function(console) { registry.registrar.Contact.base( this, 'constructor', - registry.soy.registrar.contact.item, + /** @type {function()} */(registry.soy.registrar.contact.item), registry.soy.registrar.contactepp, console); }; @@ -102,7 +102,7 @@ registry.registrar.Contact.prototype.setupEditor = function(objArgs) { addPostalInfoBtn.setAttribute('disabled', true); return null; }, - registry.soy.registrar.contact.postalInfo, + /** @type {function()} */ (registry.soy.registrar.contact.postalInfo), { item: {}, localized: true, @@ -116,12 +116,14 @@ registry.registrar.Contact.prototype.setupEditor = function(objArgs) { /** @override */ registry.registrar.Contact.prototype.prepareCreate = function(params) { params.nextId = params.item['contact:id']; - return registry.soy.registrar.contactepp.create(params).toString(); + return registry.soy.registrar.contactepp.create( + /** @type {{clTrid: ?, item: ?}} */ (params)).toString(); }; /** @override */ registry.registrar.Contact.prototype.prepareUpdate = function(params) { params.nextId = params.item['contact:id']; - return registry.soy.registrar.contactepp.update(params).toString(); + return registry.soy.registrar.contactepp.update( + /** @type {{clTrid: ?, item: ?}} */(params)).toString(); }; diff --git a/java/google/registry/ui/js/registrar/domain.js b/java/google/registry/ui/js/registrar/domain.js index 4a09c84c9..e9290899a 100644 --- a/java/google/registry/ui/js/registrar/domain.js +++ b/java/google/registry/ui/js/registrar/domain.js @@ -35,7 +35,7 @@ goog.forwardDeclare('registry.registrar.Console'); registry.registrar.Domain = function(console) { registry.registrar.Domain.base( this, 'constructor', - registry.soy.registrar.domain.item, + /** @type {function()} */ (registry.soy.registrar.domain.item), registry.soy.registrar.domainepp, console); }; @@ -79,9 +79,11 @@ registry.registrar.Domain.prototype.prepareFetch = function(params) { } params.name = idParts[0]; params.applicationID = idParts[1]; - xml = registry.soy.registrar.domainepp.infoSunrush(params); + xml = registry.soy.registrar.domainepp.infoSunrush( + /** @type {{applicationID: ?, clTrid: ?, name: ?}} */(params)); } else { - xml = registry.soy.registrar.domainepp.info(params); + xml = registry.soy.registrar.domainepp.info( + /** @type {{clTrid: ?, id: ?}} */ (params)); } return xml.toString(); }; @@ -140,7 +142,7 @@ registry.registrar.Domain.prototype.setupEditor = function(objArgs) { goog.bind(function(newFieldName) { return registry.util.renderBeforeRow( 'domain-contacts-footer', - registry.soy.forms.selectRow, { + /** @type {function()} */(registry.soy.forms.selectRow), { label: 'Type', name: newFieldName + '.@type', options: ['admin', 'tech', 'billing'] @@ -165,9 +167,11 @@ registry.registrar.Domain.prototype.prepareCreate = function(params) { } var xml; if (registry.registrar.Domain.SUNRUSH) { - xml = registry.soy.registrar.domainepp.createSunrush(params); + xml = registry.soy.registrar.domainepp.createSunrush( + /** @type {{clTrid:?, item: ?}} */(params)); } else { - xml = registry.soy.registrar.domainepp.create(params); + xml = registry.soy.registrar.domainepp.create( + /** @type {{clTrid: ?, item: ?}} */(params)); } return xml.toString(); }; @@ -190,14 +194,16 @@ registry.registrar.Domain.prototype.prepareUpdate = var xml; if (registry.registrar.Domain.SUNRUSH) { - xml = registry.soy.registrar.domainepp.updateSunrush(params); + xml = registry.soy.registrar.domainepp.updateSunrush( + /** @type {{clTrid: ?, item: ?}} */(params)); nextId += ':' + form['launch:applicationID']; } else { if (form['domain:ns'] && form['domain:ns']['domain:hostObj']) { this.addRem(form['domain:ns']['domain:hostObj'], 'Hosts', params); } this.addRem(form['domain:contact'], 'Contacts', params); - xml = registry.soy.registrar.domainepp.update(params); + xml = registry.soy.registrar.domainepp.update( + /** @type {{clTrid: ?, item: ?}} */(params)); } return xml.toString(); diff --git a/java/google/registry/ui/js/registrar/host.js b/java/google/registry/ui/js/registrar/host.js index 098ed9b79..45bd03f43 100644 --- a/java/google/registry/ui/js/registrar/host.js +++ b/java/google/registry/ui/js/registrar/host.js @@ -68,7 +68,8 @@ registry.registrar.Host.prototype.setupEditor = function(objArgs) { /** @override */ registry.registrar.Host.prototype.prepareCreate = function(params) { params.nextId = params.item['host:name']; - return registry.soy.registrar.hostepp.create(params).toString(); + return registry.soy.registrar.hostepp.create( + /** @type {{clTrid: ?, item: ?}} */(params)).toString(); }; @@ -101,5 +102,6 @@ registry.registrar.Host.prototype.prepareUpdate = function(params) { params.addAddrs = addAddrs; params.remAddrs = remAddrs; params.nextId = form['host:chgName']; - return registry.soy.registrar.hostepp.update(params).toString(); + return registry.soy.registrar.hostepp.update( + /** @type {{clTrid: ?, item: ?}} */(params)).toString(); }; diff --git a/java/google/registry/ui/soy/Forms.soy b/java/google/registry/ui/soy/Forms.soy index a3c364b93..ea3a0accd 100644 --- a/java/google/registry/ui/soy/Forms.soy +++ b/java/google/registry/ui/soy/Forms.soy @@ -17,12 +17,12 @@ /** * Input field. - * @param name Input field name. - * @param? item This will be used to set default value with $item[$name]. - * @param? label Input field label. - * @param? placeholder Placeholder text. */ {template .inputField} + {@param name: ?} /** Input field name. */ + {@param? item: ?} /** This will be used to set default value with $item[$name]. */ + {@param? label: ?} /** Input field label. */ + {@param? placeholder: ?} /** Placeholder text. */