Fix registrar security console

The registrar security console failed because it assumed the email is a
required field for the registrar, but it isn't (at least - create_registrar
doesn't require an email, and update_registrar lets you remove the email).

Fixed by allowing it to *remain* unset if it was unset originally, but if it was set - it's required.

There are more fixes needed, but they aren't related to the email, so they will wait for the next CL

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191623034
This commit is contained in:
guyben 2018-04-04 11:45:13 -07:00 committed by Ben McIlwain
parent e816913c61
commit ea891001d9
7 changed files with 44 additions and 14 deletions

View file

@ -25,7 +25,7 @@
{@param? whoisServer: string}
{@param? referralUrl: string}
// Passed to .contactInfo_
{@param emailAddress: string}
{@param? emailAddress: string}
{@param? localizedAddress: ?}
{@param? phoneNumber: string}
{@param? faxNumber: string}
@ -79,7 +79,7 @@
* Contact info.
*/
{template .contactInfo_ visibility="private"}
{@param emailAddress: string}
{@param? emailAddress: string}
{@param readonly: bool}
{@param? localizedAddress: ?}
{@param? phoneNumber: string}
@ -107,11 +107,13 @@
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>
{if isNonnull($emailAddress)}
<input type="hidden"
name="emailAddress"
id="emailAddress"
value="{$emailAddress}">
<div class="{css('contact-fax-number')}">{$emailAddress}</div>
{/if}
</td>
{else}
{call registry.soy.forms.inputFieldRowWithValue}