Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
course-discovery
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
course-discovery
Commits
76fd9dfa
Commit
76fd9dfa
authored
Jul 26, 2017
by
attiyaishaque
Committed by
Attiya Ishaque
Jul 27, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EDUCATOR-756 Instructor form data cleared on cancel.
parent
0627d608
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
course_discovery/static/js/publisher/modal-screen.js
+14
-0
No files found.
course_discovery/static/js/publisher/modal-screen.js
View file @
76fd9dfa
...
...
@@ -51,6 +51,9 @@ $(document).ready(function(){
function
closeModal
(
event
,
modal
)
{
event
.
preventDefault
();
if
(
modal
.
attr
(
'id'
)
==
'addInstructorModal'
)
{
resetInstructorModalData
();
}
modal
.
hide
();
$
(
'body'
).
removeClass
(
'stopScroll'
);
}
...
...
@@ -87,3 +90,14 @@ function assignData(element, data){
$
(
element
).
attr
(
"href"
,
data
);
$
(
element
+
'_copy'
).
html
(
data
);
}
function
resetInstructorModalData
()
{
var
imgPath
=
'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=='
,
selectors
=
[
'#given-name'
,
'#family-name'
,
'#title'
,
'#email'
,
'#bio'
,
'#facebook'
,
'#twitter'
,
'#blog'
,
'#majorWorks'
];
$
(
'#addInstructorModal div img'
).
attr
(
'src'
,
imgPath
);
for
(
var
i
in
selectors
)
clearData
(
selectors
[
i
]);
}
function
clearData
(
selector
){
$
(
'#addInstructorModal div '
+
selector
).
val
(
''
);
}
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