       $block = $selectbox.closest('.block')
       $sidebarCollapsedValue = $block.find('.sidebar-collapsed-icon span')
       $value = $block.find('.value')
+      $newLabelError = $('.js-label-error', $parent)
+      $colorPreview = $('.js-dropdown-label-color-preview', $parent)
+      $newLabelCreateButton = $('.js-new-label-btn', $parent)
+
+      $newLabelError.hide()
       $loading = $block.find('.block-loading').fadeOut()
 
       issueURLSplit = issueUpdateURL.split('/') if issueUpdateURL?

        enableLabelCreateButton = ->
          if newLabelField.val() isnt '' and newColorField.val() isnt ''
            $newLabelError.hide()
            $('.js-new-label-btn').disable()

            # Create new label with API
            Api.newLabel projectId, {
              name: newLabelField.val()
              color: newColorField.val()
            }, (label) ->
              $('.js-new-label-btn').enable()

              if label.message?
                $newLabelError
                  .text label.message
                  .show()
              else
                $('.dropdown-menu-back', $dropdown.parent()).trigger 'click'

            $newLabelCreateButton.enable()
          else
            $newLabelCreateButton.disable()

        newLabelField.on 'keyup change', enableLabelCreateButton


          .on 'click', (e) ->
            e.preventDefault()
            e.stopPropagation()
            saveLabel()

      saveLabelData = ->
        selected = $dropdown
