// 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. {namespace registry.soy.registrar.domain autoescape="strict"} /** * Set view for domains. */ {template .set}

Please enter a query for a single contact in the form "domain/[domain id]".

{/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']) /}

{if $isEdit} {$item['domain:name']['keyValue']} {else} New Domain {/if}

{if not $isEdit} {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} {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} {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} {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} {if isNonnull($item['launch:applicationID'])} {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'])} {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}

Domain

Authentication

Contact information

Nameservers

Sunrise domain application

Mark Data
{if $isEdit} {/if}
{/template} /** Renders an input form row for a specific type of contact. */ {template .showContact_ private="true"} {@param contacts: list>} /** 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} {/if} {/foreach} {/template} /* XXX: Should change support for admin/tech. */ /** * Update domain. Includes sunrush applicationId if present. * @param? item */ {template .update}

{$item['domain:name']['keyValue']}

{call registry.soy.forms.inputFieldRowWithValue data="all"} {param label: 'Registrant' /} {param name: 'domain:registrant' /} {param value: $item['domain:registrant'] /} {/call} {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} {if isNonnull($item['launch:applicationID'])} {/if}

Contact

Authentication

{/template}