Skip to content

Commit e2d5b6e

Browse files
committed
Add notes and sample code
1 parent 22e7e8d commit e2d5b6e

File tree

3 files changed

+60
-0
lines changed

3 files changed

+60
-0
lines changed

session-notes/2015-03-14/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Fundamentals of Web Development
2+
3+
**March 14, 2015**
4+
5+
Video: http://youtu.be/2aUeLjBoFaM
6+
7+
## Questions
8+
9+
- Sagar: working with modal windows
10+
- Sagar: handling authorization errors
11+
- Theodore: rendering data with JavaScript
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<div>
2+
<div class="login-form create-group-container container">
3+
<p>
4+
<span class="form-heading">CREATE GROUP</span>
5+
</p>
6+
7+
<form id="create-group-form" class="form-container" action="/create_group" method="post">
8+
9+
<div class="form-group">
10+
<input class="form-control sign-in-input" type="text" name="group[group_name]" placeholder="Group Name"></br>
11+
<input class="form-control sign-in-input" type="password" name="group[password]" placeholder="Password"></br>
12+
<input class="form-control sign-in-input" type="password" name="group[password_confirmation]" placeholder="Confirm Password"></br>
13+
<a class="btn btn-orange sign-in-input">Create Group</a>
14+
15+
<div id="confirm-group">
16+
<h3>
17+
Please share this information with your group.
18+
</h3>
19+
20+
<button id="confirm-group-button" class="btn btn-orange">Confirm</button>
21+
</div>
22+
</div>
23+
24+
<a id="create-group" href="/">Back</a>
25+
26+
</form>
27+
28+
29+
</div>
30+
31+
</div>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
var toggleModal = function() {
2+
$('#create-group-form').hide();
3+
$('#confirm-group').show();
4+
}
5+
6+
$(document).ready(function() {
7+
$('#create-group-form').on('submit', function(event) {
8+
event.preventDefault();
9+
10+
var formData = $(this).serialize();
11+
12+
toggleModal();
13+
14+
$('#confirm-group-button').on('click', function(event) {
15+
$.ajax({ url: '/create_group', type: 'POST', data: formData });
16+
});
17+
})
18+
});

0 commit comments

Comments
 (0)