 class FirewallFilterFormView extends KDCustomHTMLView
 
   constructor:(options={}, data)->
-    options.cssClass = "rule-form-view"
+    options.cssClass = "filter-form-view"
     super options, data
 
-    @filterNameInput  = new KDInputView {tooltip: {title: "Enter a name for the rule.", placement:"bottom"}}
+    @filterNameInput  = new KDInputView {tooltip: {title: "Enter a name for the filter.", placement:"bottom"}}
     @filterInput      = new KDInputView
       tooltip : 
         title     : "You can enter IP, IP Range or a country name. (ie: 192.168.1.1/24 or China)"

          index   : "0"
      , (err, response)=>
        if not err
          delegate.emit "behaviorCreated", {domainName:data.domainName, ruleName:data.ruleName, action:behavior}

  pistachio:->
    """
    {div.fl.fw-li-rule{ #(match)}}
    <div class="fr buttons">
      {{> @allowButton }}
      {{> @denyButton }}

    filterType  = if @filterInput.getValue().match /[0-9+]/ then "ip" else "country"
    filterName  = @filterNameInput.getValue()
    filterMatch = @filterInput.getValue()
    delegate    = @getDelegate()

    KD.remote.api.JProxyFilter.createFilter
      name  : filterName
      type  : filterType
      match : filterMatch
    , (err, filter)->
      unless err 
        delegate.emit "newFilterCreated", {filterName, filterMatch}

      return new KDNotificationView 
        title : "An error occured while performing your action. Please try again."
        type  : "top"
      

  viewAppended: JView::viewAppended

  pistachio:->
    """
    <div class="fl">
      <label for="filtername" class="">Filter Name:</label>
      {{> @filterNameInput }}
    </div>
    <div class="fl">
      <label for="filter">Match:</label>
      {{> @filterInput }}
      {{> @addButton }}
    </div>
    
