forked from tobinskinner/backform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap2.html
117 lines (101 loc) · 4.19 KB
/
bootstrap2.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<!DOCTYPE html>
<html lang="en">
<head>
<title>Backform - Bootstrap 2.3</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<script src="3rd/jquery.min.js" type="text/javascript"></script>
<script src="3rd/bootstrap2.3.min.js" type="text/javascript"></script>
<link href="3rd/bootstrap2.3.min.css" rel="stylesheet" type="text/css" charset="utf-8">
<script src="3rd/bootstrap-datepicker.js" type="text/javascript"></script>
<link href="3rd/bootstrap-datepicker.css" rel="stylesheet" type="text/css" charset="utf-8">
<script src="3rd/underscore.js" type="text/javascript"></script>
<script src="3rd/backbone.js" type="text/javascript"></script>
<script src="src/backform.js" type="text/javascript"></script>
<script src="example.js" type="text/javascript"></script>
<style>
.navbar-inner {border-radius: 0;}
#wrap {min-height: 100%; height: auto!important; margin: 0 auto -60px;}
#push {height: 60px;}
</style>
<script>
Backform.bootstrap2();
</script>
</head>
<body>
<div id="wrap">
<div class="navbar navbar-inverse">
<div class="navbar-inner">
<div class="container">
<a class="brand" href="index.html">Backform</a>
<ul class="nav navbar-nav">
<li><a href="index.html#Introduction">Introduction</a></li>
<li><a href="index.html#Documentation">Documentation</a></li>
<li><a href="index.html#Markup">HTML Markup</a></li>
<li><a href="#Boostrap2">Bootstrap 2.3</a></li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="span12">
<h1 id="Boostrap23">Bootstrap 2.3</h1>
<p>
To use Backform with Bootstrap 2.3, call the <code>bootstrap2</code> function. Add this at the beginging of your HTML document, after Backform is loaded:
<pre>
<script>
Backform.bootstrap2();
</script>
</pre>
This will change the global class names. In some cases, the markup must be changed.
Controls can have a <code>bootstrap2</code> function defined for themselves to change the markup.
Look at the code for Backform.RadioControl as an example.
</p>
<h2>Example</h2>
<p>The same example but with Bootstrap 2.3 HTML markup.</p>
</div>
</div>
<div class="row">
<div class="span6">
<form id="form" class="form-horizontal"></form>
</div>
<div class="span6">
<pre id="object"></pre>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h2>Conditional show/hide Example</h2>
<form id="form-question" class="form-horizontal"></form>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h2>Browser Validation Example</h2>
<form id="form-email" class="form-horizontal"></form>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h2>Validation Example</h2>
<form id="form-validation" class="form-horizontal"></form>
</div>
</div>
</div>
<br/>
<div id="push"></div>
</div>
<div class="footer navbar navbar-default">
<div class="navbar-inner">
<div class="container">
<p class="navbar-text pull-left">© 2014 <a href="http://www.amilia.com/en">Amilia Inc.</a> <a href="https://github.com/AmiliaApp/backform/blob/gh-pages/LICENSE">Licensed under MIT.</a></p>
<p class="navbar-text pull-right">Written by <a href="http://martindrapeau.tumblr.com/">Martin Drapeau</a></p>
<p class="navbar-text pull-right"> </p>
</div>
</div>
</div>
<a href="https://github.com/AmiliaApp/backform"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" alt="Fork me on GitHub"></a>
</body>
</html>