Skip to content

Commit

Permalink
if there's only one submit, click that when user chooses to save
Browse files Browse the repository at this point in the history
  • Loading branch information
tonycoz committed Feb 21, 2012
1 parent 2a8edbe commit 64c4f61
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion js/bse-admin/form-monitor.js
Expand Up @@ -297,7 +297,13 @@ var ChangesMonitor = Class.create({
if (form.valid()) {
save.removeClassName("disabled");
save.observe('click', function() {
form.form().submit();
var submits = form.submits();
if (submits.length == 1) {
submits[0].click();
}
else {
form.form().submit();
}
}.bind(this));
}
else {
Expand Down

0 comments on commit 64c4f61

Please sign in to comment.