summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorskyblue <ssx205@gmail.com>2014-04-12 01:01:30 +0800
committerskyblue <ssx205@gmail.com>2014-04-12 01:01:30 +0800
commitdd815ae7b532ceba1f96e6751e231dc351eb19b9 (patch)
tree3e8383106585e5a990ab5074ff3a2fd87d4239d7 /templates
parentdf000245d19ffa3e4f88d252763269bbdd04f8eb (diff)
downloadgitea-dd815ae7b532ceba1f96e6751e231dc351eb19b9.tar.gz
gitea-dd815ae7b532ceba1f96e6751e231dc351eb19b9.zip
finish github oauth2 support
Diffstat (limited to 'templates')
-rw-r--r--templates/user/signin.tmpl4
-rw-r--r--templates/user/signup.tmpl17
2 files changed, 15 insertions, 6 deletions
diff --git a/templates/user/signin.tmpl b/templates/user/signin.tmpl
index 294c0d3418..a06e3ca8a0 100644
--- a/templates/user/signin.tmpl
+++ b/templates/user/signin.tmpl
@@ -46,9 +46,9 @@
{{if .OauthEnabled}}
<div class="form-group text-center" id="social-login">
<h4>Log In with Social Accounts</h4>
- {{if .OauthGitHubEnabled}}<a href="/user/login/github"><i class="fa fa-github-square fa-3x"></i></a>{{end}}
+ {{if .OauthGitHubEnabled}}<a href="/user/login/github?next=/user/sign_up"><i class="fa fa-github-square fa-3x"></i></a>{{end}}
</div>
{{end}}
</form>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/user/signup.tmpl b/templates/user/signup.tmpl
index 87fa80ccc1..b12333a257 100644
--- a/templates/user/signup.tmpl
+++ b/templates/user/signup.tmpl
@@ -6,19 +6,24 @@
{{if .DisenableRegisteration}}
Sorry, registeration has been disenabled, you can only get account from administrator.
{{else}}
- <h3>Sign Up</h3>
+ {{if .IsSocialLogin}}
+ <h3>Social login: 2nd step <small>complete information</small></h3>
+ {{else}}
+ <h3>Sign Up</h3>
+ {{end}}
{{template "base/alert" .}}
+ {{if .IsSocialLogin}}
+ {{end}}
<div class="form-group {{if .Err_UserName}}has-error has-feedback{{end}}">
<label class="col-md-4 control-label">Username: </label>
<div class="col-md-6">
<input name="username" class="form-control" placeholder="Type your username" value="{{.username}}" required="required">
</div>
</div>
-
<div class="form-group {{if .Err_Email}}has-error has-feedback{{end}}">
<label class="col-md-4 control-label">Email: </label>
<div class="col-md-6">
- <input name="email" class="form-control" placeholder="Type your e-mail address" value="{{.email}}" required="required" title="Email is not valid">
+ <input name="email" class="form-control" placeholder="Type your e-mail address" value="{{.email}}{{.socialEmail}}" required="required" title="Email is not valid">
</div>
</div>
@@ -44,10 +49,14 @@
<div class="form-group">
<div class="col-md-offset-4 col-md-6">
+ {{if .IsSocialLogin}}
+ <a href="/user/login">Already have an account? Bind now!</a>
+ {{else}}
<a href="/user/login">Already have an account? Sign in now!</a>
+ {{end}}
</div>
</div>
{{end}}
</form>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}