summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-03-06 11:12:37 -0500
committerUnknown <joe2010xtmf@163.com>2014-03-06 11:12:37 -0500
commitd8b92b4bc99d642c7fd9a6080bdfa8d782e8c325 (patch)
treeba54f16bd242d619bb4ffdc051ea07a6c2311117 /templates
parent1249392c8390d9e348c388c0ad6e80fce208cd95 (diff)
parent4c1858c07b972e64d47218646f89b2fb5340a993 (diff)
downloadgitea-d8b92b4bc99d642c7fd9a6080bdfa8d782e8c325.tar.gz
gitea-d8b92b4bc99d642c7fd9a6080bdfa8d782e8c325.zip
Merge branch 'master' of github.com:gogits/gogs
Conflicts: templates/user/signup.tmpl
Diffstat (limited to 'templates')
-rw-r--r--templates/base/footer.tmpl3
-rw-r--r--templates/base/navbar.tmpl4
-rw-r--r--templates/user/signup.tmpl16
3 files changed, 10 insertions, 13 deletions
diff --git a/templates/base/footer.tmpl b/templates/base/footer.tmpl
index eaf5bd626e..4ae4a95fa0 100644
--- a/templates/base/footer.tmpl
+++ b/templates/base/footer.tmpl
@@ -1,6 +1,7 @@
<script>
$(function(){
- initCore();
+ initCore();
+ {{if .PageIsSignUp}}initRegister();{{end}}
});
</script>
</body>
diff --git a/templates/base/navbar.tmpl b/templates/base/navbar.tmpl
index 82fc3ae180..a52ce6c034 100644
--- a/templates/base/navbar.tmpl
+++ b/templates/base/navbar.tmpl
@@ -1,8 +1,8 @@
<div class="gogs-masthead navbar navbar-fixed-top" id="masthead">
<div class="container">
<nav class="gogs-nav">
- <a class="gogs-nav-item active" href="/"><img src="/img/favicon.png" alt="Gogs Logo" id="gogs-logo"></a>
- <a class="gogs-nav-item" href="#">Dashboard</a>
+ <a id="gogs-nav-logo" class="gogs-nav-item{{if .PageIsHome}} active{{end}}" href="/"><img src="/img/favicon.png" alt="Gogs Logo" id="gogs-logo"></a>
+ <a class="gogs-nav-item{{if .PageIsUserDashboard}} active{{end}}" href="#">Dashboard</a>
<a class="gogs-nav-item" href="#">Explore</a>
<a class="gogs-nav-item" href="#">Help</a>{{if .IsSigned}}
<a id="gogs-nav-out" class="gogs-nav-item navbar-right navbar-btn btn btn-danger" href="/user/login/"><i class="fa fa-power-off fa-lg"></i></a>
diff --git a/templates/user/signup.tmpl b/templates/user/signup.tmpl
index 76064bf760..482cdc0080 100644
--- a/templates/user/signup.tmpl
+++ b/templates/user/signup.tmpl
@@ -3,41 +3,37 @@
<div class="container" id="gogs-body">
<form action="/user/sign_up" method="post" class="form-horizontal gogs-card" id="gogs-login-card">
<h3>Sign Up</h3>
- {{if .HasError}}
- <div class="alert alert-danger">{{.ErrorMsg}}</div>
- {{end}}
- <div class="form-group {{if .Err_UserName}}has-error has-feedback{{end}}">
+ <div class="alert alert-danger form-error{{if .HasError}}{{else}} hidden{{end}}">{{.ErrorMsg}}</div>
+ <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}}">
+ <input name="username" class="form-control" placeholder="Type your username" value="{{.username}}" required="required" title="Username must contain at least has 5 characters">
</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}}">
+ <input name="email" class="form-control" placeholder="Type your e-mail address" value="{{.email}}" required="required" title="Email is not valid">
</div>
</div>
<div class="form-group {{if .Err_Password}}has-error has-feedback{{end}}">
<label class="col-md-4 control-label">Password: </label>
<div class="col-md-6">
- <input name="passwd" type="password" class="form-control" placeholder="Type your password">
+ <input name="passwd" type="password" class="form-control" placeholder="Type your password" required="required" title="Password must contain at least has 6 characters">
</div>
</div>
<div class="form-group {{if .Err_RetypePasswd}}has-error has-feedback{{end}}">
<label class="col-md-4 control-label">Re-type: </label>
<div class="col-md-6">
- <input type="password" class="form-control" placeholder="Re-type your password">
+ <input name="re-passwd" type="password" class="form-control" placeholder="Re-type your password" required="required" title="Re-type Password must be same to Password">
</div>
</div>
-
<div class="form-group">
<div class="col-md-offset-4 col-md-6">
<button type="submit" class="btn btn-lg btn-primary">Create an account</button>
</div>
</div>
-
<div class="form-group">
<div class="col-md-offset-4 col-md-6">
<a href="/user/login">Already have an account? Sign in now!</a>