diff options
author | AJ ONeal <coolaj86@gmail.com> | 2019-07-06 13:48:02 -0600 |
---|---|---|
committer | techknowlogick <techknowlogick@gitea.io> | 2019-07-06 15:48:02 -0400 |
commit | 62d6127f1b945b3160d337a190b33aa96e0f60b5 (patch) | |
tree | e7cee9a32d2c6922eec0839515dd4f76bb6d8232 /templates/user/auth | |
parent | 337d6915ff8967637ff515108612c3a7a4f51585 (diff) | |
download | gitea-62d6127f1b945b3160d337a190b33aa96e0f60b5.tar.gz gitea-62d6127f1b945b3160d337a190b33aa96e0f60b5.zip |
Make captcha and password optional for external accounts (#6606)
Diffstat (limited to 'templates/user/auth')
-rw-r--r-- | templates/user/auth/signin_inner.tmpl | 2 | ||||
-rw-r--r-- | templates/user/auth/signup_inner.tmpl | 19 |
2 files changed, 13 insertions, 8 deletions
diff --git a/templates/user/auth/signin_inner.tmpl b/templates/user/auth/signin_inner.tmpl index 3e67aa7b32..07f85c954f 100644 --- a/templates/user/auth/signin_inner.tmpl +++ b/templates/user/auth/signin_inner.tmpl @@ -15,10 +15,12 @@ <label for="user_name">{{.i18n.Tr "home.uname_holder"}}</label> <input id="user_name" name="user_name" value="{{.user_name}}" autofocus required> </div> + {{if not .DisablePassword}} <div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}}"> <label for="password">{{.i18n.Tr "password"}}</label> <input id="password" name="password" type="password" value="{{.password}}" autocomplete="off" required> </div> + {{end}} {{if not .LinkAccountMode}} <div class="inline field"> <label></label> diff --git a/templates/user/auth/signup_inner.tmpl b/templates/user/auth/signup_inner.tmpl index 25b50dad86..cdacd910d9 100644 --- a/templates/user/auth/signup_inner.tmpl +++ b/templates/user/auth/signup_inner.tmpl @@ -25,14 +25,17 @@ <label for="email">{{.i18n.Tr "email"}}</label> <input id="email" name="email" type="email" value="{{.email}}" required> </div> - <div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}"> - <label for="password">{{.i18n.Tr "password"}}</label> - <input id="password" name="password" type="password" value="{{.password}}" autocomplete="off" required> - </div> - <div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}"> - <label for="retype">{{.i18n.Tr "re_type"}}</label> - <input id="retype" name="retype" type="password" value="{{.retype}}" autocomplete="off" required> - </div> + + {{if not .DisablePassword}} + <div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}"> + <label for="password">{{.i18n.Tr "password"}}</label> + <input id="password" name="password" type="password" value="{{.password}}" autocomplete="off" required> + </div> + <div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}"> + <label for="retype">{{.i18n.Tr "re_type"}}</label> + <input id="retype" name="retype" type="password" value="{{.retype}}" autocomplete="off" required> + </div> + {{end}} {{if and .EnableCaptcha (eq .CaptchaType "image")}} <div class="inline field"> <label></label> |