From 060f3559fd1cc0192e84236d70e6e92f50ad17a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Fri, 28 Aug 2015 13:13:53 +0200 Subject: [PATCH] Bug #3928: Fix abide required attribute in table input Apparently display:none inputs are now ignored by abide --- src/sunstone/public/app/utils/tab-datatable.js | 4 ---- src/sunstone/public/app/utils/tab-datatable/table.hbs | 2 +- src/sunstone/public/app/utils/user-inputs.js | 5 +---- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/sunstone/public/app/utils/tab-datatable.js b/src/sunstone/public/app/utils/tab-datatable.js index 687c291fdc..8e266dcd94 100644 --- a/src/sunstone/public/app/utils/tab-datatable.js +++ b/src/sunstone/public/app/utils/tab-datatable.js @@ -598,7 +598,6 @@ define(function(require) { $('#select_resource_multiple_' + that.dataTableId, section).show(); } - $('#selected_resource_id_' + that.dataTableId, section).hide(); $('#selected_resource_name_' + that.dataTableId, section).hide(); $('#selected_ids_row_' + that.dataTableId, section).data("options", that.selectOptions); @@ -707,7 +706,6 @@ define(function(require) { $('input.check_item', this).prop('checked', true); $('#selected_resource_id_' + that.dataTableId, section).val(aData[that.selectOptions.id_index]).change(); - $('#selected_resource_id_' + that.dataTableId, section).hide(); $('#selected_resource_name_' + that.dataTableId, section).text(aData[that.selectOptions.name_index]).change(); $('#selected_resource_name_' + that.dataTableId, section).show(); @@ -735,7 +733,6 @@ define(function(require) { $('#' + that.dataTableId + '_search', section).val("").trigger("input"); $('#refresh_button_' + that.dataTableId).click(); - $('#selected_resource_id_' + that.dataTableId, section).val("").hide(); $('#selected_resource_name_' + that.dataTableId, section).text("").hide(); $('#selected_resource_' + that.dataTableId, section).hide(); @@ -888,7 +885,6 @@ define(function(require) { // $('input.check_item', this).prop('checked', true); $('#selected_resource_id_' + that.dataTableId, section).val(row_id).change(); - $('#selected_resource_id_' + that.dataTableId, section).hide(); $('#selected_resource_name_' + that.dataTableId, section).text(row_name).change(); $('#selected_resource_name_' + that.dataTableId, section).show(); diff --git a/src/sunstone/public/app/utils/tab-datatable/table.hbs b/src/sunstone/public/app/utils/tab-datatable/table.hbs index 6c77bb3a80..f205653ac1 100644 --- a/src/sunstone/public/app/utils/tab-datatable/table.hbs +++ b/src/sunstone/public/app/utils/tab-datatable/table.hbs @@ -30,8 +30,8 @@ - + {{/if}} diff --git a/src/sunstone/public/app/utils/user-inputs.js b/src/sunstone/public/app/utils/user-inputs.js index d9a3ea41c7..ba1068cffb 100644 --- a/src/sunstone/public/app/utils/user-inputs.js +++ b/src/sunstone/public/app/utils/user-inputs.js @@ -118,10 +118,7 @@ define(function(require) { $('#refresh_button_' + unique_id).click(); - $("input#selected_resource_id_" + unique_id, div).attr( - "wizard_field", vnet_attr.name); - - $("input#selected_resource_id_" + unique_id, div).attr("required", "") + vnetsTable.idInput().attr("wizard_field", vnet_attr.name).attr("required", ""); }); }