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
58488eaa
Commit
58488eaa
authored
Sep 20, 2015
by
Matt Drayer
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9782 from edx/asadiqbal08/SOL-1188
SOL-1188 Cancel button Saving not Canceling
parents
95da57cc
5ae0562e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
cms/static/js/certificates/models/signatory.js
+5
-0
cms/static/js/certificates/views/signatory_details.js
+2
-0
No files found.
cms/static/js/certificates/models/signatory.js
View file @
58488eaa
...
...
@@ -63,6 +63,11 @@ function(_, str, Backbone, BackboneRelational, gettext) {
setOriginalAttributes
:
function
()
{
// Remember the current state of this model (enables edit->cancel use cases)
this
.
_originalAttributes
=
this
.
parse
(
this
.
toJSON
());
},
reset
:
function
()
{
// Revert the attributes of this model instance back to initial state
this
.
set
(
this
.
_originalAttributes
,
{
parse
:
true
,
validate
:
true
});
}
});
return
Signatory
;
...
...
cms/static/js/certificates/views/signatory_details.js
View file @
58488eaa
...
...
@@ -73,6 +73,7 @@ function ($, _, str, Backbone, gettext, TemplateUtils, ViewUtils, BaseView, Sign
actionableModel
.
save
({},
{
success
:
function
()
{
actionableModel
.
setOriginalAttributes
();
self
.
model
.
setOriginalAttributes
();
dfd
.
resolve
();
self
.
closeSignatoryEditView
();
}.
bind
(
this
)
...
...
@@ -84,6 +85,7 @@ function ($, _, str, Backbone, gettext, TemplateUtils, ViewUtils, BaseView, Sign
closeSignatoryEditView
:
function
(
event
)
{
// Enable the cancellation workflow for the editing view
if
(
event
&&
event
.
preventDefault
)
{
event
.
preventDefault
();
}
if
(
event
)
{
this
.
model
.
reset
();
}
this
.
render
();
},
...
...
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