Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
219a9b5a
Commit
219a9b5a
authored
12 years ago
by
Matthew Mongeau
Browse files
Options
Downloads
Patches
Plain Diff
Fixed form for signup
parent
95008dfd
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lms/templates/signup_modal.html
+29
-34
29 additions, 34 deletions
lms/templates/signup_modal.html
with
29 additions
and
34 deletions
lms/templates/signup_modal.html
+
29
−
34
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>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment