mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/14272] Disable not toggled form elements
PHPBB3-14272
This commit is contained in:
parent
7705017f63
commit
74ec6f4e9a
1 changed files with 7 additions and 0 deletions
|
@ -1534,6 +1534,13 @@ phpbb.toggleSelectSettings = function(el) {
|
||||||
var $this = $(this),
|
var $this = $(this),
|
||||||
$setting = $($this.data('toggle-setting'));
|
$setting = $($this.data('toggle-setting'));
|
||||||
$setting.toggle($this.is(':selected'));
|
$setting.toggle($this.is(':selected'));
|
||||||
|
|
||||||
|
// Disable any input elements that are not visible right now
|
||||||
|
if ($this.is(':selected')) {
|
||||||
|
$($this.data('toggle-setting') + ' input').prop('disabled', false);
|
||||||
|
} else {
|
||||||
|
$($this.data('toggle-setting') + ' input').prop('disabled', true);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue