aboutsummaryrefslogtreecommitdiff
path: root/install/js/install.js
diff options
context:
space:
mode:
Diffstat (limited to 'install/js/install.js')
-rw-r--r--install/js/install.js16
1 files changed, 13 insertions, 3 deletions
diff --git a/install/js/install.js b/install/js/install.js
index 8d36c8a65..49b2be10c 100644
--- a/install/js/install.js
+++ b/install/js/install.js
@@ -1,11 +1,21 @@
-// prevent double-submission of forms
$(function() {
+ // prevent double-submission of forms
$('form').submit(function() {
- if (this.data('submitted')) {
+ if ($(this).data('submitted')) {
return false;
}
- this.data('submitted', true);
+ $(this).data('submitted', true);
return true;
});
+
+ // toggle the disable attribute of text box based on checkbox
+ $('.elgg-combo-checkbox').click(function() {
+ if ($(this).is(':checked')) {
+ $(this).prev().attr('disabled', true);
+ $(this).prev().val('');
+ } else {
+ $(this).prev().attr('disabled', false);
+ }
+ });
});