From c63d63b6eea45057d114c26c9cae1e71fbc7a8ad Mon Sep 17 00:00:00 2001 From: mokaddem Date: Fri, 27 Mar 2020 15:31:37 +0100 Subject: [PATCH] chg: [attribute:edit] Added support of chosen - fix #5736 --- app/View/Attributes/add.ctp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/View/Attributes/add.ctp b/app/View/Attributes/add.ctp index 1d0c54e96..a9d06238b 100644 --- a/app/View/Attributes/add.ctp +++ b/app/View/Attributes/add.ctp @@ -122,6 +122,7 @@ $('#AttributeCategory').change(function() { formCategoryChanged('Attribute'); + $('#AttributeType').chosen('destroy').chosen(); if ($(this).val() === 'Internal reference') { $("#AttributeDistribution").val('0'); checkSharingGroup('Attribute'); @@ -166,6 +167,16 @@ } } }); + + + $('#AttributeType').chosen(); + $('#AttributeCategory').chosen(); + + setTimeout(function() { // make sure html is draw. TODO: use modal event to draw it + $('#AttributeType').chosen(); + $('#AttributeCategory').chosen(); + }, 500); + }); element('form_seen_input'); ?>