mirror of
https://github.com/google/nomulus.git
synced 2025-05-06 06:57:50 +02:00
108 lines
3.3 KiB
Text
108 lines
3.3 KiB
Text
// 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.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}
|