From: Tim Düsterhus Date: Fri, 21 Jun 2019 12:46:36 +0000 (+0200) Subject: Make output of user input errors consistent in register.tpl X-Git-Tag: 5.2.0_Alpha_1~17^2~5^2^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=265429975d08c5c21a6f24bd3d1fc7ff0e6c6ace;p=GitHub%2FWoltLab%2FWCF.git Make output of user input errors consistent in register.tpl --- 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}