Skip to content

Commit aa0e99a

Browse files
committed
added validate
1 parent ab9d887 commit aa0e99a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+23061
-89
lines changed

admin-login.html

+19-14
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77

88
<!-- Bootstrap -->
99
<link href="styles/css/admin-styles.css" rel="stylesheet" media="screen">
10-
<link href="//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
10+
<link href="//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet" media="screen">
11+
<link href="bower_components/bootstrapValidator/dist/css/bootstrapValidator.min.css" rel="stylesheet" media="screen">
12+
1113

1214
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
1315
<!--[if lt IE 9]>
@@ -33,21 +35,23 @@
3335

3436

3537
<div class="container">
36-
37-
<form class="form-signin" role="form" action="admin-index.html">
3838
<h1 class="form-signin-logo">Outclass</h1>
3939

40-
<input type="email" class="form-control" placeholder="Email" required autofocus>
41-
<input type="password" class="form-control" placeholder="Senha" required>
40+
41+
<form role="form" action="admin-index.html" class="loginForm">
42+
<div class="form-group">
43+
<label for="email" class="sr-only">Email address</label>
44+
<input type="email" class="form-control input-lg" id="email" name="email" placeholder="Email" required>
45+
</div>
46+
47+
<div class="form-group">
48+
<label for="password" class="sr-only">Password</label>
49+
<input type="password" class="form-control input-lg" id="password" name="password" placeholder="Senha" required>
50+
</div>
4251

43-
<!--
44-
<label class="checkbox">
45-
<input type="checkbox" value="remember-me"> Lembre de mim.
46-
</label>
47-
-->
52+
<button type="submit" class="btn btn-primary btn-lg btn-block">Entrar</button>
4853

49-
<input class="btn btn-lg btn-primary btn-block" type="submit" value="Entrar">
50-
</form>
54+
</form>
5155

5256
<p><a href="#">Esquecí minha senha</a> | Precisa de ajuda? <a href="#">Entrar em contato</a></p>
5357
</div> <!-- /container -->
@@ -62,15 +66,16 @@ <h1 class="form-signin-logo">Outclass</h1>
6266

6367
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
6468
<script src="bower_components/jquery/dist/jquery.min.js"></script>
69+
70+
<!-- Bootestrap Validate for forms validation -->
71+
<script src="bower_components/bootstrapValidator/dist/js/bootstrapValidator.min.js"></script>
6572

6673
<!-- Include all compiled plugins (below), or include individual files as needed -->
6774
<script src="js/bootstrap.min.js"></script>
6875

6976
<!-- My script -->
7077
<script src="js/admin-script.js"></script>
7178

72-
73-
7479

7580
<script>
7681
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"name": "bootstrapValidator",
3+
"description": "The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3",
4+
"version": "0.4.5",
5+
"main": [
6+
"dist/css/bootstrapValidator.css",
7+
"dist/js/bootstrapValidator.js"
8+
],
9+
"license": "MIT",
10+
"keywords": [
11+
"jQuery",
12+
"plugin",
13+
"validate",
14+
"validator",
15+
"form",
16+
"Bootstrap"
17+
],
18+
"authors": [
19+
{
20+
"name": "Nguyen Huu Phuoc",
21+
"email": "[email protected]",
22+
" homepage": "https://twitter.com/nghuuphuoc"
23+
}
24+
],
25+
"homepage": "http://bootstrapvalidator.com",
26+
"repository": {
27+
"type": "git",
28+
"url": "https://github.com/nghuuphuoc/bootstrapvalidator.git"
29+
},
30+
"dependencies": {
31+
"jquery": ">= 1.9.0",
32+
"bootstrap": ">= 3.0.0"
33+
},
34+
"_release": "0.4.5",
35+
"_resolution": {
36+
"type": "version",
37+
"tag": "v0.4.5",
38+
"commit": "f1fc72d15bc66f15ec9f8c6f1986278b4cb4e91a"
39+
},
40+
"_source": "git://github.com/nghuuphuoc/bootstrapvalidator.git",
41+
"_target": "~0.4.5",
42+
"_originalSource": "bootstrapValidator",
43+
"_direct": true
44+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.idea
2+
_gh_pages
3+
node_modules

bower_components/bootstrapValidator/CHANGELOG.md

+280
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
module.exports = function(grunt) {
2+
grunt.initConfig({
3+
pkg: grunt.file.readJSON('package.json'),
4+
5+
buildDir: 'dist',
6+
7+
banner: [
8+
'/**',
9+
' * BootstrapValidator (<%= pkg.homepage %>)',
10+
' *',
11+
' * <%= pkg.description %>',
12+
' *',
13+
' * @version v<%= pkg.version %>',
14+
' * @author <%= pkg.author.url %>',
15+
' * @copyright (c) 2013 - 2014 Nguyen Huu Phuoc',
16+
' * @license MIT',
17+
' */\n\n'
18+
].join('\n'),
19+
20+
copy: {
21+
main: {
22+
files: [
23+
{ cwd: 'src/css', src: '**', dest: '<%= buildDir %>/css', expand: true, flatten: true, filter: 'isFile' }
24+
]
25+
}
26+
},
27+
28+
cssmin: {
29+
minify: { expand: true, cwd: 'src/css/', src: ['*.css'], dest: '<%= buildDir %>/css/', ext: '.min.css' },
30+
add_banner: {
31+
options: {
32+
banner: '<%= banner %>'
33+
},
34+
files: {
35+
'<%= buildDir %>/css/bootstrapValidator.min.css': ['src/css/bootstrapValidator.css']
36+
}
37+
}
38+
},
39+
40+
concat: {
41+
options: {
42+
separator: ';',
43+
stripBanners: true,
44+
banner: '<%= banner %>'
45+
},
46+
dist: {
47+
src: ['src/js/bootstrapValidator.js', 'src/js/validator/*.js'],
48+
dest: '<%= buildDir %>/js/bootstrapValidator.js'
49+
}
50+
},
51+
52+
uglify: {
53+
options: {
54+
banner: '<%= banner %>'
55+
},
56+
build: {
57+
src: ['<%= buildDir %>/js/bootstrapValidator.js'],
58+
dest: '<%= buildDir %>/js/bootstrapValidator.min.js'
59+
}
60+
},
61+
62+
watch: {
63+
scripts: {
64+
files: ['src/css/**', 'src/js/**'],
65+
tasks: ['build'],
66+
options: {
67+
spawn: false
68+
}
69+
}
70+
}
71+
});
72+
73+
grunt.registerTask('default', 'build');
74+
grunt.registerTask('build', ['copy', 'cssmin', 'concat', 'uglify']);
75+
76+
grunt.loadNpmTasks('grunt-contrib-concat');
77+
grunt.loadNpmTasks('grunt-contrib-copy');
78+
grunt.loadNpmTasks('grunt-contrib-cssmin');
79+
grunt.loadNpmTasks('grunt-contrib-uglify');
80+
grunt.loadNpmTasks('grunt-contrib-watch');
81+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# BootstrapValidator - [v0.4.5](https://github.com/nghuuphuoc/bootstrapvalidator/releases/download/v0.4.5/bootstrapvalidator-dist-0.4.5.zip)
2+
3+
[http://bootstrapvalidator.com](http://bootstrapvalidator.com) - The best jQuery plugin to validate form fields. Designed to use with [Bootstrap 3](http://getbootstrap.com)
4+
5+
![Screenshot](screenshots/screenshot.png)
6+
7+
## Help the project
8+
9+
I've been spending a lot of time to work on this plugin. If it is useful to you, please consider to help the project by making a small donation:
10+
11+
<a href="https://pledgie.com/campaigns/24885"><img alt="Click here to lend your support to: BootstrapValidator and make a donation at pledgie.com!" src="https://pledgie.com/campaigns/24885.png?skin_name=chrome" border="0" /></a>
12+
13+
Also, you can make me feel happy by [tweeting](https://twitter.com/intent/tweet?hashtags=javascript,jquery,twbootstrap&original_referer=http://github.com/nghuuphuoc/bootstrapvalidator&text=BootstrapValidator%20is%20the%20best%20jQuery%20plugin%20to%20validate%20form%20fields&url=http://bootstrapvalidator.com) about it and [staring](https://github.com/nghuuphuoc/bootstrapvalidator/stargazers) the project on Github.
14+
15+
## Live demo
16+
17+
http://bootstrapvalidator.com/examples/
18+
19+
## Features
20+
21+
__Code__
22+
* Written from scratch
23+
* Very solid and clean
24+
* The core plugin and validators code are separated
25+
26+
__Bootstrap__
27+
* Designed to use with [Bootstrap 3](http://getbootstrap.com)
28+
* Support almost [Bootstrap forms](http://getbootstrap.com/css/#forms)
29+
* Support Bootstrap form [validation states](http://getbootstrap.com/css/#forms-control-validation)
30+
31+
__HTML 5__
32+
* Support setting the plugin, validator options via [HTML 5 attributes](http://bootstrapvalidator.com/examples#attribute) prefixed with ```data-bv-```
33+
* Support HTML 5 attributes such as ```min```, ```max```, ```pattern```, ```required```
34+
* Support [HTML 5 input types](http://bootstrapvalidator.com/examples#html5) such as ```color```, ```email```, ```range``` and ```url```
35+
36+
__Validator__
37+
* [41 built-in validators](http://bootstrapvalidator.com/validators/) and counting!
38+
* Easy to [write a new validator](http://bootstrapvalidator.com/developing/)
39+
40+
__Friendly__
41+
* Show [feedback icons](http://bootstrapvalidator.com/settings/#feedback-icons) based on field validity
42+
* Support [Glyphicons](http://getbootstrap.com/components/#glyphicons) and [FontAwesome](http://fontawesome.io/icons) icons
43+
* Focus on the first invalid field
44+
45+
__Ajax__
46+
* Support [validating via Ajax](http://bootstrapvalidator.com/validators/remote/)
47+
* Support using Ajax for form submission
48+
49+
__Flexible__
50+
* The elements can be defined by either ```name``` or [CSS selector](http://bootstrapvalidator.com/settings/#selector-example)
51+
* Support multiple elements with the [same name](http://bootstrapvalidator.com/examples/#fields-with-same-name)
52+
* Possible to indicate [excluded](http://bootstrapvalidator.com/settings/#excluded) fields
53+
* Field validators can be enabled/disabled on the fly
54+
55+
__Compatibility__
56+
* [Color Picker](http://mjolnic.github.io/bootstrap-colorpicker/)
57+
* [Date Picker](http://eternicode.github.io/bootstrap-datepicker/), [Datetime Picker](http://eonasdan.github.io/bootstrap-datetimepicker/)
58+
* [Select2](http://ivaynberg.github.io/select2/)
59+
* [Raty](http://wbotelhos.com/raty)
60+
* ... We [play nice](http://bootstrapvalidator.com/examples/#compatibility) with all of them!
61+
62+
## Required
63+
64+
* [jQuery](http://jquery.com/)
65+
* [Bootstrap 3](http://getbootstrap.com/)
66+
67+
## Download
68+
69+
Latest version: [v0.4.5](https://github.com/nghuuphuoc/bootstrapvalidator/releases/download/v0.4.5/bootstrapvalidator-dist-0.4.5.zip), released on 2014-05-15.
70+
71+
For older versions, look at the [Releases](https://github.com/nghuuphuoc/bootstrapvalidator/releases) page.
72+
73+
## Documentation
74+
75+
* [Official website](http://bootstrapvalidator.com)
76+
* [Official website source](https://github.com/nghuuphuoc/bootstrapvalidator/tree/gh-pages)
77+
78+
## Release History
79+
80+
Look at the [Change Log](CHANGELOG.md)
81+
82+
## Author
83+
84+
The __BootstrapValidator__ plugin is written by Nguyen Huu Phuoc, aka @nghuuphuoc
85+
86+
* [http://twitter.com/nghuuphuoc](http://twitter.com/nghuuphuoc)
87+
* [http://github.com/nghuuphuoc](http://github.com/nghuuphuoc)
88+
89+
Big thanks to the contributors:
90+
91+
* [@adgrafik](https://github.com/adgrafik)
92+
* [@easonhan007](https://github.com/easonhan007)
93+
* [@emilchristensen](https://github.com/emilchristensen)
94+
* [@evilchili](https://github.com/evilchili)
95+
* [@Francismori7](https://github.com/Francismori7)
96+
* [@gercheq](https://github.com/gercheq)
97+
* [@henningda](https://github.com/henningda)
98+
* [@ikanedo](https://github.com/ikanedo)
99+
* [@iplus](https://github.com/iplus)
100+
* [@jswale](https://github.com/jswale)
101+
* [@khangvm53](https://github.com/khangvm53)
102+
* [@kristian-puccio](https://github.com/kristian-puccio)
103+
* [@narutosanjiv](https://github.com/narutosanjiv)
104+
* [@patmoore](https://github.com/patmoore)
105+
* [@tomByrer](https://github.com/tomByrer)
106+
* [@vaz](https://github.com/vaz)
107+
* ... might be you! Let's [fork](https://github.com/nghuuphuoc/bootstrapvalidator/fork) and pull a request!
108+
109+
> If you submit new RegEx, please build it using [RegExr.com](http://regexr.com/), add several tests that pass and fail there,
110+
> and include the "share" link in your JS as a ```// ``` comment.
111+
> For example: ```// Test: http://regexr.com/38mqi```
112+
113+
## License
114+
115+
```
116+
The MIT License (MIT)
117+
118+
Copyright (c) 2013 - 2014 Nguyen Huu Phuoc
119+
120+
Permission is hereby granted, free of charge, to any person obtaining a copy of
121+
this software and associated documentation files (the "Software"), to deal in
122+
the Software without restriction, including without limitation the rights to
123+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
124+
the Software, and to permit persons to whom the Software is furnished to do so,
125+
subject to the following conditions:
126+
127+
The above copyright notice and this permission notice shall be included in all
128+
copies or substantial portions of the Software.
129+
130+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
131+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
132+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
133+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
134+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
135+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
136+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "bootstrapValidator",
3+
"version": "0.4.5",
4+
"title": "BootstrapValidator",
5+
"author": {
6+
"name": "Nguyen Huu Phuoc",
7+
"email": "[email protected]",
8+
"url": "https://twitter.com/nghuuphuoc"
9+
},
10+
"licenses": [
11+
{
12+
"type": "MIT",
13+
"url": "http://opensource.org/licenses/mit-license.html"
14+
}
15+
],
16+
"dependencies": {
17+
"jquery": ">= 1.9.0",
18+
"bootstrap": ">= 3.0.0"
19+
},
20+
"description": "The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3",
21+
"keywords": ["jQuery", "plugin", "validate", "validator", "form", "Bootstrap"],
22+
"homepage": "http://bootstrapvalidator.com",
23+
"bugs": "https://github.com/nghuuphuoc/bootstrapvalidator/issues",
24+
"maintainers": [
25+
{ "name": "Nguyen Huu Phuoc", "email": "[email protected]", "url": "https://twitter.com/nghuuphuoc" }
26+
]
27+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "bootstrapValidator",
3+
"description": "The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3",
4+
"version": "0.4.5",
5+
"main": [
6+
"dist/css/bootstrapValidator.css",
7+
"dist/js/bootstrapValidator.js"
8+
],
9+
"license": "MIT",
10+
"keywords": ["jQuery", "plugin", "validate", "validator", "form", "Bootstrap"],
11+
"authors": [
12+
{ "name": "Nguyen Huu Phuoc", "email": "[email protected]"," homepage": "https://twitter.com/nghuuphuoc" }
13+
],
14+
"homepage": "http://bootstrapvalidator.com",
15+
"repository": {
16+
"type": "git",
17+
"url": "https://github.com/nghuuphuoc/bootstrapvalidator.git"
18+
},
19+
"dependencies": {
20+
"jquery": ">= 1.9.0",
21+
"bootstrap": ">= 3.0.0"
22+
}
23+
}

0 commit comments

Comments
 (0)