mirror of
https://github.com/google/nomulus
synced 2026-09-08 09:07:11 +00:00
This change renames directories in preparation for the great package rename. The repository is now in a broken state because the code itself hasn't been updated. However this should ensure that git correctly preserves history for each file.
207 lines
7.0 KiB
Plaintext
207 lines
7.0 KiB
Plaintext
{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}
|