Commit db907fc7 authored by Alfredo Sumaran's avatar Alfredo Sumaran

Do not show Any Namespace option when needed

parent c5172ff5
......@@ -5,12 +5,14 @@ class @NamespaceSelect
} = opts
showAny = true
fieldName = 'namespace_id'
if @dropdown.data 'fieldName'
if @dropdown.attr 'data-field-name'
fieldName = @dropdown.data 'fieldName'
if @dropdown.attr 'data-show-any'
showAny = @dropdown.data 'showAny'
@dropdown.glDropdown(
filterable: true
selectable: true
......
......@@ -100,7 +100,7 @@
= f.label :new_namespace_id, "Namespace", class: 'control-label'
.col-sm-10
.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_title('Namespaces')
= 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