mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 00:17:20 +02:00
Add a bit more verification text when unrenewing domains
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=248150595
This commit is contained in:
parent
a0040c5eda
commit
7f69ebc5d9
1 changed files with 12 additions and 1 deletions
|
@ -136,7 +136,18 @@ class UnrenewDomainCommand extends ConfirmingCommand implements CommandWithRemot
|
|||
|
||||
@Override
|
||||
protected String prompt() {
|
||||
return String.format("Unrenew these domain(s) for %d years?", period);
|
||||
StringBuilder resultBuilder = new StringBuilder();
|
||||
DateTime now = clock.nowUtc();
|
||||
for (String domainName : mainParameters) {
|
||||
DomainBase domain = loadByForeignKey(DomainBase.class, domainName, now).get();
|
||||
DateTime previousTime = domain.getRegistrationExpirationTime();
|
||||
DateTime newTime = leapSafeSubtractYears(previousTime, period);
|
||||
resultBuilder.append(
|
||||
String.format(
|
||||
"%s expiration time changed from %s to %s\n", domainName, previousTime, newTime));
|
||||
}
|
||||
resultBuilder.append(String.format("Unrenew these domains(s) for %d years?", period));
|
||||
return resultBuilder.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue