Skip to content

Commit

Permalink
Revert fix to disable submit buttons, which prevented some functional…
Browse files Browse the repository at this point in the history
…ities
  • Loading branch information
martignoni committed Apr 11, 2017
1 parent 5f15c98 commit addb4ae
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The code is available at [https://github.com/martignoni/moodle-tool_moodlebox](h

### Release notes

* 2017-04-10, version 1.4.4: Restart and shutdown buttons are now disabled after submit
* 2017-04-11, version 1.4.4: Some small bugs and cosmetic fixes
* 2016-12-06, version 1.4.3: Bug fixed for use with Moodle 3.2
* 2016-10-08, version 1.4.2: Display warnings when the plugin installation is not complete
* 2016-09-25, version 1.4.1: MoodleBox Wi-Fi network password cannot be changed to empty
Expand Down
1 change: 0 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
$systemtime = usergetdate(time())[0];

$PAGE->requires->js_init_call('checktime', array($systemtime));
$PAGE->requires->js_init_call('disable_restartshutdown_buttons');

$kernelversion = php_uname('s') . ' ' . php_uname('r') . ' ' . php_uname('m');
$raspbianversion = exec('lsb_release -ds');
Expand Down
14 changes: 0 additions & 14 deletions utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,3 @@ var checktime = function(Y, servertime) {
}
return usertime;
}

function disable_restartshutdown_buttons() {
// Submitting the Form disables the restart button.
var form = Y.one('#formrestartstop');
form.on('submit', function() {
var buttons = form.all('.btn');
if (form.getAttribute('submitted')) return false;
buttons.each(
function(button){
button.setAttribute('disabled', true);
});
form.setAttribute('submitted','true')
});
}

0 comments on commit addb4ae

Please sign in to comment.