From 265429975d08c5c21a6f24bd3d1fc7ff0e6c6ace Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 21 Jun 2019 14:46:36 +0200 Subject: [PATCH] Make output of user input errors consistent in register.tpl --- com.woltlab.wcf/templates/register.tpl | 47 +++++++++++++++----------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/com.woltlab.wcf/templates/register.tpl b/com.woltlab.wcf/templates/register.tpl index 7d1ec34efa..9cab534b68 100644 --- a/com.woltlab.wcf/templates/register.tpl +++ b/com.woltlab.wcf/templates/register.tpl @@ -16,17 +16,19 @@
- +
- {if $errorType.username|isset} + {if $errorType[username]|isset} - {if $errorType.username == 'empty'}{lang}wcf.global.form.error.empty{/lang}{/if} - {if $errorType.username == 'invalid'}{lang}wcf.user.username.error.invalid{/lang}{/if} - {if $errorType.username == 'notUnique'}{lang}wcf.user.username.error.notUnique{/lang}{/if} + {if $errorType[username] == 'empty'} + {lang}wcf.global.form.error.empty{/lang} + {else} + {lang}wcf.user.username.error.{$errorType[username]}{/lang} + {/if} {/if} {lang}wcf.user.username.description{/lang} @@ -66,31 +68,33 @@

{lang}wcf.user.email{/lang}

- +
- {if $errorType.email|isset} + {if $errorType[email]|isset} - {if $errorType.email == 'empty'}{lang}wcf.global.form.error.empty{/lang}{/if} - {if $errorType.email == 'invalid'}{lang}wcf.user.email.error.invalid{/lang}{/if} - {if $errorType.email == 'notUnique'}{lang}wcf.user.email.error.notUnique{/lang}{/if} + {if $errorType[email] == 'empty'} + {lang}wcf.global.form.error.empty{/lang} + {else} + {lang}wcf.user.email.error.{$errorType[email]}{/lang} + {/if} {/if}
- +
- {if $errorType.confirmEmail|isset} + {if $errorType[confirmEmail]|isset} - {if $errorType.confirmEmail == 'notEqual'}{lang}wcf.user.confirmEmail.error.notEqual{/lang}{/if} + {lang}wcf.user.confirmEmail.error.{$errorType[confirmEmail]}{/lang} {/if}
@@ -103,31 +107,34 @@

{lang}wcf.user.password{/lang}

- +
- {if $errorType.password|isset} + {if $errorType[password]|isset} - {if $errorType.password == 'empty'}{lang}wcf.global.form.error.empty{/lang}{/if} - {if $errorType.password == 'notSecure'}{lang}wcf.user.password.error.notSecure{/lang}{/if} + {if $errorType[password] == 'empty'} + {lang}wcf.global.form.error.empty{/lang} + {else} + {lang}wcf.user.password.error.{$errorType[password]}{/lang} + {/if} {/if} {lang}wcf.user.password.description{/lang}
- +
- {if $errorType.confirmPassword|isset} + {if $errorType[confirmPassword]|isset} - {if $errorType.confirmPassword == 'notEqual'}{lang}wcf.user.confirmPassword.error.notEqual{/lang}{/if} + {lang}wcf.user.confirmPassword.error.{$errorType[confirmPassword]}{/lang} {/if}
-- 2.20.1