Skip to content

Commit addb4ae

Browse files
committed
Revert fix to disable submit buttons, which prevented some functionalities
1 parent 5f15c98 commit addb4ae

File tree

3 files changed

+1
-16
lines changed

3 files changed

+1
-16
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The code is available at [https://github.com/martignoni/moodle-tool_moodlebox](h
1212

1313
### Release notes
1414

15-
* 2017-04-10, version 1.4.4: Restart and shutdown buttons are now disabled after submit
15+
* 2017-04-11, version 1.4.4: Some small bugs and cosmetic fixes
1616
* 2016-12-06, version 1.4.3: Bug fixed for use with Moodle 3.2
1717
* 2016-10-08, version 1.4.2: Display warnings when the plugin installation is not complete
1818
* 2016-09-25, version 1.4.1: MoodleBox Wi-Fi network password cannot be changed to empty

index.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@
6666
$systemtime = usergetdate(time())[0];
6767

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

7170
$kernelversion = php_uname('s') . ' ' . php_uname('r') . ' ' . php_uname('m');
7271
$raspbianversion = exec('lsb_release -ds');

utils.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,3 @@ var checktime = function(Y, servertime) {
1212
}
1313
return usertime;
1414
}
15-
16-
function disable_restartshutdown_buttons() {
17-
// Submitting the Form disables the restart button.
18-
var form = Y.one('#formrestartstop');
19-
form.on('submit', function() {
20-
var buttons = form.all('.btn');
21-
if (form.getAttribute('submitted')) return false;
22-
buttons.each(
23-
function(button){
24-
button.setAttribute('disabled', true);
25-
});
26-
form.setAttribute('submitted','true')
27-
});
28-
}

0 commit comments

Comments
 (0)