Commit 35224dbf authored by Alfredo Sumaran's avatar Alfredo Sumaran

Do not show Any Namespace option when needed

parent 338072cc
...@@ -5,12 +5,14 @@ class @NamespaceSelect ...@@ -5,12 +5,14 @@ class @NamespaceSelect
} = opts } = opts
showAny = true showAny = true
fieldName = 'namespace_id' fieldName = 'namespace_id'
if @dropdown.data 'fieldName' if @dropdown.attr 'data-field-name'
fieldName = @dropdown.data 'fieldName' fieldName = @dropdown.data 'fieldName'
if @dropdown.attr 'data-show-any'
showAny = @dropdown.data 'showAny'
@dropdown.glDropdown( @dropdown.glDropdown(
filterable: true filterable: true
selectable: true selectable: true
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
= f.label :new_namespace_id, "Namespace", class: 'control-label' = f.label :new_namespace_id, "Namespace", class: 'control-label'
.col-sm-10 .col-sm-10
.dropdown .dropdown
= dropdown_toggle('Search for Namespace', { toggle: 'dropdown', field_name: 'new_namespace_id' }, { toggle_class: 'js-namespace-select large' }) = dropdown_toggle('Search for Namespace', { toggle: 'dropdown', field_name: 'new_namespace_id', show_any: 'false' }, { toggle_class: 'js-namespace-select large' })
.dropdown-menu.dropdown-select .dropdown-menu.dropdown-select
= dropdown_title('Namespaces') = dropdown_title('Namespaces')
= dropdown_filter("Search for Namespace") = dropdown_filter("Search for Namespace")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment