File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
app/code/Magento/EncryptionKey/Block/Adminhtml/Crypt/Key Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -40,9 +40,10 @@ protected function _prepareForm()
40
40
'name ' => 'generate_random ' ,
41
41
'label ' => __ ('Auto-generate a Key ' ),
42
42
'options ' => [0 => __ ('No ' ), 1 => __ ('Yes ' )],
43
- 'onclick ' => "var cryptKey = jQuery('#crypt_key'); cryptKey.disabled = this.value == 1; " .
44
- "if (cryptKey.disabled) {cryptKey.parent().parent().hide();} " .
45
- "else {cryptKey.parent().parent().show();} " ,
43
+ 'onclick ' => "var cryptKey = jQuery('#crypt_key'); var cryptKeyBlock = cryptKey.parent().parent(); " .
44
+ "cryptKey.prop('disabled', this.value === '1'); " .
45
+ "if (cryptKey.prop('disabled')) { cryptKeyBlock.hide() } " .
46
+ "else { cryptKeyBlock.show() } " ,
46
47
'note ' => __ ('The generated key will be displayed after changing. ' )
47
48
]
48
49
);
You can’t perform that action at this time.
0 commit comments