<%if @location_networks.blank?%> <%= render :partial => 'shared/no_network_msg' %> <%else%>
<% if can? :manage,StaticRoute%>
NOTE: Only the AP having firmware version 2.0.2.23 and greater will work in this functionality

Static Routes

<%= form_for @static_route , as: :static_route, method: (@static_route.id.blank? ? "post" : "put"), html: { class: "form-horizontal static-route-form" , role: "form"} do |route| %>
<%= route.label :group_name,"Routing Name*".html_safe, :class=>"col-sm-4 control-label" %>
<%= route.text_field :routing_name,:class=>"form-control", :data => {validation: 'required special-character'},:style => 'width:330px' %>
<%= label_tag :associated_resources,"AP's/ Network*".html_safe, :class=>"col-sm-2 control-label" %>
<%= route.select :associated_resources, grouped_options_for_select(grouped_collection_of_ap_and_networks_current_network("static"), { selected: @static_route.new_record? ? "" : @static_route.associated_resources}), {}, :multiple => true, :class=>"form-control associated-resource", :placeholder=>"Type to select APs / Network",:style => 'width:330px','data-validation'=> "required"%> <%#= select_tag 'route[associated_resources]', options_for_select(@mac.map{|r| [r[0],r[1],{'data-version' => r[2],'data-mac' => r[3]} ] }, { :selected => @static_route.new_record? ? ' ' : @static_route.associated_resources}), :multiple => true, :class=>"form-control associated-resource ap_mac", :placeholder=>"Type to select APs / Network", :data => { validation: 'required ap-version-check-23'},:style => 'width:330px' %>


<%=link_to " Add Routing".html_safe,"javascript:void(0);", {:class => "btn btn-warning add-nested-form pull-right"} %>


<%= label_tag '','Network'%>
<%= label_tag '','Bitmask'%>
<%= label_tag '','Gateway'%>
<%=route.fields_for :static_routing_lists, @static_routing_lists do |f|%>

<%= f.text_field :network,:class=>"form-control src_network", :data => {validation: ' required ip acl-group acl-bitmask-ip network-conflict-gateway'}, :placeholder=>"IP"%>
<%= f.text_field :bitmask,:class=>"form-control scr_bitmask", :data => {validation: 'required bitmask'}, :placeholder=>" Bitmask"%>
<%= f.text_field :gateway,:class=>"form-control src_gateway", :data => {validation: 'required network-conflict-gateway ip'}, :placeholder=>"IP"%>
<%= f.hidden_field :id, :class => "nested_id" %> <%= f.hidden_field :_destroy, :class => "nested_destroy" %> <%=link_to " X ","javascript:void(0);", {:class => "pull-right icon-delete btn btn-danger remove-nested-form"} %>
<% end %>

<%=route.submit (@static_route.id.blank? ? "Create Static Route" : "Update Static Route"),:class=>"btn btn-success create_network acl-sunmit-btn"%> <%= link_to "Cancel", static_routes_path, :class => "btn btn-primary" %>
<% end %>
<% end %>
<%end%>