google-nomulus/java/google/registry/ui/js/registrar/contact_us.js
mmuller 84bbb9a7c0 Genericize "Contact Us" page
Parameterize integration, support and announcement email addresses and contact
phone number, make static parameters flow through the system in a consistent
manner.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136183813
2016-10-14 17:41:55 -04:00

61 lines
2 KiB
JavaScript

// Copyright 2016 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
goog.provide('registry.registrar.ContactUs');
goog.require('goog.Uri');
goog.require('goog.dom');
goog.require('goog.object');
goog.require('registry.Resource');
goog.require('registry.ResourceComponent');
goog.require('registry.soy.registrar.console');
goog.forwardDeclare('registry.registrar.Console');
/**
* Contact Us page.
* @param {!registry.registrar.Console} console
* @param {string} xsrfToken Security token to pass back to the server.
* @constructor
* @extends {registry.ResourceComponent}
* @final
*/
registry.registrar.ContactUs = function(console, xsrfToken) {
registry.registrar.ContactUs.base(
this,
'constructor',
console,
new registry.Resource(new goog.Uri('/registrar-settings'), xsrfToken),
registry.soy.registrar.console.contactUs,
null);
};
goog.inherits(registry.registrar.ContactUs, registry.ResourceComponent);
/** @override */
registry.registrar.ContactUs.prototype.renderItem = function(rspObj) {
// Augment the static parameters with the response object, we'll need both.
var params = goog.object.clone(this.console.params);
goog.object.extend(params, rspObj);
registry.registrar.ContactUs.base(this, 'renderItem', params);
};
/** @override */
registry.registrar.ContactUs.prototype.bindToDom = function(id) {
registry.registrar.ContactUs.base(this, 'bindToDom', '');
goog.dom.removeChildren(goog.dom.getRequiredElement('reg-app-buttons'));
};