mirror of
https://github.com/google/nomulus.git
synced 2025-05-21 19:59:34 +02:00
118 lines
4.2 KiB
Text
118 lines
4.2 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.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}
|