Skip to content

Commit

Permalink
Reset the create folder form on modal close (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
dneukirchen authored and laoneo committed Apr 3, 2017
1 parent f3427d1 commit 719b569
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
},
/* Close the modal instance */
close() {
this.reset();
this.$store.commit(types.HIDE_CREATE_FOLDER_MODAL);
},
/* Save the form and create the folder */
Expand All @@ -56,8 +57,12 @@
});
// Reset the form
this.folder = '';
this.reset();
},
/* Reset the form */
reset() {
this.folder = '';
}
},
}
</script>
5 changes: 5 additions & 0 deletions media/com_media/js/mediamanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -8944,6 +8944,7 @@ exports.default = {
return this.folder;
},
close: function close() {
this.reset();
this.$store.commit(types.HIDE_CREATE_FOLDER_MODAL);
},
save: function save() {
Expand All @@ -8956,6 +8957,10 @@ exports.default = {
name: this.folder,
parent: this.$store.state.selectedDirectory
});

this.reset();
},
reset: function reset() {
this.folder = '';
}
}
Expand Down

0 comments on commit 719b569

Please sign in to comment.