Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
219a9b5a
Commit
219a9b5a
authored
Jun 28, 2012
by
Matthew Mongeau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed form for signup
parent
95008dfd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
34 deletions
+29
-34
lms/templates/signup_modal.html
+29
-34
No files found.
lms/templates/signup_modal.html
View file @
219a9b5a
...
...
@@ -16,18 +16,18 @@
<label>
Public Username
</label>
<input
name=
"username"
type=
"text"
placeholder=
"Public Username"
>
<label>
Full Name
</label>
<input
name=
"
full-
name"
type=
"text"
placeholder=
"Full Name"
>
<input
name=
"name"
type=
"text"
placeholder=
"Full Name"
>
<label>
Your Location
</label>
<input
name=
"location"
type=
"text"
placeholder=
"Your Location"
>
<label>
Prefered Language
</label>
<input
name=
"language"
type=
"text"
placeholder=
"Prefered Language"
>
<label
class=
"terms-of-service"
>
<input
name=
"terms
"
type=
"checkbox
"
>
<input
name=
"terms
_of_service"
type=
"checkbox"
value=
"true
"
>
I agree to the
<a
href=
"#"
>
Terms of Service
</a>
</label>
<label
class=
"honor-code"
>
<input
name=
"honor
-code"
type=
"checkbox
"
>
<input
name=
"honor
_code"
type=
"checkbox"
value=
"true
"
>
I agree to the
<a
href=
"#"
>
Honor Code
</a>
, sumarized below as:
...
...
@@ -73,39 +73,34 @@
<script
type=
"text/javascript"
>
(
function
()
{
function
getCookie
(
name
)
{
return
$
.
cookie
(
name
);
}
function
postJSON
(
url
,
data
,
callback
)
{
$
.
ajax
({
type
:
'POST'
,
url
:
url
,
dataType
:
'json'
,
data
:
data
,
success
:
callback
,
headers
:
{
'X-CSRFToken'
:
getCookie
(
'csrftoken'
)}
});
}
function
getCookie
(
name
)
{
return
$
.
cookie
(
name
);
}
$
(
'form#enroll_form'
).
submit
(
function
(
e
)
{
e
.
preventDefault
();
var
submit_data
=
{};
$
.
each
(
$
(
"[id^=ca_]"
),
function
(
index
,
value
){
submit_data
[
value
.
name
]
=
value
.
value
;
});
$
.
each
(
$
(
"[id^=cb_]"
),
function
(
index
,
value
){
submit_data
[
value
.
name
]
=
value
.
checked
;
function
postJSON
(
url
,
data
,
callback
)
{
$
.
ajax
({
type
:
'POST'
,
url
:
url
,
dataType
:
'json'
,
data
:
data
,
success
:
callback
,
headers
:
{
'X-CSRFToken'
:
getCookie
(
'csrftoken'
)}
});
}
postJSON
(
'/create_account'
,
submit_data
,
function
(
json
)
{
if
(
json
.
success
)
{
$
(
'#enroll'
).
html
(
json
.
value
);
}
else
{
$
(
'#enroll_error'
).
html
(
json
.
value
).
stop
().
css
(
"background-color"
,
"#933"
).
animate
({
backgroundColor
:
"#333"
},
2000
);
}
}
);
});
$
(
'form#enroll_form'
).
submit
(
function
(
e
)
{
e
.
preventDefault
();
var
submit_data
=
$
(
'#enroll_form'
).
serialize
();
postJSON
(
'/create_account'
,
submit_data
,
function
(
json
)
{
if
(
json
.
success
)
{
$
(
'#enroll'
).
html
(
json
.
value
);
}
else
{
$
(
'#enroll_error'
).
html
(
json
.
value
).
stop
().
css
(
"background-color"
,
"#933"
).
animate
({
backgroundColor
:
"#333"
},
2000
);
}
}
);
});
})(
this
)
</script>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment