Import code from internal repository to git

This commit is contained in:
Justine Tunney 2016-03-01 17:18:14 -05:00
commit 0ef0c933d2
2490 changed files with 281594 additions and 0 deletions

View file

@ -0,0 +1,31 @@
package(default_visibility = ["//java/com/google/domain/registry:registry_project"])
load("//third_party/closure/templates:closure_template_java_library.bzl", "closure_template_java_library")
load("//third_party/closure/templates:closure_template_js_library.bzl", "closure_template_js_library")
filegroup(
name = "js_files",
srcs = [
"Console.soy.js",
"Forms.soy.js",
],
)
closure_template_java_library(
name = "soy_java_wrappers",
srcs = glob(["*.soy"]),
java_package = "com.google.domain.registry.ui.soy",
)
closure_template_js_library(
name = "Console",
srcs = ["Console.soy"],
globals = "//java/com/google/domain/registry/ui:globals.txt",
)
closure_template_js_library(
name = "Forms",
srcs = ["Forms.soy"],
globals = "//java/com/google/domain/registry/ui:globals.txt",
)

View file

@ -0,0 +1,162 @@
{namespace registry.soy.console autoescape="strict"}
/**
* Common header fragment.
*/
{template .header}
{@param app: string} /** App identifier, e.g. 'admin', 'registrar'. */
{@param? subtitle: string} /** Extra stuff to put in {@code <title>}. */
<!doctype html>
<meta charset="utf-8">
{literal}<!--
CHARLESTON ROAD REGISTRY SHARED REGISTRATION SYSTEM
ICANN-GTLD-AGB-20120604
_____ _
| __ \ (_)
| | | | ___ _ __ ___ __ _ _ _ __
| | | |/ _ \| '_ ` _ \ / _` | | '_ \
| |__| | (_) | | | | | | (_| | | | | |
|_____/ \___/|_| |_| |_|\__,_|_|_| |_|
| __ \ (_) | |
| |__) |___ __ _ _ ___| |_ _ __ _ _
| _ // _ \/ _` | / __| __| '__| | | |
| | \ \ __/ (_| | \__ \ |_| | | |_| |
|_| \_\___|\__, |_|___/\__|_| \__, |
__/ | __/ |
|___/ |___/
-->{/literal}
<title>Domain Registry {if isNonnull($subtitle)} - {$subtitle}{/if}</title>
<link rel="icon" href="/assets/images/ribbon_certified-64.png">
{switch DEBUG}
{case com.google.domain.registry.ui.ConsoleDebug.PRODUCTION}
<link rel="stylesheet" href="/assets/css/{$app}_bin.css">
{case com.google.domain.registry.ui.ConsoleDebug.DEBUG}
<link rel="stylesheet" href="/assets/css/{$app}_dbg.css">
{case com.google.domain.registry.ui.ConsoleDebug.RAW}
{if $app == 'admin'}
<link rel="stylesheet"
href="/assets/sources/java/com/google/domain/registry/ui/css/admin_imports_raw.css">
{else}
<link rel="stylesheet"
href="/assets/sources/java/com/google/domain/registry/ui/css/registrar_imports_raw.css">
{/if}
{default}
<!-- No DEBUG option set. -->
{/switch}
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Open+Sans:300">
{/template}
/**
* Happy little googley bar.
*/
{template .googlebar}
{@param user: map<string, ?>}
<div id="kd-googlebar" role="banner">
<a class="{css logo}" href="/registrar">
<img src="/assets/images/glogo_black.png" alt="Google">Registry
</a>
<div id="kd-search">
<input id="kd-searchfield"
name="kd-searchfield"
type="text"
placeholder="Search using format 'contact/id'"
x-webkit-speech>
<a id="kd-searchbutton"
class="{css kd-button} {css kd-button-submit}"
style="-webkit-user-select: none;">
<img width="21" height="21" alt="Search White"
src="/assets/images/icons/svg/search.svg">
</a>
</div>
<div class="{css kd-butterbar}">
<p>
<span class="{css kd-butterbar-text}"></span>{sp}
<a class="{css kd-butterbar-dismiss}">Dismiss</a>
</p>
</div>
<div id="kd-social" class="{css kd-buttonbar} {css right}">
{if isNonnull($user['id'])}
<span class="{css kd-name} {css mobile-hide} {css x-crush-hide}">
{$user['name']}{sp}
<a href="{$user['actionHref']}" tabindex="-1">{$user['actionName']}</a>
</span>
{else}
<a href="{$user['actionHref']}"
class="{css kd-button} {css kd-button-submit}"
tabindex="-1">{$user['actionName']}</a>
{/if}
</div>
</div>
{/template}
/** Appbar add/back, edit/cancel appbar. */
{template .appbarButtons}
<div id="reg-app-buttons" class="{css kd-buttonbar} {css left}">
<button id="reg-app-btn-add"
type="button"
class="{css kd-button} {css kd-button-submit} {css hidden}">
Add</button>
<div id="reg-app-btns-edit" class="{css hidden}">
<button id="reg-app-btn-edit"
type="button"
class="{css kd-button} {css kd-button-submit}">
Edit</button>
<button id="reg-app-btn-back" type="button" class="{css kd-button}">
Back</button>
</div>
<div id="reg-app-btns-save" class="{css hidden}">
<button id="reg-app-btn-save"
type="button"
class="{css kd-button} {css kd-button-submit}">
Save</button>
<button id="reg-app-btn-cancel" type="button" class="{css kd-button}">
Cancel</button>
</div>
</div>
{/template}
/**
* Create button for domain, contact and host.
*/
{template .navCreateButton}
<a id="reg-create-button"
class="{css kd-button} {css kd-button-action} {css kd-menubutton}"
style="-webkit-user-select: none;">
<span class="{css label}">Create</span>
<span class="{css kd-disclosureindicator}"></span>
<ul class="{css kd-menulist}" style="top: 27px;">
<li class="{css kd-menulistitem}"
style="-webkit-user-select: none;"
id="reg-menu-domain-create">Domain
<li class="{css kd-menulistitem}"
style="-webkit-user-select: none;"
id="reg-menu-contact-create">Contact
<li class="{css kd-menulistitem}"
style="-webkit-user-select: none;"
id="reg-menu-host-create">Host
</ul>
</a>
{/template}
/**
* Legal notices included as footer.
*/
{template .footer}
<div class="{css pageFooter} {css clearfix}">
<ul class="{css linklist} {css right}">
<li>
©2016 Google
<li>
<a href="https://www.registry.google/about/privacy.html">Privacy</a>
<li>
<a href="https://www.google.com/intl/en/policies/terms/">Terms</a>
</ul>
</div>
{/template}

View file

@ -0,0 +1,308 @@
{namespace registry.soy.forms autoescape="strict"}
/**
* 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}
<label for="{$name}">
{if isNonnull($label)}
{$label}
{else}
{$name}
{/if}
</label>
<input id="{$name}"
name="{$name}"
class="{css $name}"
{if isNonnull($item) and isNonnull($item[$name])}
value="{$item[$name]}"
{/if}
{if isNonnull($placeholder)}
placeholder="{$placeholder}"
{/if}>
{/template}
/**
* Input field in a table row.
* @param name Input field name.
* @param? item This will be used to set default value with $item[$name].
* @param? itemPrefix
* @param? namePrefix
* @param? label Input field label.
* @param? description Input field description.
* @param? placeholder Placeholder text.
* @param? readonly
*/
{template .inputFieldRow}
<tr class="{css kd-settings-pane-section}">
<td>
<label for="{if isNonnull($namePrefix)}{$namePrefix + $name}{else}{$name}{/if}"
class="{css setting-label}">
{if isNonnull($label)}
{$label}
{else}
{$name}
{/if}
</label>
{if isNonnull($description)}
<span class="{css description}">{$description}</span>
{/if}
</td>
<td class="{css setting}">
<input id="{if isNonnull($namePrefix)}{$namePrefix + $name}{else}{$name}{/if}"
name="{if isNonnull($namePrefix)}{$namePrefix + $name}{else}{$name}{/if}"
{if isNonnull($item)}
{if isNonnull($itemPrefix) and isNonnull($item[$itemPrefix + $name])}
value="{$item[$itemPrefix + $name]['keyValue'] ?: $item[$itemPrefix + $name]}"
{elseif isNonnull($item[$name])}
value="{$item[$name]['keyValue'] ?: $item[$name]}"
{/if}
{/if}
{if isNonnull($placeholder) and not $readonly}
placeholder="{$placeholder}"
{/if}
{if $readonly}
readonly
{/if}>
</td>
</tr>
{/template}
/* XXX: Should move other impls in this file to use this. */
/** Input field label. */
{template .inputFieldLabel}
{@param label: string}
{@param? forId: string}
{@param? description: string}
<label {if isNonnull($forId)}for="{$forId}"{/if} class="{css setting-label}">
{$label}
</label>
{if isNonnull($description)}
<span class="{css description}">{$description}</span>
{/if}
{/template}
/** Input field value. */
{template .inputFieldValue}
{@param name: string}
{@param? readonly: bool}
{@param? value: ?}
{@param? namePrefix: string}
{@param? placeholder: string}
{@param? clazz: string}
{let $forId: isNonnull($namePrefix) ? $namePrefix + $name : $name /}
<input name="{$forId}"
id="{$forId}"
value="{if isNonnull($value)}{$value['keyValue'] ?: $value}{/if}"
{if isNonnull($clazz)}class="{$clazz}"{/if}
{if isNonnull($placeholder) and not $readonly}
placeholder="{$placeholder}"
{/if}
{if $readonly}readonly{/if}>
{/template}
/** Input field in a table row. */
{template .inputFieldRowWithValue}
{@param label: string}
{@param name: string}
{@param? readonly: bool}
{@param? namePrefix: string}
{@param? value: ?}
{@param? description: string}
{@param? placeholder: string}
{@param? clazz: string}
{let $forId: isNonnull($namePrefix) ? $namePrefix + $name : $name /}
<tr class="{css kd-settings-pane-section}">
<td>
{call .inputFieldLabel data="all"}
{param forId: $forId /}
{/call}
</td>
<td class="{css setting}">
{call .inputFieldValue data="all" /}
</td>
</tr>
{/template}
/**
* Form input row for a table.
* @param name Input field name.
* @param? item This will be used to set default value with $item[$name].
* @param? itemPrefix
* @param? namePrefix
* @param? label Input field label.
* @param? readonly
*/
{template .textareaFieldRow}
<tr>
<td>
<label for="{if isNonnull($namePrefix)}{$namePrefix + $name}{else}{$name}{/if}">
{if isNonnull($label)}
{$label}
{else}
{$name}
{/if}
</label>
</td>
<td>
<textarea id="{$name}"
name="{if isNonnull($namePrefix)}{$namePrefix + $name}{else}{$name}{/if}"
{if $readonly}
readonly
{/if}
>{if isNonnull($item)}
{if isNonnull($itemPrefix) and isNonnull($item[$itemPrefix + $name])}
{$item[$itemPrefix + $name]}
{elseif isNonnull($item[$name])}
{$item[$name]}
{/if}
{/if}</textarea>
</td>
</tr>
{/template}
/**
* Form input row for a table.
* @param name Input field name.
* @param value
* @param? namePrefix
* @param? label Input field label.
* @param? readonly
*/
{template .textareaFieldRowWithValue}
<tr>
<td>
<label for="{if isNonnull($namePrefix)}{$namePrefix + $name}{else}{$name}{/if}">
{if isNonnull($label)}
{$label}
{else}
{$name}
{/if}
</label>
</td>
<td>
<textarea id="{$name}"
name="{if isNonnull($namePrefix)}{$namePrefix + $name}{else}{$name}{/if}"
{if $readonly}
readonly
{/if}
>{if isNonnull($value) and isNonnull($value['keyValue'])}
{$value['keyValue']}
{/if}</textarea>
</td>
</tr>
{/template}
/**
* Select control.
* @param name Input field name.
* @param options Items listed in the selector.
* @param selected Name of the selected option.
* @param? namePrefix
* @param? label Input field label.
* @param? readonly
*/
{template .selectRow}
{let $forId: isNonnull($namePrefix) ? $namePrefix + $name : $name /}
<tr>
<td>
<label for="{$forId}">
{if isNonnull($label)}
{$label}
{else}
{$name}
{/if}
</label>
</td>
<td>
<select id="{$name}"
name="{$name}"
class="{css kd-button} {css reg-select}"
{if $readonly}disabled{/if}>
{foreach $option in $options}
<option value="{$option}" {if $selected == $option}selected{/if}>
{$option}
</option>
{/foreach}
</select>
</td>
</tr>
{/template}
/**
* @param name
* @param values
* @param? checkedValue the default checked value.
*/
{template .inputRadioWithValue}
<tr>
<td colspan="2">
{foreach $value in $values}
<input type="radio"
name="{$name}"
value="{$value}"
{if $checkedValue == $value}checked{/if}>
{/foreach}
</td>
</tr>
{/template}
/** Checkbox with label. */
{template .inputCheckboxRow}
{@param name: string}
{@param? checked: bool}
{@param? label: string}
{@param? description: string}
<tr>
<td>
{call .inputFieldLabel data="all"}
{param label: $label ? $label : $name /}
{param forId: $name /}
{/call}
</td>
<td>
<input id="{$name}"
type="checkbox"
name="{$name}"
value="{$name}"
{if isNonnull($checked) and $checked}checked{/if}>
</td>
</tr>
{/template}
/** Drop-down select button widget. */
{template .menuButton}
{@param id: string} /** ID for button. */
{@param selected: string} /** Selected item. */
{@param items: list<string>} /** Selectable items. */
<div id="{$id}" class="{css kd-button} {css kd-menubutton} {css kd-select}">
<span class="{css label}">
{$selected}
</span>
<span class="{css kd-disclosureindicator}"></span>
<ul class="{css kd-menulist}">
{foreach $item in $items}
<li class="{css kd-menulistitem}
{if $item == $selected}
{sp}{css selected}
{/if}">
{$item}
{/foreach}
</ul>
</div>
{/template}

View file

@ -0,0 +1,41 @@
package(default_visibility = ["//java/com/google/domain/registry:registry_project"])
load("//third_party/closure/templates:closure_template_java_library.bzl", "closure_template_java_library")
load("//third_party/closure/templates:closure_template_js_library.bzl", "closure_template_js_library")
filegroup(
name = "js_files",
srcs = [
"Console.soy.js",
"Registrar.soy.js",
"Registry.soy.js",
],
)
closure_template_java_library(
name = "soy_java_wrappers",
srcs = glob(["*.soy"]),
java_package = "com.google.domain.registry.ui.soy.admin",
)
closure_template_js_library(
name = "Console",
srcs = ["Console.soy"],
globals = "//java/com/google/domain/registry/ui:globals.txt",
deps = ["//java/com/google/domain/registry/ui/soy:Console"],
)
closure_template_js_library(
name = "Registrar",
srcs = ["Registrar.soy"],
globals = "//java/com/google/domain/registry/ui:globals.txt",
deps = ["//java/com/google/domain/registry/ui/soy:Forms"],
)
closure_template_js_library(
name = "Registry",
srcs = ["Registry.soy"],
globals = "//java/com/google/domain/registry/ui:globals.txt",
deps = ["//java/com/google/domain/registry/ui/soy:Forms"],
)

View file

@ -0,0 +1,60 @@
{namespace registry.soy.admin.console autoescape="strict"}
/**
* Main admin page. Content is filled in dynamically via JS rendering
* of other templates in this directory.
*/
{template .main}
{@param user: map<string, ?>} /** Passed to googlebar. */
{@param xsrfToken: string} /** Token for callbacks to the server. */
{call registry.soy.console.header}
{param app: 'admin' /}
{param subtitle: 'Admin Console' /}
{/call}
{call registry.soy.console.googlebar data="all" /}
<div id="reg-app">
<div id="reg-appbar" class="{css kd-appbar}"></div>
{call .navbar_ /}
<div id="reg-content-and-footer">
<div id="reg-content">
<!-- Dynamic content goes here. -->
</div>
<div class="{css pageFooter}">
Here's lookin' at you, <a href="http://memegen.googleplex.com">.meme</a>!.
</div>
</div>
<div id="debug"></div>
</div>
{switch DEBUG}
{case com.google.domain.registry.ui.ConsoleDebug.PRODUCTION}
<script src="/assets/js/admin_bin_map.js"></script>
{case com.google.domain.registry.ui.ConsoleDebug.DEBUG}
<script src="/assets/js/admin_dbg.js"></script>
{case com.google.domain.registry.ui.ConsoleDebug.RAW}
<script src="/assets/sources/external/closure_library/closure/goog/base.js">
</script>
<script src="/assets/sources/deps-runfiles.js"></script>
<script>goog.require('registry.admin.main');</script>
{/switch}
{if isNonnull(DEBUG)}
<script>registry.admin.main({$xsrfToken});</script>
{/if}
{/template}
/**
* Navigation bar.
*/
{template .navbar_ private="true"}
<div id="reg-nav" class="{css kd-content-sidebar}">
<ul id="reg-navlist">
<li class="{css kd-sidebarlistitem}">
<a href="/_dr/admin#registry">Registries</a>
</li>
<li class="{css kd-sidebarlistitem}">
<a href="/_dr/admin#registrar">Registrars</a>
</li>
</ul>
</div>
{/template}

View file

@ -0,0 +1,360 @@
{namespace registry.soy.admin.registrar autoescape="strict"}
/**
* Set view for registrars.
* @param set
*/
{template .registrars}
<div class="{css set}">
<h1>Registrars</h1>
<table id="registrars">
<tr>
<th>Name</th>
<th>Status</th>
<th>TLDs</th>
</tr>
{foreach $registrar in $set}
<tr>
<td class="{css client-identifier}">
<a href="/_dr/admin#registrar/{$registrar['clientIdentifier']}">
{$registrar['clientIdentifier']}</a>
</td>
<td>
{$registrar.state}
</td>
<td>
{if isNonnull($registrar.allowedTlds)}
{length($registrar.allowedTlds)}
{else}
0
{/if}
</td>
</tr>
{/foreach}
</table>
<form name="create">
<h2>New Registrar</h2>
<table>
{call registry.soy.forms.inputFieldRow}
{param label: 'Registrar ID (clientIdentifier)' /}
{param name: 'clientIdentifier' /}
{/call}
{call registry.soy.forms.inputFieldRow}
{param name: 'registrarName' /}
{/call}
{call registry.soy.forms.inputFieldRow}
{param name: 'icannReferralEmail' /}
{/call}
{call registry.soy.forms.inputFieldRow}
{param name: 'emailAddress' /}
{/call}
{call registry.soy.forms.inputFieldRow}
{param label: 'Street' /}
{param name: 'localizedAddress.street[0]' /}
{/call}
{call registry.soy.forms.inputFieldRow}
{param label: 'City' /}
{param name: 'localizedAddress.city' /}
{/call}
{call registry.soy.forms.inputFieldRow}
{param label: 'Country code' /}
{param name: 'localizedAddress.countryCode' /}
{/call}
</table>
<button type="button"
id="create-button"
class="{css kd-button} {css kd-button-submit}">Create</button>
</form>
</div>
{/template}
/**
* Item view for registrar.
* @param item
*/
{template .registrar}
<form name="item" class="{css item} {css registrar}">
<h1>{$item['clientIdentifier']}</h1>
<table>
{call .registrarAdminFields_ data="all" /}
{call .registrarResourcesFields_ data="all" /}
{call .registrarWhoisFields_ data="all" /}
{call .registrarSecurityFields_ data="all" /}
{call .registrarContactFields_ data="all" /}
{call .registrarMiscFields_ data="all" /}
</table>
</form>
{/template}
/**
* Administrative-only fields.
* @private
*/
{template .registrarAdminFields_}
{@param item: map<string, ?>}
<tr class="{css section-lead}">
<th colspan="2">Admin settings - Admin Visible only</th>
{call registry.soy.forms.selectRow data="all"}
{param label: 'State' /}
{param name: 'state' /}
{param description: 'model: state' /}
{param options: ['PENDING', 'ACTIVE', 'SUSPENDED'] /}
{param selected: $item['state'] /}
{/call}
{call registry.soy.forms.inputFieldRow data="all"}
{param label: 'Allowed TLDs' /}
{param name: 'allowedTlds' /}
{param placeholder: 'e.g. foo,bar' /}
{param description: 'model: allowedTlds' /}
{/call}
{call registry.soy.forms.inputFieldRow data="all"}
{param label: 'New EPP password' /}
{param name: 'password' /}
{param description: 'model: password' /}
{/call}
{call registry.soy.forms.inputCheckboxRow data="all"}
{param label: 'Block premium names' /}
{param name: 'blockPremiumNames' /}
{param checked: $item['blockPremiumNames'] ? true : null /}
{param description: 'model: blockPremiumNames' /}
{/call}
{/template}
/**
* Public WHOIS fields.
* @private
*/
{template .registrarResourcesFields_}
{@param item: map<string, ?>}
<tr class="{css section-lead}">
<th colspan="2">Resources settings - Admin &amp; Registrar Visible</th>
{call registry.soy.forms.inputFieldRow data="all"}
{param label: 'Drive Folder ID' /}
{param name: 'driveFolderId' /}
{param description: 'model: driveFolderId' /}
{/call}
{/template}
/**
* Public WHOIS fields.
* @private
*/
{template .registrarWhoisFields_}
{@param item: map<string, ?>}
<tr class="{css section-lead}">
<th colspan="2">WHOIS settings - Admin &amp; Registrar Visible</th>
{call registry.soy.forms.inputFieldRow data="all"}
{param label: 'Name' /}
{param name: 'registrarName' /}
{param description: 'model: registrarName' /}
{/call}
{call registry.soy.forms.inputFieldRow data="all"}
{param label: 'IANA ID' /}
{param name: 'ianaIdentifier' /}
{param description: 'model: ianaIdentifier' /}
{/call}
{call registry.soy.forms.inputFieldRow data="all"}
{param label: 'ICANN referral email' /}
{param name: 'icannReferralEmail' /}
{param description: 'model: icannReferralEmail' /}
{/call}
{call registry.soy.forms.inputFieldRow data="all"}
{param label: 'Email' /}
{param name: 'emailAddress' /}
{param description: 'model: emailAddress' /}
{/call}
{call registry.soy.forms.inputFieldRow data="all"}
{param label: 'Phone' /}
{param name: 'phoneNumber' /}
{param description: 'model: phoneNumber' /}
{/call}
{call registry.soy.forms.inputFieldRow data="all"}
{param label: 'Fax' /}
{param name: 'faxNumber' /}
{param description: 'model: faxNumber' /}
{/call}
{call registry.soy.forms.inputFieldRowWithValue data="all"}
{param label: 'Street 1' /}
{param name: 'localizedAddress.street[0]' /}
{param value: $item['localizedAddress'].street[0] /}
{param description: 'model: localizedAddress.street[0]' /}
{/call}
{call registry.soy.forms.inputFieldRowWithValue data="all"}
{param label: 'Street 2' /}
{param name: 'localizedAddress.street[1]' /}
{param value: $item['localizedAddress'].street[1] /}
{param description: 'model: localizedAddress.street[1]' /}
{/call}
{call registry.soy.forms.inputFieldRowWithValue data="all"}
{param label: 'Street 3' /}
{param name: 'localizedAddress.street[2]' /}
{param value: $item['localizedAddress'].street[2] /}
{param description: 'model: localizedAddress.street[2]' /}
{/call}
{call registry.soy.forms.inputFieldRowWithValue data="all"}
{param label: 'City' /}
{param name: 'localizedAddress.city' /}
{param value: $item['localizedAddress'].city /}
{param description: 'model: localizedAddress.city' /}
{/call}
{call registry.soy.forms.inputFieldRowWithValue data="all"}
{param label: 'State/Region' /}
{param name: 'localizedAddress.state' /}
{param value: $item['localizedAddress'].state /}
{param description: 'model: localizedAddress.state' /}
{/call}
{call registry.soy.forms.inputFieldRowWithValue data="all"}
{param label: 'Zip/Postal code' /}
{param name: 'localizedAddress.zip' /}
{param value: $item['localizedAddress'].zip /}
{param description: 'model: localizedAddress.zip' /}
{/call}
{call registry.soy.forms.inputFieldRowWithValue data="all"}
{param label: 'Country code' /}
{param name: 'localizedAddress.countryCode' /}
{param value: $item['localizedAddress'].countryCode /}
{param description: 'model: localizedAddress.countryCode' /}
{/call}
<tr class="{css section-lead}">
<th colspan="2"><em>These are filled in by default to google servers</em></th>
{call registry.soy.forms.inputFieldRow data="all"}
{param label: 'WHOIS server' /}
{param name: 'whoisServer' /}
{param description: 'model: whoisServer' /}
{param placeholder: 'e.g. whois.nic.foo' /}
{/call}
{call registry.soy.forms.inputFieldRow data="all"}
{param label: 'Referral URL' /}
{param name: 'referralUrl' /}
{param description: 'model: referralUrl' /}
{param placeholder: 'http://whois.nic.google' /}
{/call}
{/template}
/**
* Security settings, like SSL cert and IP whitelist.
* @private
*/
{template .registrarSecurityFields_}
{@param item: map<string, ?>}
<tr class="{css section-lead}">
<th colspan="2">Security settings - Admin &amp; Registrar Visible</th>
{call registry.soy.forms.inputFieldRow data="all"}
{param label: 'IP whitelist' /}
{param name: 'ipAddressWhitelist' /}
{param placeholder: 'e.g. 1.1.1.1/24' /}
{param description: 'model: ipAddressWhitelist' /}
{/call}
{call registry.soy.forms.inputFieldRow data="all"}
{param label: 'Telephone passcode' /}
{param name: 'phonePasscode' /}
{param placeholder: 'e.g. 01234' /}
{param description: 'model: ipAddressWhitelist (Registrar read-only)' /}
{/call}
{call registry.soy.forms.textareaFieldRow data="all"}
{param label: 'SSL certificate' /}
{param name: 'clientCertificate' /}
{param description: 'model: clientCertificate' /}
{/call}
<tr>
<td><label>clientCertificateHash</label></td>
<td>{$item['clientCertificateHash']}</td>
</tr>
<tr>
<td><label>lastCertificateUpdateTime</label></td>
<td>{$item['lastCertificateUpdateTime']}</td>
</tr>
{/template}
/**
* Registrar communication contacts.
* @private
*/
{template .registrarContactFields_}
{@param item: map<string, ?>}
<tr class="{css section-lead}">
<th colspan="2">
<button id="add-contact-button" type="button"
class="{css kd-button} {css add-contact-button} {css hidden}">
Add Contact</button>
Contacts
</th>
</tr>
<tr>
<td id="contacts" colspan="2">
{if isNonnull($item['contacts'])}
{foreach $c in $item['contacts']}
{call .contactInfo data="all"}
{param namePrefix: 'contacts[' + index($c) + '].' /}
{param item: $c /}
{/call}
{/foreach}
{/if}
</td>
</tr>
{/template}
/**
* Extra fields for internal use.
* @private
*/
{template .registrarMiscFields_}
{@param item: map<string, ?>}
<tr class="{css section-lead}">
<th colspan="2">External IDs</th>
{call registry.soy.forms.inputFieldRow data="all"}
{param name: 'billingIdentifier' /}
{/call}
<tr class="{css section-lead}">
<th colspan="2">Does anybody use this stuff?</th>
{call registry.soy.forms.inputFieldRow data="all"}
{param name: 'url' /}
{/call}
<tr class="{css section-lead}">
<th colspan="2">Metadata</th>
<tr>
<td>creationTime</td>
<td>{$item['creationTime']}</td>
<tr>
<td>lastUpdateTime</td>
<td>{$item['lastUpdateTime']}</td>
{/template}
/** Contact info. Removable. */
{template .contactInfo}
{@param namePrefix: string}
<div>
<table>
{call registry.soy.forms.inputFieldRow data="all"}
{param name: 'name' /}
{/call}
{call registry.soy.forms.inputFieldRow data="all"}
{param name: 'emailAddress' /}
{/call}
{call registry.soy.forms.inputFieldRow data="all"}
{param name: 'phoneNumber' /}
{/call}
{call registry.soy.forms.inputFieldRow data="all"}
{param name: 'faxNumber' /}
{/call}
{call registry.soy.forms.inputFieldRow data="all"}
{param name: 'types' /}
{/call}
{call registry.soy.forms.inputFieldRow data="all"}
{param name: 'gaeUserId' /}
{/call}
</table>
<button type="button" class="{css kd-button} {css remove} {css hidden}">
Remove
</button>
</div>
{/template}

View file

@ -0,0 +1,87 @@
{namespace registry.soy.admin.registry autoescape="strict"}
/**
* Set view for registries.
* @param set
*/
{template .registries}
<div class="{css set}">
<h1>Registries</h1>
<table id="registries">
<tr>
<th>TLD
<th>Status
{foreach $tld in $set}
<tr>
<td class="{css name} {css title}">
<a href="/_dr/admin#registry/{$tld.name}">{$tld.name}</a>
<td class="{css status}">{$tld.state}
{/foreach}
</table>
<form name="create">
<h2>New Registry</h2>
<table>
{call registry.soy.forms.inputFieldRow}
{param name: 'newTldName'/}
{/call}
</table>
<button type="button"
id="create-button"
class="{css kd-button} {css kd-button-submit}">Create</button>
</form>
</div>
{/template}
/**
* Item view for registry.
* @param item
*/
{template .registry}
<form name="item" class="{css item} {css registrar}">
<h1>{$item.name}</h1>
<table>
<tr>
<td>state:
<td>
{$item['state']}
<tr>
{call registry.soy.forms.inputFieldRow data="all"}
{param name: 'tldStateTransitions'/}
{param placeholder: 'e.g. PREDELEGATION,T00:00:00Z;SUNRUSH,T04:00:00Z'/}
{/call}
<tr class="{css section-lead}">
<th colspan="2">Periods</th>
{call registry.soy.forms.inputFieldRow data="all"}
{param name: 'addGracePeriod'/}
{/call}
{call registry.soy.forms.inputFieldRow data="all"}
{param name: 'autoRenewGracePeriod'/}
{/call}
{call registry.soy.forms.inputFieldRow data="all"}
{param name: 'redemptionGracePeriod'/}
{/call}
{call registry.soy.forms.inputFieldRow data="all"}
{param name: 'renewGracePeriod'/}
{/call}
{call registry.soy.forms.inputFieldRow data="all"}
{param name: 'transferGracePeriod'/}
{/call}
{call registry.soy.forms.inputFieldRow data="all"}
{param name: 'automaticTransferLength'/}
{/call}
{call registry.soy.forms.inputFieldRow data="all"}
{param name: 'pendingDeleteLength'/}
{/call}
<tr class="{css section-lead}">
<th colspan="2">Metadata (for GCHQ)</th>
<tr>
<td>creationTime
<td>{$item['creationTime']}
<tr>
<td>lastUpdateTime
<td>{$item['lastUpdateTime']}
</table>
</form>
{/template}

View file

@ -0,0 +1,22 @@
package(default_visibility = ["//java/com/google/domain/registry:registry_project"])
load("//third_party/closure/templates:closure_template_java_library.bzl", "closure_template_java_library")
load("//third_party/closure/templates:closure_template_js_library.bzl", "closure_template_js_library")
filegroup(
name = "js_files",
srcs = ["DomainCheckFeeEpp.soy.js"],
)
closure_template_java_library(
name = "soy_java_wrappers",
srcs = glob(["*.soy"]),
java_package = "com.google.domain.registry.ui.soy.api",
)
closure_template_js_library(
name = "DomainCheckFeeEpp",
srcs = ["DomainCheckFeeEpp.soy"],
globals = "//java/com/google/domain/registry/ui:globals.txt",
)

View file

@ -0,0 +1,28 @@
{namespace registry.soy.api autoescape="strict"}
/**
* Domain check fee request for one domain
* @param domainName
*/
{template .domaincheckfee}
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command>
<check>
<domain:check xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
<domain:name>{$domainName}</domain:name>
</domain:check>
</check>
<extension>
<fee:check xmlns:fee="urn:ietf:params:xml:ns:fee-0.6">
<fee:domain>
<fee:name>{$domainName}</fee:name>
<fee:command>create</fee:command>
<fee:period unit="y">1</fee:period>
</fee:domain>
</fee:check>
</extension>
<clTRID>CheckApiServlet</clTRID>
</command>
</epp>
{/template}

View file

@ -0,0 +1,108 @@
package(default_visibility = ["//java/com/google/domain/registry:registry_project"])
load("//third_party/closure/templates:closure_template_java_library.bzl", "closure_template_java_library")
load("//third_party/closure/templates:closure_template_js_library.bzl", "closure_template_js_library")
filegroup(
name = "js_files",
srcs = [
"Console.soy.js",
"Contact.soy.js",
"ContactEpp.soy.js",
"ContactSettings.soy.js",
"Domain.soy.js",
"DomainEpp.soy.js",
"Epp.soy.js",
"Host.soy.js",
"HostEpp.soy.js",
"Payment.soy.js",
"SecuritySettings.soy.js",
"WhoisSettings.soy.js",
],
)
closure_template_java_library(
name = "soy_java_wrappers",
srcs = glob(["*.soy"]),
java_package = "com.google.domain.registry.ui.soy.registrar",
)
closure_template_js_library(
name = "Console",
srcs = ["Console.soy"],
globals = "//java/com/google/domain/registry/ui:globals.txt",
deps = ["//java/com/google/domain/registry/ui/soy:Console"],
)
closure_template_js_library(
name = "ContactEpp",
srcs = ["ContactEpp.soy"],
globals = "//java/com/google/domain/registry/ui:globals.txt",
)
closure_template_js_library(
name = "ContactSettings",
srcs = ["ContactSettings.soy"],
globals = "//java/com/google/domain/registry/ui:globals.txt",
deps = ["//java/com/google/domain/registry/ui/soy:Forms"],
)
closure_template_js_library(
name = "Contact",
srcs = ["Contact.soy"],
globals = "//java/com/google/domain/registry/ui:globals.txt",
deps = ["//java/com/google/domain/registry/ui/soy:Forms"],
)
closure_template_js_library(
name = "Domain",
srcs = ["Domain.soy"],
globals = "//java/com/google/domain/registry/ui:globals.txt",
deps = ["//java/com/google/domain/registry/ui/soy:Forms"],
)
closure_template_js_library(
name = "DomainEpp",
srcs = ["DomainEpp.soy"],
globals = "//java/com/google/domain/registry/ui:globals.txt",
)
closure_template_js_library(
name = "Epp",
srcs = ["Epp.soy"],
globals = "//java/com/google/domain/registry/ui:globals.txt",
)
closure_template_js_library(
name = "HostEpp",
srcs = ["HostEpp.soy"],
globals = "//java/com/google/domain/registry/ui:globals.txt",
)
closure_template_js_library(
name = "Host",
srcs = ["Host.soy"],
globals = "//java/com/google/domain/registry/ui:globals.txt",
deps = ["//java/com/google/domain/registry/ui/soy:Forms"],
)
closure_template_js_library(
name = "Payment",
srcs = ["Payment.soy"],
globals = "//java/com/google/domain/registry/ui:globals.txt",
deps = ["//java/com/google/domain/registry/ui/soy:Forms"],
)
closure_template_js_library(
name = "SecuritySettings",
srcs = ["SecuritySettings.soy"],
globals = "//java/com/google/domain/registry/ui:globals.txt",
)
closure_template_js_library(
name = "WhoisSettings",
srcs = ["WhoisSettings.soy"],
globals = "//java/com/google/domain/registry/ui:globals.txt",
deps = ["//java/com/google/domain/registry/ui/soy:Forms"],
)

View file

@ -0,0 +1,257 @@
{namespace registry.soy.registrar.console autoescape="strict"}
/**
* Main registrar page. We use a single page architecture (SPA) so content is
* filled in dynamically into reg-app element via JS rendering of Component.soy
* and other templates within it.
*/
{template .main}
{@param user: map<string, ?>} /** Passed to googlebar. */
{@param xsrfToken: string} /** Security token. */
{@param clientId: string} /** App Engine user ID. */
{call registry.soy.console.header}
{param app: 'registrar' /}
{param subtitle: 'Registrar Console' /}
{/call}
{call registry.soy.console.googlebar data="all" /}
<div id="reg-app">
<div id="reg-appbar" class="{css kd-appbar}"></div>
{call .navbar_ /}
<div id="reg-content-and-footer">
<div id="reg-content">
// Dynamic content goes here.
</div>
{call registry.soy.console.footer /}
</div>
</div>
{switch DEBUG}
{case com.google.domain.registry.ui.ConsoleDebug.PRODUCTION}
{if $user['isAdmin']}
<script src="/assets/js/registrar_bin_map.js"></script>
{else}
<script src="/assets/js/registrar_bin.js"></script>
{/if}
{case com.google.domain.registry.ui.ConsoleDebug.DEBUG}
<script src="/assets/js/registrar_dbg.js"></script>
{case com.google.domain.registry.ui.ConsoleDebug.RAW}
<script src="/assets/sources/external/closure_library/closure/goog/base.js">
</script>
<script src="/assets/sources/deps-runfiles.js"></script>
<script>goog.require('registry.registrar.main');</script>
{/switch}
{if isNonnull(DEBUG)}
<script>registry.registrar.main({$xsrfToken}, {$clientId});</script>
{/if}
{/template}
/** Sidebar nav. Ids on each elt for testing only. */
{template .navbar_ private="true"}
<div id="reg-nav" class="{css kd-content-sidebar}">
<ul id="reg-navlist">
<li>
<a href="/registrar#">Home</a>
<li>
<a href="/registrar#resources">Resources &amp; billing</a>
<li>
<ul>
<span class="{css reg-navlist-sub}">Settings</span>
<li>
<a href="/registrar#whois-settings">WHOIS</a>
<li>
<a href="/registrar#security-settings">Security</a>
<li>
<a href="/registrar#contact-settings">Contact</a>
</ul>
<li>
<a href="/registrar#contact-us">Contact us</a>
</ul>
</div>
{/template}
/**
* Feature disabled
*/
{template .disabled}
{call registry.soy.console.header}
{param app: 'registrar' /}
{param subtitle: 'Console Disabled' /}
{/call}
<div class="{css whoAreYou-disabled}">
<a class="{css logo}" href="/registrar">
<img src="/assets/images/glogo_black.png" alt="Google">Registry
</a>
<h1>Console is disabled</h1>
<p>
The Registrar Console of the Google Registry is temporarily disabled. Please contact your
customer service representative for more information.
<p>
<img src="/assets/images/android_sad.png">
</div>
{/template}
/**
* Who goes thar?!
*/
{template .whoareyou}
{@param user: map<string, string>}
{call registry.soy.console.header}
{param app: 'registrar' /}
{param subtitle: 'Please Login' /}
{/call}
<div class="{css whoAreYou}">
<a class="{css logo}" href="/registrar">
<img src="/assets/images/glogo_black.png" alt="Google">Registry
</a>
<h1>You need permission</h1>
<p>
The account you are logged in as is not associated with Google
Registry. Please contact your customer service representative or
switch to an account associated with Google Registry.
{if isNonnull($user['name'])}
<p>You are signed in as <strong>{$user['name']}</strong>.
{/if}
<div>
<a href="{$user['actionHref']}"
class="{css kd-button} {css kd-button-submit}"
tabindex="-1">{$user['actionName']}</a>
</div>
</div>
{/template}
/** Welcome text and nav. */
{template .dashboard}
<div id="domain-registrar-dashboard">
<h1>Welcome to the Google Registry Registrar Console<super>BETA</super></h1>
<p>This console can help you manage your relationship with Google
Registry and allow self-service for key operations.</p>
<table>
<tr>
<td>
<div class="{css dashbox}">
<img src="/assets/images/homeResources.png">
<h2>Access Resources</h2>
Use Google Drive to view<br>
onboarding FAQs, technical<br>
documentation &amp; billing reports.
</div>
<td>
<div class="{css dashbox}">
<img id="gear" src="/assets/images/homeSettings.png">
<h2>Manage Settings</h2>
Security, WHOIS &amp; contact<br>
settings are easy to view and edit.
</div>
<td>
<div class="{css dashbox}">
<img src="/assets/images/homeContact.png">
<h2>Contact Us</h2>
View important phone &amp; email<br>
contact information for<br>
Google Registry.
</div>
</tr>
</table>
<p><img id="rotate" src="/assets/images/explore_24.png">We're
hard at work creating new features for the console. Stay tuned
for updates!
</div>
{/template}
/** Contact us. */
{template .contactUs}
{@param? phonePasscode: string}
<div id="domain-registrar-contact-us" class="{css item}">
<h1>Contact us</h1>
<p>Our support team can assist you with any technical or operational
questions you may have regarding our registry services.
<table>
<tr class="{css kd-settings-pane-section}">
<td>
<label class="{css setting-label}">Email</label>
</td>
<td class="{css setting}">
<p>
<a href="mailto:registry-integration@google.com">
registry-integration@google.com</a><br>
For help with OT&amp;E sandbox and certification, or new
technical requirements for any of our new TLD launches.
<p>
<a href="mailto:registry-support@google.com">
registry-support@google.com</a><br>
For general purpose questions once you are integrated with
Google Registry. If the issue is urgent, please put
&quot;Urgent&quot; in the email title.
<p class="{css description}">Note: You may receive occasional service
announcements
via <strong>registrar-announcement@google.com</strong>. You
will not be able to reply to those messages.
<tr><td colspan="2"><hr>
<tr class="{css kd-settings-pane-section}">
<td>
<label class="{css setting-label}">Phone</label>
<span class="{css description}">For general support inquiries 24x7</span>
</td>
<td class="{css setting}">
<p>Please be ready with your account name and telephone passcode
when contacting us by phone.
<p>Your telephone passcode
is: <span id="domain-registrar-phone-passcode">
{if (isNonnull($phonePasscode))}
{$phonePasscode}
{else}
<em>pending allocation</em>
{/if}
</span>
<p>Call us at:
<p id="registry-phone"><a href="tel:+14049788419">+1 (404) 978 8419</a>
</td>
</table>
</div>
{/template}
/** Resources and billing links. */
{template .resources}
{@param? driveFolderId: string}
<div id="domain-registrar-resources">
<h1>Resources &amp; billing</h1>
<p>
Google Registry uses <strong>Google Drive</strong> to share important documentation.
<h2><img src="/assets/images/folder.png">TLD information</h2>
<p>
Find onboarding FAQs &amp; technical documentation in this folder.
<br><br>
<a class="{css kd-button} {css kd-button-submit}"
href="https://drive.google.com/a/googleregistry.co/folderview?id=0B-X8z5IcswtqNmw5ekx2bU51ckk&usp=sharing"
target="_blank">View TLD information on Google Drive</a>
<h2><img src="/assets/images/folder.png">Billing details</h2>
<p>
Find information on all transaction activity behind your monthly invoices in this folder.
<p>
{if (isNonnull($driveFolderId))}
<a id="reg-resources-driveLink"
class="{css kd-button} {css kd-button-submit}"
href="https://drive.google.com/a/googleregistry.co/folderview?id={$driveFolderId}&usp=sharing"
target="_blank">View billing details on Google Drive</a>
{else}
<em>Your billing folder is pending allocation.</em>
{/if}
</div>
{/template}
/** Loading page. */
{template .loading}
<img alt="[Loading...]" src="/assets/images/loader4x.gif" width="87" height="87">
{/template}

View file

@ -0,0 +1,165 @@
{namespace registry.soy.registrar.contact autoescape="strict"}
/**
* Set view for contacts.
*/
{template .set}
<div class="{css set} {css contact}">
<p>Please enter a query for a single contact in the form "contact/[contact id]".
</div>
{/template}
/**
* Item view for contact.
* @param? item
* @param? readonly passed through to field rendering.
*/
{template .item}
<form name="item" class="{css item} {css contact}">
<h1>
{if isNonnull($item['contact:id'])}
{$item['contact:id']['keyValue']}
{else}
New Contact
{/if}
</h1>
<table>
<tr class="{css section-lead}">
<th colspan="2"><h2>Authentication</h2></th>
</tr>
{if not isNonnull($item['contact:id'])}
{call registry.soy.forms.inputFieldRow data="all"}
{param label: 'Contact ID *' /}
{param name: 'contact:id' /}
{/call}
{/if}
{call registry.soy.forms.inputFieldRowWithValue data="all"}
{param label: 'Password *' /}
{param name: 'contact:authInfo.contact:pw' /}
{param value: isNonnull($item['contact:authInfo']) ?
$item['contact:authInfo']['contact:pw'] : '' /}
{/call}
<tr class="{css section-lead}">
<th colspan="2"><h2>Contacts</h2></th>
</tr>
{call registry.soy.forms.inputFieldRowWithValue data="all"}
{param label: 'Email *' /}
{param name: 'contact:email' /}
{param value: $item['contact:email'] /}
{/call}
{call registry.soy.forms.inputFieldRowWithValue data="all"}
{param label: 'Phone' /}
{param name: 'contact:voice' /}
{param value: $item['contact:voice'] /}
{param placeholder: 'e.g. +1.6508675309' /}
{/call}
{call registry.soy.forms.inputFieldRowWithValue data="all"}
{param label: 'Fax' /}
{param name: 'contact:fax' /}
{param value: $item['contact:fax'] /}
{param placeholder: 'e.g. +1.2125552638' /}
{/call}
<tr class="{css section-lead} {css subsection}">
<th id="contact-postalInfoHeader" colspan="2">
<h3>Postal address(es)</h3>
<button id="domain-contact-postalInfo-add-button" type="button"
class="{css kd-button} {css reg-add}"
{if $readonly}disabled{/if}>
Add Localized Address
</button>
</th>
</tr>
<tr>
<td colspan="2">
<div id="contact-postalInfo">
{if isNonnull($item['contact:postalInfo'])}
{foreach $pi in $item['contact:postalInfo']}
{call .postalInfo data="all"}
{param localized: index($pi) == 1 /}
{param item: $pi/}
{param itemPrefix: 'contact:' /}
{param namePrefix: 'contact:postalInfo[' + index($pi) + '].contact:' /}
{/call}
{/foreach}
{else}
{call .postalInfo data="all"}
{param prefix: 'contact:' /}
{param namePrefix: 'contact:postalInfo[0].contact:' /}
{/call}
{/if}
<table id="domain-contact-postalInfos-footer"/>
</div>
</td>
</tr>
</table>
{if isNonnull($item['contact:id'])}
<input type="hidden" name="contact:id" value="{$item['contact:id']['keyValue']}"/>
{/if}
</form>
{/template}
/**
* Postal info.
* @param item
* @param namePrefix
* @param? localized if true, this is the second, localized postalInfo.
*/
{template .postalInfo}
<table>
<tr><th colspan=2>
{if $localized}
<strong>Localized address</strong><br>
<span class="{css info}">Full UTF-8 charsets allowed</span>
{else}
<strong>Internationalized address</strong><br>
<span class="{css info}">Only 7-bit ASCII allowed</span>
{/if}
</th></tr>
{call registry.soy.forms.inputFieldRowWithValue data="all"}
{param label: 'Name *' /}
{param name: 'name' /}
{param value: $item['contact:name']/}
{/call}
{call registry.soy.forms.inputFieldRowWithValue data="all"}
{param label: 'Organization' /}
{param name: 'org' /}
{param value: $item['contact:org'] /}
{/call}
{call registry.soy.forms.textareaFieldRowWithValue data="all"}
{param label: 'Street' /}
{param name: 'street' /}
{param namePrefix: $namePrefix + 'addr.contact:' /}
{param value: isNonnull($item['contact:addr']) ? $item['contact:addr']['contact:street'] : '' /}
{/call}
{call registry.soy.forms.inputFieldRowWithValue data="all"}
{param label: 'City *' /}
{param name: 'city' /}
{param namePrefix: $namePrefix + 'addr.contact:' /}
{param value: isNonnull($item['contact:addr']) ? $item['contact:addr']['contact:city'] : '' /}
{/call}
{call registry.soy.forms.inputFieldRowWithValue data="all"}
{param label: 'State / Region' /}
{param name: 'sp' /}
{param namePrefix: $namePrefix + 'addr.contact:' /}
{param value: isNonnull($item['contact:addr']) ? $item['contact:addr']['contact:sp'] : '' /}
{param placeholder: 'e.g. CA' /}
{/call}
{call registry.soy.forms.inputFieldRowWithValue data="all"}
{param label: 'Zip / Postal code' /}
{param name: 'pc' /}
{param namePrefix: $namePrefix + 'addr.contact:' /}
{param value: isNonnull($item['contact:addr']) ? $item['contact:addr']['contact:pc'] : '' /}
{param placeholder: 'e.g. 10282' /}
{/call}
{call registry.soy.forms.inputFieldRowWithValue data="all"}
{param label: 'Country code *' /}
{param name: 'cc' /}
{param namePrefix: $namePrefix + 'addr.contact:' /}
{param value: isNonnull($item['contact:addr']) ? $item['contact:addr']['contact:cc'] : '' /}
{param placeholder: 'e.g. US' /}
{/call}
</table>
{/template}

View file

@ -0,0 +1,104 @@
{namespace registry.soy.registrar.contactepp autoescape="strict"}
/* XXX: Forces first postalInfo type to be "int" and second "loc" if it is
* present, for compatibility with the server. */
/**
* Contact create request.
* @param item
* @param clTrid
*/
{template .create}
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command>
<create>
<contact:create xmlns:contact="urn:ietf:params:xml:ns:contact-1.0">
<contact:id>{$item['contact:id']}</contact:id>
{foreach $pi in $item['contact:postalInfo']}
<contact:postalInfo type="{if index($pi) == 0}int{else}loc{/if}">
<contact:name>{$pi['contact:name']}</contact:name>
<contact:org>{$pi['contact:org']}</contact:org>
<contact:addr>
{let $addr: $pi['contact:addr'] /}
<contact:street>{$addr['contact:street']}</contact:street>
<contact:city>{$addr['contact:city']}</contact:city>
<contact:sp>{$addr['contact:sp']}</contact:sp>
<contact:pc>{$addr['contact:pc']}</contact:pc>
<contact:cc>{$addr['contact:cc']}</contact:cc>
</contact:addr>
</contact:postalInfo>
{/foreach}
<contact:voice>{$item['contact:voice']}</contact:voice>
<contact:fax>{$item['contact:fax']}</contact:fax>
<contact:email>{$item['contact:email']}</contact:email>
<contact:authInfo>
<contact:pw>{$item['contact:authInfo']['contact:pw']}</contact:pw>
</contact:authInfo>
</contact:create>
</create>
<clTRID>{$clTrid}</clTRID>
</command>
</epp>
{/template}
/* XXX: Forces first postalInfo type to be "int" and second "loc" if it is
* present, for compatibility with the server. */
/**
* Contact update request.
* @param item
* @param clTrid
*/
{template .update}
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command>
<update>
<contact:update xmlns:contact="urn:ietf:params:xml:ns:contact-1.0">
<contact:id>{$item['contact:id']}</contact:id>
<contact:chg>
{foreach $pi in $item['contact:postalInfo']}
<contact:postalInfo type="{if index($pi) == 0}int{else}loc{/if}">
<contact:name>{$pi['contact:name']}</contact:name>
<contact:org>{$pi['contact:org']}</contact:org>
{let $addr: $pi['contact:addr'] /}
<contact:addr>
<contact:street>{$addr['contact:street']}</contact:street>
<contact:city>{$addr['contact:city']}</contact:city>
<contact:sp>{$addr['contact:sp']}</contact:sp>
<contact:pc>{$addr['contact:pc']}</contact:pc>
<contact:cc>{$addr['contact:cc']}</contact:cc>
</contact:addr>
</contact:postalInfo>
{/foreach}
<contact:voice>{$item['contact:voice']}</contact:voice>
<contact:fax>{$item['contact:fax']}</contact:fax>
<contact:email>{$item['contact:email']}</contact:email>
<contact:authInfo>
<contact:pw>{$item['contact:authInfo']['contact:pw']}</contact:pw>
</contact:authInfo>
</contact:chg>
</contact:update>
</update>
<clTRID>{$clTrid}</clTRID>
</command>
</epp>
{/template}
/**
* Contact info request.
* @param id
* @param clTrid
*/
{template .info}
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command>
<info>
<contact:info xmlns:contact="urn:ietf:params:xml:ns:contact-1.0">
<contact:id>{$id}</contact:id>
</contact:info>
</info>
<clTRID>{$clTrid}</clTRID>
</command>
</epp>
{/template}

View file

@ -0,0 +1,291 @@
{namespace registry.soy.registrar.contacts autoescape="strict"}
/** Registrar contacts listing for view only. */
{template .set}
{@param contactsByType: map<string, ?>}
{let $possibleTypesLookup: [
['admin', 'Primary', 'Primary contact for general issues.'],
['billing', 'Billing', 'Contact for financial communications & invoices.'],
['tech', 'Technical', 'Contact for technical communications about the registry.'],
['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.']] /}
<div class="{css set}">
<h1>Contact settings</h1>
<table>
{foreach $type in $possibleTypesLookup}
{if isNonnull($contactsByType[$type[0]])}
<tr class="{css kd-settings-pane-section}">
<td>
<label class="{css setting-label}">{$type[1]}
{sp}contact{if length($contactsByType[$type[0]]) > 1}s{/if}</label>
<span class="{css description}">{$type[2]}</span>
</td>
<td id="{$type[0]}-contacts"
class="{css info} {css summary} {css domain-registrar-contacts}">
{foreach $c in $contactsByType[$type[0]]}
{call .contactInfoCompact}
{param namePrefix: 'contacts[' + index($c) + '].' /}
{param name: $c['name'] /}
{param emailAddress: $c['emailAddress'] /}
{param visibleInWhois:
($c['visibleInWhoisAsAdmin'] or $c['visibleInWhoisAsTech']) /}
{param phoneNumber: $c['phoneNumber'] /}
{param faxNumber: $c['faxNumber'] /}
{/call}
{if (index($c) + 1) % 3 == 0}<br>{/if}
{/foreach}
</td>
{/if}
{/foreach}
</table>
</div>
{/template}
/** Compact readonly contact info view. */
{template .contactInfoCompact}
{@param namePrefix: string}
{@param name: string}
{@param emailAddress: string}
{@param visibleInWhois: bool}
{@param? phoneNumber: string}
{@param? faxNumber: string}
<div class="{css domain-registrar-contact}">
<div class="{css domain-registrar-contact-name}"
id="{$namePrefix}name">
{$name}
{if $visibleInWhois}
<i class="{css domain-registrar-contact-visible-in-whois}"
onmouseover="this.childNodes[0].style.visibility = 'visible'"
onmouseout="this.childNodes[0].style.visibility = 'hidden'">
<div class="{css tooltip}">
Visible in WHOIS <span class="{css pointer}"></span>
</div>
</i>
{/if}
</div>
{if isNonnull($phoneNumber)}
<div class="{css domain-registrar-contact-phoneNumber}"
id="{$namePrefix}phoneNumber">{$phoneNumber}</div>
{/if}
{if isNonnull($faxNumber)}
<div class="{css domain-registrar-contact-faxNumber}"
id="{$namePrefix}faxNumber">{$faxNumber} (Fax)</div>
{/if}
<div class="{css domain-registrar-contact-emailAddress}"
id="{$namePrefix}emailAddress">{$emailAddress}</div>
<a href="#contact-settings/{$emailAddress}">View/Edit</a>
</div>
{/template}
/** Registrar contact item page. */
{template .contact}
{@param namePrefix: string}
{@param item: map<string, ?>}
{@param actualTypesLookup: map<string, bool>}
{@param readonly: bool}
<form name="item" class="{css item} {css registrar}">
<h1>Contact Details</h1>
{call .contactInfo data="all"}
{param namePrefix: $namePrefix /}
{param item: $item /}
{param actualTypesLookup: $actualTypesLookup /}
{param readonly: $readonly /}
{/call}
</form>
{/template}
/** Contact info for view and edit. */
{template .contactInfo}
{@param namePrefix: string}
{@param item: map<string, ?>}
{@param actualTypesLookup: map<string, bool>}
{@param? readonly: bool}
{let $possibleTypesLookup: [
['admin', 'Primary', 'Primary contact for general issues.'],
['billing', 'Billing', 'Contact for financial communications & invoices.'],
['tech', 'Technical', 'Contact for technical communications about the registry.'],
['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.']] /}
<div>
<table>
{call registry.soy.forms.inputFieldRow data="all"}
{param label: 'Name' /}
{param namePrefix: $namePrefix /}
{param name: 'name' /}
{/call}
{call registry.soy.forms.inputFieldRow data="all"}
{param label: 'Email' /}
{param namePrefix: $namePrefix /}
{param name: 'emailAddress' /}
{/call}
{call registry.soy.forms.inputFieldRow data="all"}
{param label: 'Phone' /}
{param namePrefix: $namePrefix /}
{param name: 'phoneNumber' /}
{/call}
{call registry.soy.forms.inputFieldRow data="all"}
{param label: 'Fax' /}
{param namePrefix: $namePrefix /}
{param name: 'faxNumber' /}
{/call}
{if $readonly}
{call .contactTypeSettingsView_}
{param item: $item /}
{param possibleTypesLookup: $possibleTypesLookup /}
{param actualTypesLookup: $actualTypesLookup /}
{/call}
{else}
{call .contactTypeSettingsEdit_}
{param item: $item /}
{param namePrefix: $namePrefix /}
{param possibleTypesLookup: $possibleTypesLookup /}
{param actualTypesLookup: $actualTypesLookup /}
{/call}
{/if}
</table>
{if isNonnull($item['gaeUserId'])}
<input type="hidden" name="{$namePrefix}gaeUserId" value="{$item['gaeUserId']}">
{/if}
</div>
{/template}
/** @private */
{template .contactTypeSettingsView_ private="true"}
{@param item: map<string, ?>}
{@param possibleTypesLookup: list<list<string>>}
{@param actualTypesLookup: map<string, bool>}
<tr class="{css kd-settings-pane-section}">
<td>
<label class="{css setting-label}">Contact type</label>
<td class="{css setting}">
<div class="{css setting-item-list}">
{foreach $type in $possibleTypesLookup}
{if $actualTypesLookup[$type[0]]}
<div>{$type[1]} contact</div>
{/if}
{/foreach}
</div>
</td>
<tr><td colspan="2"><hr></tr>
<tr class="{css kd-settings-pane-section}">
<td>
<label class="{css setting-label}">Show in WHOIS</label>
</td>
<td class="{css setting}">
<p class="{css setting-item-list}">
{let $visibleAsAdmin: $item['visibleInWhoisAsAdmin'] == true /}
{let $visibleAsTech: $item['visibleInWhoisAsTech'] == true /}
{if (not $visibleAsAdmin) and (not $visibleAsTech)}
<span class="{css whois-not-visible}">Not visible in WHOIS</span>
{else}
{if $visibleAsAdmin}Admin{/if}
{if $visibleAsAdmin and $visibleAsTech},{sp}{/if}
{if $visibleAsTech}Technical{/if}
{/if}
{/template}
/** @private */
{template .contactTypeSettingsEdit_ private="true"}
{@param item: map<string, ?>}
{@param namePrefix: string}
{@param possibleTypesLookup: list<list<string>>}
{@param actualTypesLookup: map<string, bool>}
<tr class="{css kd-settings-pane-section}">
<td>
<label class="{css setting-label}">Contact type</label>
<span class="{css description}">
Subscribe this contact to the checked mailing lists.
</span>
</td>
<td class="{css setting}">
{call .contactCheckboxes_}
{param namePrefix: $namePrefix /}
{param possibleTypesLookup: $possibleTypesLookup /}
{param actualTypesLookup: $actualTypesLookup /}
{/call}
</tr>
<tr><td colspan="2"><hr></tr>
{call .whoisVisibleRadios_}
{param description: 'Show in WHOIS as Admin contact' /}
{param fieldName: $namePrefix + 'visibleInWhoisAsAdmin' /}
{param visible: $item['visibleInWhoisAsAdmin'] == true /}
{/call}
{call .whoisVisibleRadios_}
{param description: 'Show in WHOIS as Technical contact' /}
{param fieldName: $namePrefix + 'visibleInWhoisAsTech' /}
{param visible: $item['visibleInWhoisAsTech'] == true /}
{/call}
{/template}
/** @private */
{template .whoisVisibleRadios_ private="true"}
{@param description: string}
{@param fieldName: string}
{@param visible: bool}
<tr class="{css kd-settings-pane-section}">
<td>
<label for="{$fieldName}">{$description}</label>
</td>
<td class="{css setting}">
<label for="{$fieldName}">
<input
name="{$fieldName}"
type="radio"
value="true"
{if $visible} checked{/if}>{sp}Yes
</label>
<label for="{$fieldName}">
<input
name="{$fieldName}"
type="radio"
value="false"
{if not $visible} checked{/if}>{sp}No
</label>
</td>
{/template}
/** @private */
{template .contactCheckboxes_ private="true"}
{@param namePrefix: string}
{@param actualTypesLookup: map<string, bool>}
{@param possibleTypesLookup: list<list<string>>}
{foreach $type in $possibleTypesLookup}
{let $name: $namePrefix + 'type.' + $type[0] /}
{let $checked: $actualTypesLookup[$type[0]] /}
<div class="{css checkbox-with-label}">
<input type="checkbox"
name="{$name}"
id="{$name}"
{if $checked} checked{/if}>
<label for="{$name}">
{$type[1]} contact
<span class="{css description}">{$type[2]}</span>
</label>
</div>
{/foreach}
{/template}
/** IP address form input. */
{template .ip}
{@param name: string}
{@param ip: string}
<div class="{css ip}">
<input name="{$name}" value="{$ip}" readonly>
<button type="button" class="{css kd-button} {css btn-remove} {css hidden}">
<i class="{css icon-remove} {css edit}">x</i>
</button>
</div>
{/template}

View file

@ -0,0 +1,206 @@
{namespace registry.soy.registrar.domain autoescape="strict"}
/**
* Set view for domains.
*/
{template .set}
<div class="{css set} {css domain}">
<p>Please enter a query for a single contact in the form "domain/[domain id]".
</div>
{/template}
/**
* Item view for domain.
* @param item
* @param? readonly passed through to field rendering.
* @param? allowSmd optional flag to allow sunrush smd applications.
*/
{template .item}
{let $isEdit: isNonnull($item['domain:name']) /}
<form name="item" class="{css item} {css domain}">
<h1>
{if $isEdit}
{$item['domain:name']['keyValue']}
{else}
New Domain
{/if}
</h1>
<table>
{if not $isEdit}
<tr class="{css section-lead}">
<th colspan="2"><h2>Domain</h2></th>
</tr>
{call registry.soy.forms.inputFieldRow data="all"}
{param label: 'Domain name *' /}
{param name: 'domain:name' /}
{/call}
{call registry.soy.forms.inputFieldRow data="all"}
{param label: 'Period (in years) *' /}
{param name: 'domain:period' /}
{/call}
{/if}
{if isNonnull($item['domain:exDate'])}
{call registry.soy.forms.inputFieldRowWithValue data="all"}
{param label: 'Expiration date' /}
{param name: 'domain:exDate' /}
{param value: $item['domain:exDate'] /}
{/call}
{/if}
<tr class="{css section-lead}">
<th colspan="2"><h2>Authentication</h2></th>
</tr>
{call registry.soy.forms.inputFieldRowWithValue data="all"}
{param label: 'Password *' /}
{param name: 'domain:authInfo.domain:pw' /}
{param value: isNonnull($item['domain:authInfo']) ?
$item['domain:authInfo']['domain:pw'] : '' /}
{/call}
<tr class="{css section-lead}">
<th colspan="2">
<h3>Contact information</h3>
<button id="domain-contact-add-button" type="button"
class="{css kd-button} {css reg-add}"
{if $readonly}disabled{/if}>
Add Contact
</button>
</th>
</tr>
{call registry.soy.forms.inputFieldRowWithValue data="all"}
{param label: 'Registrant *' /}
{param name: 'domain:registrant' /}
{param value: $item['domain:registrant'] /}
{/call}
{if isNonnull($item['domain:contact'])}
// Render contact list with stable ordering for the screenshot tests.
{call .showContact_ data="all"}
{param contacts: $item['domain:contact'] /}
{param type: 'admin' /}
{/call}
{call .showContact_ data="all"}
{param contacts: $item['domain:contact'] /}
{param type: 'billing' /}
{/call}
{call .showContact_ data="all"}
{param contacts: $item['domain:contact'] /}
{param type: 'tech' /}
{/call}
{/if}
<tr id="domain-contacts-footer"></tr>
<tr class="{css section-lead}">
<th colspan="2">
<h3>Nameservers</h3>
<button id="domain-host-add-button" type="button"
class="{css kd-button} {css reg-add}"
{if $readonly}disabled{/if}>
Add Host
</button>
</th>
</tr>
{if isNonnull($item['domain:ns'] and isNonnull($item['domain:ns']['domain:hostObj']))}
{foreach $hostObj in $item['domain:ns']['domain:hostObj']}
{let $hostIdx: index($hostObj) /}
{call registry.soy.forms.inputFieldRowWithValue data="all"}
{param label: 'Host ' + $hostIdx /}
{param name: 'domain:ns.domain:hostObj[' + $hostIdx + '].value' /}
{param value: $hostObj /}
{param clazz kind="text"}{css domain-hostObj}{/param}
{/call}
{/foreach}
{/if}
<tr id="domain-hosts-footer"></tr>
{if isNonnull($item['launch:applicationID'])}
<tr class="{css section-lead}">
<th colspan="2"><h2>Sunrise domain application</h2></th>
</tr>
{call registry.soy.forms.inputFieldRowWithValue data="all"}
{param label: 'Application ID' /}
{param name: 'launch:applicationID' /}
{param value: $item['launch:applicationID'] /}
{/call}
{/if}
{if isNonnull($item['mark:mark'])}
<tr>
<td>Mark Data
<td>
<textarea class="{css reg-domain-mark}" {if $readonly}readonly{/if}>
{$item['mark:mark']['keyValue']}</textarea>
</td>
</tr>
{else}
{if $allowSmd}
{call registry.soy.forms.textareaFieldRow data="all"}
{param label: 'Encoded Signed Mark (base64 encoded, no header or footer)' /}
{param name: 'smd:encodedSignedMark' /}
{/call}
{/if}
{/if}
</table>
{if $isEdit}
<input type="hidden"
name="domain:name"
value="{$item['domain:name']['keyValue']}">
{/if}
</form>
{/template}
/** Renders an input form row for a specific type of contact. */
{template .showContact_ private="true"}
{@param contacts: list<map<string, ?>>} /** List of EPP domain:contacts. */
{@param type: string} /** Type of contact (e.g. admin, tech) */
{foreach $contact in $contacts}
{if $type == $contact['@type']}
{call registry.soy.forms.inputFieldRowWithValue data="all"}
{param label: $contact['@type'] + ' contact' /}
{param name: 'domain:contact[' + index($contact) + '].value' /}
{param value: $contact /}
{param clazz: 'domain-contact' /}
{/call}
<input name="domain:contact[{index($contact)}].@type"
type="hidden"
value="{$contact['@type']}">
{/if}
{/foreach}
{/template}
/* XXX: Should change support for admin/tech. */
/**
* Update domain. Includes sunrush applicationId if present.
* @param? item
*/
{template .update}
<form name="item" class="{css item} {css domain}">
<h1>{$item['domain:name']['keyValue']}</h1>
<table>
<tr class="{css section-lead}">
<th colspan="2"><h2>Contact</h2></th>
</tr>
{call registry.soy.forms.inputFieldRowWithValue data="all"}
{param label: 'Registrant' /}
{param name: 'domain:registrant' /}
{param value: $item['domain:registrant'] /}
{/call}
<tr class="{css section-lead}">
<th colspan="2"><h2>Authentication</h2></th>
</tr>
{call registry.soy.forms.inputFieldRowWithValue data="all"}
{param label: 'Password' /}
{param name: 'domain:authInfo.domain:pw' /}
{param value: isNonnull($item['domain:authInfo']) ?
$item['domain:authInfo']['domain:pw'] : '' /}
{/call}
<input type="hidden"
name="domain:name"
value="{$item['domain:name']['keyValue']}">
{if isNonnull($item['launch:applicationID'])}
<input type="hidden"
name="launch:applicationID"
value="{$item['launch:applicationID']['keyValue']}">
{/if}
</table>
</form>
{/template}

View file

@ -0,0 +1,231 @@
{namespace registry.soy.registrar.domainepp autoescape="strict"}
/* General Availability. Sunrush down below. */
/**
* Domain create request.
* @param item
* @param clTrid
*/
{template .create}
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command>
<create>
<domain:create xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
<domain:name>{$item['domain:name']}</domain:name>
{if isNonnull($item['domain:period'])}
<domain:period unit="y">{$item['domain:period']}</domain:period>
{/if}
{if isNonnull($item['domain:ns'])}
<domain:ns>
{foreach $hostObj in $item['domain:ns']['domain:hostObj']}
<domain:hostObj>{$hostObj.value}</domain:hostObj>
{/foreach}
</domain:ns>
{/if}
{if isNonnull($item['domain:registrant'])}
<domain:registrant>{$item['domain:registrant']}</domain:registrant>
{/if}
{if isNonnull($item['domain:contact'])}
{foreach $contact in $item['domain:contact']}
<domain:contact type="{$contact['@type']}">{$contact.value}</domain:contact>
{/foreach}
{/if}
<domain:authInfo>
<domain:pw>{$item['domain:authInfo']['domain:pw']}</domain:pw>
</domain:authInfo>
</domain:create>
</create>
<clTRID>{$clTrid}</clTRID>
</command>
</epp>
{/template}
/**
* Domain info request.
* @param id
* @param clTrid
*/
{template .info}
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command>
<info>
<domain:info xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
<domain:name hosts="all">{$id}</domain:name>
</domain:info>
</info>
<clTRID>{$clTrid}</clTRID>
</command>
</epp>
{/template}
/**
* Domain update request.
* @param item
* @param clTrid
* @param? addHosts list of hostObj to add.
* @param? remHosts list of hostObj to remove.
* @param? addContacts list of contact to add.
* @param? remContacts list of contact to remove.
*/
{template .update}
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command>
<update>
<domain:update xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
<domain:name>{$item['domain:name']}</domain:name>
{if isNonnull($addHosts) or isNonnull($addContacts)}
{call .addRem}
{param isAdd: true /}
{param hosts: $addHosts /}
{param contacts: $addContacts /}
{/call}
{/if}
{if isNonnull($remHosts) or isNonnull($remContacts)}
{call .addRem}
{param isAdd: false /}
{param hosts: $remHosts /}
{param contacts: $remContacts /}
{/call}
{/if}
<domain:chg>
<domain:registrant>{$item['domain:registrant']}</domain:registrant>
<domain:authInfo>
<domain:pw>{$item['domain:authInfo']['domain:pw']}</domain:pw>
</domain:authInfo>
</domain:chg>
</domain:update>
</update>
<clTRID>{$clTrid}</clTRID>
</command>
</epp>
{/template}
/**
* @param isAdd
* @param? hosts
* @param? contacts
*/
{template .addRem}
{let $tagName: $isAdd ? 'domain:add' : 'domain:rem' /}
<{$tagName}>
{if isNonnull($hosts)}
<domain:ns>
{foreach $host in $hosts}
<domain:hostObj>{$host.value}</domain:hostObj>
{/foreach}
</domain:ns>
{/if}
{if isNonnull($contacts)}
{foreach $contact in $contacts}
<domain:contact type="{$contact['@type']}">{$contact.value}</domain:contact>
{/foreach}
{/if}
</{$tagName}>
{/template}
/* Sunrush. */
/**
* Domain create request for sunrush.
* @param item
* @param clTrid
*/
{template .createSunrush}
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command>
<create>
<domain:create xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
<domain:name>{$item['domain:name']}</domain:name>
<domain:period unit="y">{$item['domain:period']}</domain:period>
{if isNonnull($item['domain:ns']['domain:hostObj'][0])}
<domain:ns>
<domain:hostObj>{$item['domain:ns']['domain:hostObj'][0]}</domain:hostObj>
{if isNonnull($item['domain:ns']['domain:hostObj'][1])}
<domain:hostObj>{$item['domain:ns']['domain:hostObj'][1]}</domain:hostObj>
{/if}
</domain:ns>
{/if}
<domain:registrant>{$item['domain:registrant']}</domain:registrant>
<domain:contact type="admin">{$item['domain:contact'][0]}</domain:contact>
<domain:contact type="tech">{$item['domain:contact'][1]}</domain:contact>
<domain:authInfo>
<domain:pw>{$item['domain:pw']}</domain:pw>
</domain:authInfo>
</domain:create>
</create>
<extension>
<launch:create xmlns:launch="urn:ietf:params:xml:ns:launch-1.0">
<launch:phase name="landrush">sunrise</launch:phase>
{if isNonnull($item['smd:encodedSignedMark'])}
<smd:encodedSignedMark xmlns:smd="urn:ietf:params:xml:ns:signedMark-1.0"
encoding="base64">{$item['smd:encodedSignedMark']}</smd:encodedSignedMark>
{/if}
</launch:create>
</extension>
<clTRID>{$clTrid}</clTRID>
</command>
</epp>
{/template}
/**
* Domain info request during sunrush.
* @param name
* @param applicationID
* @param clTrid
*/
{template .infoSunrush}
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command>
<info>
<domain:info xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
<domain:name hosts="all">{$name}</domain:name>
</domain:info>
</info>
<extension>
<launch:info
xmlns:launch="urn:ietf:params:xml:ns:launch-1.0"
includeMark="true">
<launch:phase name="landrush">sunrise</launch:phase>
<launch:applicationID>{$applicationID}</launch:applicationID>
</launch:info>
</extension>
<clTRID>{$clTrid}</clTRID>
</command>
</epp>
{/template}
/**
* Domain update request.
* @param item
* @param clTrid
*/
{template .updateSunrush}
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command>
<update>
<domain:update xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
<domain:name>{$item['domain:name']}</domain:name>
<domain:chg>
<domain:registrant>{$item['domain:registrant']}</domain:registrant>
<domain:authInfo>
<domain:pw>{$item['domain:authInfo']['domain:pw']}</domain:pw>
</domain:authInfo>
</domain:chg>
</domain:update>
</update>
<extension>
<launch:update xmlns:launch="urn:ietf:params:xml:ns:launch-1.0">
<launch:phase>sunrise</launch:phase>
<launch:applicationID>{$item['launch:applicationID']}</launch:applicationID>
</launch:update>
</extension>
<clTRID>{$clTrid}</clTRID>
</command>
</epp>
{/template}

View file

@ -0,0 +1,43 @@
{namespace registry.soy.registrar.epp autoescape="strict"}
/**
* Login request.
* @param clId
* @param pw
* @param clTrid
*/
{template .login}
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command>
<login>
<clID>{$clId}</clID>
<pw>{$pw}</pw>
<options>
<version>1.0</version>
<lang>en</lang>
</options>
<svcs>
<objURI>urn:ietf:params:xml:ns:host-1.0</objURI>
<objURI>urn:ietf:params:xml:ns:domain-1.0</objURI>
<objURI>urn:ietf:params:xml:ns:contact-1.0</objURI>
</svcs>
</login>
<clTRID>{$clTrid}</clTRID>
</command>
</epp>
{/template}
/**
* Logout request.
* @param clTrid
*/
{template .logout}
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command>
<logout/>
<clTRID>{$clTrid}</clTRID>
</command>
</epp>
{/template}

View file

@ -0,0 +1,94 @@
{namespace registry.soy.registrar.host autoescape="strict"}
/**
* Set view for hosts.
*/
{template .set}
<div class="{css set} {css host}">
<p>Please enter a query for a single host in the form "host/[hostname]".
</div>
{/template}
/**
* Item view for host.
* @param? item
* @param? readonly passed through to field rendering.
*/
{template .item}
<form name="item" class="{css item} {css host}">
<h1>
{if isNonnull($item['host:name'])}
{$item['host:name']['keyValue']}
{else}
New Host
{/if}
</h1>
<table>
<tr class="{css section-lead}">
<th colspan="2"><h2>Host</h2></th>
</tr>
{call registry.soy.forms.inputFieldRowWithValue data="all"}
{param label: 'Name *' /}
{param name: isNonnull($item['host:name']) ? 'host:chgName' : 'host:name' /}
{param value: $item['host:name'] /}
{/call}
<tr class="{css section-lead}">
<th colspan="2">
<h3>Addresses</h3>
<button id="domain-host-addr-add-button" type="button"
class="{css kd-button} {css reg-add}"
{if $readonly}disabled{/if}>
Add Address
</button>
</th>
</tr>
{if isNonnull($item['host:addr'])}
{foreach $addr in $item['host:addr']}
{if not $readonly}
<input type="hidden"
name="host:oldAddr[{index($addr)}].value"
value="{$item['host:addr'][index($addr)]['keyValue']}">
{/if}
{call registry.soy.forms.inputFieldRowWithValue data="all"}
{param label: 'Address No. ' + (index($addr) + 1) /}
{param name: 'host:addr[' + index($addr) + '].value' /}
{param value: $item['host:addr'][index($addr)] /}
{/call}
{/foreach}
{/if}
<tr id="domain-host-addrs-footer"></tr>
</table>
{if isNonnull($item['host:name'])}
<input type="hidden"
name="host:name"
value="{$item['host:name']['keyValue']}">
{/if}
</form>
{/template}
/**
* Item view for host.
* @param? item
* @param? readonly passed through to field rendering.
*/
{template .update}
<form name="item" class="{css item} {css host}">
<h1>{$item['host:name']['keyValue']}</h1>
<table>
<tr class="{css section-lead}">
<th colspan="2"><h2>Host</h2></th>
</tr>
{call registry.soy.forms.inputFieldRowWithValue data="all"}
{param label: 'Name' /}
{param name: 'host:chgName' /}
{param value: $item['host:name'] /}
{/call}
</table>
{if isNonnull($item['host:name'])}
<input type="hidden" name="host:name" value="{$item['host:name']['keyValue']}">
{/if}
</form>
{/template}

View file

@ -0,0 +1,96 @@
{namespace registry.soy.registrar.hostepp autoescape="strict"}
/**
* Host create request.
* @param item
* @param clTrid
*/
{template .create}
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command>
<create>
<host:create xmlns:host="urn:ietf:params:xml:ns:host-1.0">
<host:name>{$item['host:name']}</host:name>
{if isNonnull($item['host:addr'])}
{foreach $addr in $item['host:addr']}
{let $type: strContains($addr['value'], ':') ? 'v6' : 'v4' /}
<host:addr ip="{$type}">{$addr['value']}</host:addr>
{/foreach}
{/if}
</host:create>
</create>
<clTRID>{$clTrid}</clTRID>
</command>
</epp>
{/template}
/**
* Host update request.
* @param item
* @param clTrid
* @param? addAddrs list of addrs to add.
* @param? remAddrs list of addrs to remove.
*/
{template .update}
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command>
<update>
<host:update xmlns:host="urn:ietf:params:xml:ns:host-1.0">
<host:name>{$item['host:name']}</host:name>
{call .addRem}
{param isAdd: true /}
{param addrs: $addAddrs /}
{/call}
{call .addRem}
{param isAdd: false /}
{param addrs: $remAddrs /}
{/call}
{if $item['host:name'] != $item['host:chgName']}
<host:chg>
<host:name>{$item['host:chgName']}</host:name>
</host:chg>
{/if}
</host:update>
</update>
<clTRID>{$clTrid}</clTRID>
</command>
</epp>
{/template}
/**
* Host info request.
* @param clTrid
* @param id The hostname (named "id" to preserve component API).
*/
{template .info}
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command>
<info>
<host:info xmlns:host="urn:ietf:params:xml:ns:host-1.0">
<host:name>{$id}</host:name>
</host:info>
</info>
<clTRID>{$clTrid}</clTRID>
</command>
</epp>
{/template}
/**
* @param isAdd
* @param? addrs
*/
{template .addRem}
{let $tagName: $isAdd ? 'host:add' : 'host:rem' /}
{if length($addrs) > 0}
<{$tagName}>
{foreach $addr in $addrs}
{let $type: strContains($addr, ':') ? 'v6' : 'v4' /}
<host:addr ip="{$type}">{$addr}</host:addr>
{/foreach}
</{$tagName}>
{/if}
{/template}

View file

@ -0,0 +1,126 @@
{namespace registry.soy.registrar.payment autoescape="strict"}
/** Page allowing registrar to send registry money. */
{template .form}
{@param currencies: list<string>} /** Currencies in which customer can remit payment. */
{@param brainframe: uri} /** Location of Braintree iframe sandbox iframe HTML. */
<div class="{css reg-payment}">
<h1>Make a Payment</h1>
<p>
Please use the form below to pay your monthly invoice by credit card.
<p>
The bill you received from the registry should list an outstanding balance
for each currency. If you hold an outstanding balance in multiple currencies,
this form should be filled out and submitted separately for each one.
<form method="post" action="#" class="{css reg-payment-form}">
<fieldset>
<ul>
<li>
<label for="amount">Amount</label>
<input type="text"
id="amount"
name="amount"
autocomplete="off"
autofocus>
<li>
<label>Currency</label>
{call registry.soy.forms.menuButton}
{param id: 'currency' /}
{param selected: $currencies[0] /}
{param items: $currencies /}
{/call}
<li>
<label>Payment Method</label>
<iframe src="{$brainframe}"
id="method"
class="{css reg-payment-form-method}"
height="0"
width="100%"
frameBorder="0"
scrolling="no"></iframe>
<div class="{css reg-payment-form-method-info} {css hidden}"></div>
</ul>
<input type="submit" value="Submit Payment"
class="{css reg-payment-form-submit}{sp}
{css kd-button}{sp}
{css kd-button-submit}{sp}
{css disabled}">
<img alt="[Processing...]"
class="{css reg-payment-form-loader}"
src="/assets/images/loader1x.gif"
width="22" height="22">
</fieldset>
</form>
</div>
{/template}
/** Page allowing registrar to send registry money. */
{template .success}
{@param id: string} /** Transaction ID from payment gateway. */
{@param formattedAmount: string} /** Amount in which payment was made. */
<div class="{css reg-payment}">
<h1>Payment Processed</h1>
<p>
Your payment of {$formattedAmount} was successfully processed with
the Transaction ID {$id}.
<p>
<button class="{css reg-payment-again} {css kd-button} {css kd-button-submit}">
Make Another Payment
</button>
</div>
{/template}
/** Information about credit card payment method, once it's been entered. */
{template .methodInfoCard}
{@param cardType: string} /** Type of credit card, e.g. Visa. */
{@param lastTwo: string} /** Last two digits of credit card number. */
{if $cardType == 'Amex'}
American Express: xxxx xxxxxx xxx{$lastTwo}
{else}
{$cardType}: xxxx xxxx xxxx xx{$lastTwo}
{/if}
{/template}
/** Information about PayPal payment method, once it's been entered. */
{template .methodInfoPaypal}
{@param email: string} /** Email address associated with PayPal account. */
PayPal: {$email}
{/template}
/** Page used to block browsers without necessary features. */
{template .unsupported}
<div class="{css reg-payment}">
<img alt="[Crying Android]"
class="{css reg-cryingAndroid}"
src="/assets/images/android_sad.png"
width="183"
height="275">
<h1>Browser Unsupported</h1>
<p>
The Payment page requires features which are not present in your
browser. Please use one of the following compatible browsers:
<ul class="{css reg-bullets}">
<li>Chrome
<li>Android
<li>Safari
<li>Firefox
<li>IE 10+ or Edge
</ul>
</div>
{/template}
/** Page used to disable page in sandbox environment. */
{template .sandbox}
<div class="{css reg-payment}">
<h1>Payment Page Disabled</h1>
<p>
The payment page is not available in the OT&amp;E environment. Please
login to the production Registrar Console.
</div>
{/template}

View file

@ -0,0 +1,170 @@
{namespace registry.soy.registrar.security autoescape="strict"}
/** Registrar security settings page for view and edit. */
{template .settings}
{@param ipAddressWhitelist: list<string>}
{@param phonePasscode: string}
{@param? clientCertificate: string}
{@param? clientCertificateHash: string}
{@param? failoverClientCertificate: string}
{@param readonly: bool}
<form name="item" class="{css item} {css registrar}">
<h1>Security settings</h1>
{if $readonly}
<p>Use the 'Edit' button above to switch to enable editing the information below.
{/if}
<table>
<tr class="{css kd-settings-pane-section}">
<td>
<label class="{css setting-label}">Web console access</label>
<td class="{css setting}">
<p>Your web console account is managed through&nbsp;
<a href="https://www.google.com/accounts"
target="_blank">Google account settings</a>.
<tr class="{css kd-settings-pane-section}">
<td>
<label class="{css setting-label}">IP whitelist</label>
<span class="{css description}">Restrict access to EPP
production servers to the following IP/IPv6 addresses, or
ranges like 1.1.1.1/24</span>
</td>
<td class="{css setting}">
<div class="{css info} {css summary}">
<div id="ips">
{foreach $ip in $ipAddressWhitelist}
{call .ip}
{param name: 'ipAddressWhitelist[' + index($ip) + ']' /}
{param ip: $ip /}
{/call}
{/foreach}
</div>
<div class="{css hidden}">
<input id="newIp" value="" placeholder="Enter IP address..."/>
<button id="btn-add-ip" type="button"
class="{css kd-button} {css btn-add}">Add</button>
</div>
</div>
</td>
<tr class="{css kd-settings-pane-section}">
<td>
<label class="{css setting-label}">Telephone passcode</label>
<span class="{css description}">Use this for support calls to the Registry.</span>
</td>
<td class="{css setting}">
<div id="domain-registrar-phone-passcode">
{if isNonnull($phonePasscode)}
<input id="phonePasscode"
name="phonePasscode"
value="{$phonePasscode}" readonly>
{else}
<p><em>Your phone passcode is pending allocation.</em>
{/if}
</div>
</td>
<tr class="{css kd-settings-pane-section}">
<td>
<label class="{css setting-label}">SSL Certificate</label>
<span class="{css description}">X.509 PEM certificate for EPP production access.</span>
</td>
<td class="{css setting}">
{if isNonnull($clientCertificate)}
<textarea
name="clientCertificate"
rows="16"
cols="64"
{if $readonly}readonly{/if}>{$clientCertificate}</textarea>
{elseif isNonnull($clientCertificateHash)}
{if $readonly}
<p>
You submitted your SSL certificate before full certificates
were stored. Currently only the hash of your certificate may
be viewed. Please re-submit or update your certificate by
using the Edit button on the top of this page.
<p class="{css certhash}">
<span class="{css description}">Existing certificate SHA256 base64 hash:</span>
{$clientCertificateHash}
{else}
<textarea name="clientCertificate" rows="16" cols="64"></textarea>
{/if}
{else}
{if $readonly}
<p>No certificate on file. Use the Edit button on the top of this page to add one.
{else}
<p>No certificate on file. Please enter your certificate below.
<textarea id="clientCertificate"
name="clientCertificate"
rows="16" cols="64"></textarea>
<div class="{css description}">
Example format:
<textarea id="exampleCert" rows="17" cols="64" readonly>
-----BEGIN CERTIFICATE-----{\n}
MIIDvTCCAqWgAwIBAgIJAK/PgPT0jTwRMA0GCSqGSIb3DQEBCwUAMHUxCzAJBgNV{\n}
BAYTAlVTMREwDwYDVQQIDAhOZXcgWW9yazERMA8GA1UEBwwITmV3IFlvcmsxDzAN{\n}
BgNVBAoMBkdvb2dsZTEdMBsGA1UECwwUZG9tYWluLXJlZ2lzdHJ5LXRlc3QxEDAO{\n}
BgNVBAMMB2NsaWVudDEwHhcNMTUwODI2MTkxODA4WhcNNDMwMTExMTkxODA4WjB1{\n}
MQswCQYDVQQGEwJVUzERMA8GA1UECAwITmV3IFlvcmsxETAPBgNVBAcMCE5ldyBZ{\n}
b3JrMQ8wDQYDVQQKDAZHb29nbGUxHTAbBgNVBAsMFGRvbWFpbi1yZWdpc3RyeS10{\n}
ZXN0MRAwDgYDVQQDDAdjbGllbnQxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB{\n}
CgKCAQEAvoE/IoFJyzb0dU4NFhL8FYgy+B/GnUd5aA66CMx5xKRMbEAtIgxU8TTO{\n}
W+9jdTsE00Grk3Ct4KdY73CYW+6IFXL4O0K/m5S+uajh+I2UMVZJV38RAIqNxue0{\n}
Egv9M4haSsCVIPcX9b+6McywfYSF1bzPb2Gb2FAQO7Jb0BjlPhPMIROCrbG40qPg{\n}
LWrl33dz+O52kO+DyZEzHqI55xH6au77sMITsJe+X23lzQcMFUUm8moiOw0EKrj/{\n}
GaMTZLHP46BCRoJDAPTNx55seIwgAHbKA2VVtqrvmA2XYJQA6ipdhfKRoJFy8Z8H{\n}
DYsorGtazQL2HhF/5uJD25z1m5eQHQIDAQABo1AwTjAdBgNVHQ4EFgQUParEmiSR{\n}
U/Oqy8hr7k+MBKhZwVkwHwYDVR0jBBgwFoAUParEmiSRU/Oqy8hr7k+MBKhZwVkw{\n}
DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAojsUhF6PtZrStnHBFWNR{\n}
ryzvANB8krZlYeX9Hkqn8zIVfAkpbVmL8aZQ7yj17jSpw47PQh3x5gwA9yc/SS0G{\n}
E1rGuxYH02UGbua8G0+vviSQfLtskPQzK7EIR63WNhHEo/Q9umLJkZ0LguWEBf3L{\n}
q8CoXv2i/RNvqVPcTNp/zCKXJZAa8wAjNRJs834AZj4k5xwyYZ3F8D5PGz+YMOmV{\n}
M9Qd+NdXSC/Qn7HQzFhE8p5elBV35P8oX5dXEfn0S7zOXDenp5JvvLoggOWOcKsq{\n}
KiWDQrsT+TMKmHL94/h4t7FghtQLMzY5SGYJsYTv/LG8tewrz6KRb/Wj3JNojyEw{\n}
Ug=={\n}
-----END CERTIFICATE-----
</textarea>
</div>
{/if}
{/if}
</td>
<tr class="{css kd-settings-pane-section}">
<td>
<label class="{css setting-label}">
Failover SSL Certificate
</label>
<span class="{css description}">
X.509 PEM backup certificate for EPP Production Access.
</span>
<td class="{css setting}">
{if $readonly and not isNonnull($failoverClientCertificate)}
<p>No failover certificate on file.
{else}
<textarea id="failoverClientCertificate"
name="failoverClientCertificate"
rows="16"
cols="64"
{if $readonly}readonly{/if}>
{$failoverClientCertificate ?: ''}
</textarea>
{/if}
</table>
</form>
{/template}
/** IP address form input. */
{template .ip}
{@param name: string}
{@param ip: string}
<div class="{css ip}">
<button type="button" class="{css kd-button} {css btn-remove} {css hidden}">
<i class="{css icon-remove} {css edit}">x</i>
</button>
<input name="{$name}" value="{$ip}" readonly>
</div>
{/template}

View file

@ -0,0 +1,216 @@
{namespace registry.soy.registrar.whois autoescape="strict"}
/** Registrar whois settings page for view and edit. */
{template .settings}
{@param clientIdentifier: string}
{@param ianaIdentifier: int}
{@param icannReferralEmail: string}
{@param readonly: bool}
{@param? whoisServer: string}
{@param? referralUrl: string}
// Passed to .contactInfo_
{@param emailAddress: string}
{@param? localizedAddress: ?}
{@param? phoneNumber: string}
{@param? faxNumber: string}
{let $whoisServerNonNull: $whoisServer ?: 'None' /}
{let $referralUrlNonNull: $referralUrl ?: 'None' /}
<form name="item" class="{css item} {css registrar} {css kd-settings-pane}">
<h1>WHOIS Settings</h1>
{if $readonly}
<p>General registrar information for your WHOIS record. This
information is always visible in WHOIS.
{/if}
<table>
{call registry.soy.forms.inputFieldRowWithValue}
{param label: 'Name' /}
{param name: 'clientIdentifier' /}
{param value: $clientIdentifier /}
{param readonly: true /}
{/call}
{call registry.soy.forms.inputFieldRowWithValue}
{param label: 'IANA ID' /}
{param name: 'ianaIdentifier' /}
{param value: $ianaIdentifier /}
{param readonly: true /}
{/call}
{call registry.soy.forms.inputFieldRowWithValue}
{param label: 'ICANN referral email' /}
{param name: 'icannReferralEmail' /}
{param value: $icannReferralEmail /}
{param readonly: true /}
{/call}
{call .contactInfo_ data="all" /}
<tr><td colspan="2"><hr>
{call registry.soy.forms.inputFieldRowWithValue}
{param label: 'WHOIS server' /}
{param name: 'whoisServer' /}
{param value: $whoisServerNonNull /}
{param readonly: $readonly /}
{/call}
{call registry.soy.forms.inputFieldRowWithValue}
{param label: 'Referral URL' /}
{param name: 'referralUrl' /}
{param value: $referralUrlNonNull /}
{param readonly: $readonly /}
{/call}
</table>
</form>
{/template}
/**
* Contact info.
*/
{template .contactInfo_ private="true"}
{@param emailAddress: string}
{@param readonly: bool}
{@param? localizedAddress: ?}
{@param? phoneNumber: string}
{@param? faxNumber: string}
{if $readonly}
<tr class="{css kd-settings-pane-section}">
<td><label class="{css setting-label}">Contact info</label></td>
<td class="{css setting-group-compact}">
{if isNonnull($localizedAddress)}
{call .viewAddress_ data="$localizedAddress"}
{param id: 'localizedAddress' /}
{/call}
{/if}
{if isNonnull($phoneNumber)}
<input type="hidden"
name="phoneNumber"
id="phoneNumber"
value="{$phoneNumber}">
<div class="{css contact-phone-number}">{$phoneNumber}</div>
{/if}
{if isNonnull($faxNumber)}
<input type="hidden"
name="faxNumber"
id="faxNumber"
value="{$faxNumber}">
<div class="{css contact-fax-number}">{$faxNumber} (Fax)</div>
{/if}
<input type="hidden"
name="emailAddress"
id="emailAddress"
value="{$emailAddress}">
<div class="{css contact-fax-number}">{$emailAddress}</div>
</td>
{else}
{call registry.soy.forms.inputFieldRowWithValue}
{param label: 'Email' /}
{param name: 'emailAddress' /}
{param value: $emailAddress /}
{param readonly: false /}
{/call}
{call registry.soy.forms.inputFieldRowWithValue}
{param label: 'Phone' /}
{param name: 'phoneNumber' /}
{param value: $phoneNumber /}
{param readonly: false /}
{/call}
{call registry.soy.forms.inputFieldRowWithValue}
{param label: 'Fax' /}
{param name: 'faxNumber' /}
{param value: $faxNumber /}
{param readonly: false /}
{/call}
{call .editAddress_ data="$localizedAddress"}
{param id: 'localizedAddress' /}
{/call}
{/if}
{/template}
/**
* Read-only view of address.
*/
{template .viewAddress_ private="true"}
{@param id: string}
{@param street: list<string>}
{@param city: string}
{@param? state: string}
{@param? zip: string}
{@param countryCode: string}
{foreach $line in $street}
<input type="hidden"
name="{$id}.street[{index($line)}]"
id="{$id}.street[{index($line)}]"
value="{$street[index($line)]}">
<div class="{css contact-address-street}">{$street[index($line)]}</div>
{/foreach}
<input type="hidden" name="{$id}.city" id="{$id}.city" value="{$city}">
<input type="hidden" name="{$id}.state" id="{$id}.state" value="{$state}">
<input type="hidden" name="{$id}.zip" id="{$id}.zip" value="{$zip}">
<input type="hidden"
name="{$id}.countryCode"
id="{$id}.countryCode"
value="{$countryCode}">
<div class="{css contact-address-city}">{$city},</div>
{if isNonnull($state)}
{sp}<div class="{css contact-address-state}">{$state}</div>
{/if}
{if isNonnull($zip)}
{sp}<div class="{css contact-address-zip}">{$zip}</div>
{/if}
{sp}<div class="{css contact-address-cc}">{$countryCode}</div>
{/template}
/**
* Editor of address.
*/
{template .editAddress_ private="true"}
{@param id: string}
{@param? street: list<string>}
{@param? city: string}
{@param? state: string}
{@param? zip: string}
{@param? countryCode: string}
{let $street2: $street ?: [] /}
{let $city2: $city ?: '' /}
{let $state2: $state ?: '' /}
{let $zip2: $zip ?: '' /}
{let $countryCode2: $countryCode ?: '' /}
<tr class="{css kd-settings-pane-section}">
<td>
<label for="{$id}.street[0]"
class="{css setting-label}">Street Address</label>
<td class="{css setting}">
<input id="{$id}.street[0]"
name="{$id}.street[0]"
value="{if isNonnull($street2[0])}{$street2[0]}{/if}">
<input id="{$id}.street[1]"
name="{$id}.street[1]"
value="{if isNonnull($street2[1])}{$street2[1]}{/if}">
<input id="{$id}.street[2]"
name="{$id}.street[2]"
value="{if isNonnull($street2[2])}{$street2[2]}{/if}">
{call registry.soy.forms.inputFieldRowWithValue}
{param label: 'City' /}
{param name: $id + '.city' /}
{param value: $city2 /}
{param readonly: false /}
{/call}
{call registry.soy.forms.inputFieldRowWithValue}
{param label: 'State/Region' /}
{param name: $id + '.state' /}
{param value: $state2 /}
{param readonly: false /}
{/call}
{call registry.soy.forms.inputFieldRowWithValue}
{param label: 'Zip/Postal Code' /}
{param name: $id + '.zip' /}
{param value: $zip2 /}
{param readonly: false /}
{/call}
{call registry.soy.forms.inputFieldRowWithValue}
{param label: 'Country Code' /}
{param name: $id + '.countryCode' /}
{param value: $countryCode2 /}
{param readonly: false /}
{/call}
{/template}