   switchToAdvancedMode: ->
 
     @setClass 'advanced-search-mode'
+
+
+  switchToSimpleMode: ->
+
+    @clearSimpleSearch yes
+    @clearAdvancedSearch()
+    @unsetClass 'advanced-search-mode'
 
 
   pistachio: ->

          style       : 'solid green medium'
        clear         :
          title       : 'Clear'
          style       : 'solid light-gray medium'
          callback    : @bound 'clearAdvancedSearch'
      callback        : @bound 'doAdvancedSearch'

    { status, type, accounts } = @advancedForm.inputs

    @emitSearch query


  clearSimpleSearch: (skipEvent) ->

    @lastQuery = null
    @searchInput.setValue ''

    @emitSearch()  unless skipEvent


  emitSearch: (query) -> @emit 'SearchRequested', query
