Reduce conditionals in signin/signup inner forms (#1138)

This commit is contained in:
Kim "BKC" Carlbäcker 2017-03-22 00:50:56 +01:00 committed by GitHub
commit c05bd1789c
3 changed files with 12 additions and 7 deletions

View file

@ -5,7 +5,7 @@
{{.i18n.Tr "auth.login_userpass"}}
</h4>
<div class="ui attached segment">
<form class="ui form" action="{{if not .LinkAccountMode}}{{.Link}}{{else}}{{.SignInLink}}{{end}}" method="post">
<form class="ui form" action="{{.SignInLink}}" method="post">
{{.CsrfTokenHtml}}
<div class="required inline field {{if and (.Err_UserName) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}}">
<label for="user_name">{{.i18n.Tr "home.uname_holder"}}</label>

View file

@ -1,7 +1,7 @@
<div class="user signup{{if .LinkAccountMode}} icon{{end}}">
<div class="ui middle very relaxed page grid">
<div class="column">
<form class="ui form" action="{{if not .LinkAccountMode}}{{.Link}}{{else}}{{.SignUpLink}}{{end}}" method="post">
<form class="ui form" action="{{.SignUpLink}}" method="post">
{{.CsrfTokenHtml}}
<h3 class="ui top attached header">
{{.i18n.Tr "sign_up"}}
@ -56,4 +56,4 @@
</form>
</div>
</div>
</div>
</div>