<%= f.select :associated_resources, grouped_options_for_select(@aps_collection, { :selected => @network_wired_config.new_record? ? ["network:#{@network_wired_config.location_network_id}"] : @network_wired_config.associated_resources }), {}, :class => 'tags-ssid', :multiple => true, :style => "width:300px", 'data-validation'=> "required" %>
<%= f.text_field :name, :class=>"form-control", :placeholder=>"Name", 'data-validation'=> "required"%>
<%=hidden_field_tag 'w_id', @network_wired_config.try(:id) %> <%= hidden_field_tag 'vlan_ids_ln',@vlan_ids %> <%= hidden_field_tag 'vlan_ids_ri','' %>
<%= f.text_field :ssid_qos, :class=>"form-control slider", :placeholder=>"Wired QoS", "data-slider-value" => f.object.ssid_qos || '0', "data-slider-min"=>"0", "data-slider-max"=>"1048576" %>
<%= text_field_tag "slider_output", f.object.ssid_qos, :class => "form-control input-sm slider-output col-md-8", :disabled => true, :size => 5, :style => "font-size: 14px;" %>
Kbps
<%=f.label :custom_port, "Switch".html_safe, :class=>"col-sm-4 control-label"%>
<%=f.select(:custom_port, [['Disable','1'],["All PORT Same Profile","2"],["Custom","3"]], {:selected => @network_wired_config.new_record? ? ["network:#{@network_wired_config.custom_port}"] : @network_wired_config.custom_port } ,:class=>"form-control wired_mode",'data-validation'=> "required" )%> Note:For the option "Custom" switch only the AP having firmware version 2.0.2.23 and greater will work in this functionality
<%= select_tag 'wired_config[v_lan_ids][]','',{:class => 'vlans_id_array',:multiple => true,:style => 'display:none'}%> <%= hidden_field_tag 'pvlans_array[]','',:class => 'pvlans_array'%>

#
<%= label_tag :Disable,'DISABLE' %>
<%= label_tag :PORTVLANID,'PVLANID'%>
<%# if !@current_network.is_openwifi? %>
<%= label_tag :Untagged,'TAGGED' %>
<%= label_tag :VLAN, 'VLAN'%>
<%# end %> <% if false%>
<%= label_tag 'Action'%>
<% end %>

<% (@port_configs || []).each do |p|%>

<%= hidden_field_tag 'wired_config[port_configs][][PID]',0,:class => "port_id" %>
<%= check_box_tag 'wired_config[port_configs][][DIS]' ,'1', p['DIS'] == '1',:class => ''%>
<% if @current_network.is_openwifi? %> <%= number_field_tag 'wired_config[port_configs][][PVID]', p['PVID'], in: 1..4096 %> <% else %> <%= select_tag('wired_config[port_configs][][PVID]', options_for_select([[]],p['PVID']),:class=>"form-control pvlan",'data-validation'=> "",'attr-selected' => p['PVID'] ) %> <% end %>
<%= check_box_tag 'wired_config[port_configs][][TAG]' ,'1', p['TAG'].blank? || p['TAG'] == '0',:class => 'vlan_tagged'%>
<% if !@current_network.is_openwifi? %> <%= select_tag('wired_config[port_configs][][VID][]', '',{:multiple => true,:class=>"form-control vlans vlan_1",'data-validation'=> "required" ,'attr-selected' => p['VID']}) %> <% else %> <%= text_field_tag 'wired_config[port_configs][][VID][]', p['VID'],{:class=>"form-control wc_port_vlan", :placeholder=>"Add VLAN ID" ,'data-validation' => 'required'}%> <% end %>
<% if false%>
<%=link_to " X ","javascript:void(0);", {:class => "icon-delete btn btn-danger remove_port"} %>
<% end %>
<% end %>