From: Rajat Gupta <rajat.triumph(a)gmail.com>
Removed add jquery method.
separated event registration for size and path text box
Signed-off-by: Rajat Gupta <rajat.triumph(a)gmail.com>
---
ui/js/src/kimchi.guest_storage_add.main.js | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/ui/js/src/kimchi.guest_storage_add.main.js
b/ui/js/src/kimchi.guest_storage_add.main.js
index b8e088e..adf4a03 100644
--- a/ui/js/src/kimchi.guest_storage_add.main.js
+++ b/ui/js/src/kimchi.guest_storage_add.main.js
@@ -595,7 +595,15 @@ kimchi.guest_storage_add_main = function() {
if(kimchi.hostarch === s390xArch){
- $(capacityTextbox).add(directorypathTextbox).on('change input
propertychange', function(event){
+ $(capacityTextbox).on('change input propertychange', function(event){
+ if(sourcenewTextbox.val() === 'path'){
+ $(submitButton).prop('disabled', $(capacityTextbox).val() ===
'' || $(directorypathTextbox).val() === '');
+ }else{
+ $(submitButton).prop('disabled', $(capacityTextbox).val() ===
'');
+ }
+ });
+
+ $(directorypathTextbox).on('change input propertychange',
function(event){
if(sourcenewTextbox.val() === 'path'){
$(submitButton).prop('disabled', $(capacityTextbox).val() ===
'' || $(directorypathTextbox).val() === '');
}else{
--
2.1.0
Show replies by date
Applied. Thanks.
Regards,
Aline Manera