<%= f.select :associated_aps_and_tags, grouped_options_for_select(@aps_collection, { :selected => @network_ssid.new_record? ? ["network:#{@network_ssid.location_network_id}"] : @network_ssid.associated_aps_and_tags }), {}, :class => 'tags-ssid', :multiple => true,:style => 'width:303px', 'data-validation'=> "required", autocomplete: "new-password" %>
<%= f.text_field :ssid_name, :class=>"form-control", :placeholder=>"SSID Name", 'data-validation'=> "required"%>
<%= f.select :radio_bands, options_for_select([['2.4 GHz', '2.4'], ['5 GHz', '5'], ['6 GHz', '6']], { :selected => @network_ssid.new_record? ? ["2.4"] : @network_ssid.radio_bands }), {}, :class => 'radio-band-ssid', :multiple => true,:style => 'width:153px', 'data-validation'=> "required", autocomplete: "new-password" %>
<%= f.text_field :ssid_qos, :class=>"form-control slider", :placeholder=>"SSID 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.text_field :max_association, :class=>"form-control", :placeholder=>"Max Connection", "data-slider-value" => f.object.max_association || '0', "data-slider-min"=>"0", "data-slider-max"=>"100" %>
<%=f.select(:acl_mac, [["Enable","1"],["Disable","0"]],{},:class=>"form-control") %>
<%=f.select(:mac_filter_policy, [["Allow","1"],["Deny","0"]],{},:class=>"form-control") %>
<%= f.text_field :acl_mac_list, :class=>"form-control devices", :placeholder=>"Press Enter or Tab for adding MAC ID" ,'data-validation' => 'required mac-check'%> Note: Paste comma separated MAC IDs for adding multiple MAC ID

<%=f.select(:wpa_algorithm, ["TKIP","AES"],{},:class=>"form-control") %>
<%= f.password_field :wpa_key, :value => f.object.wpa_key, :class => "form-control", :placeholder => "Authentication Key", :data => { validation: 'required length'}, 'data-validation-length'=> "8-63", autocomplete: "new-password" %>
<%= f.select :ssid_802_11_w, [['Optional (allow unsupported clients)', 'enabled'], ['Required (reject unsupported clients)', 'required'],['Disabled (never use)','disabled']], { :selected => 'disabled' }, :class => "form-control rule_802_on" %>
<%= f.select :uplink_priority,[['Primary','2'],['Secondary','3']],{},:class => 'col-sm-5 form-control'%>
<%= f.fields_for :v_lan ,@network_ssid.v_lan || VLan.new do |v|%>
<% if false%>
<%= v.label :name, :class => "col-sm-4 control-label" %>
<%= v.text_field :name, :class => 'form-control', :data => { validation: 'required' } %>
<% end%>
<%= v.label :v_lan_id, "VLan ID[##]".html_safe, :class=>"col-sm-4 control-label" %>
<%v_lan_ids = (3..4096).to_a %> <%= v.select :v_lan_id, v_lan_ids.unshift(['Default',1]).unshift(['Disable', 0]), {}, :class => 'form-control', :data => { validation: 'required' } %>
<% end %>
<% (@network_ssid.multi_psk_options || []).each_with_index do |psk,index|%>
>
<%v_lan_ids = (3..4096).to_a %> <%= select_tag 'network_ssid[multi_psk_options][][v_lan_id]',options_for_select(v_lan_ids.unshift(['Default',1]),psk['v_lan_id']),:style=>"width:180px",:class=>"form-control psk_vlan_id", :data => { validation: 'required'} %>
<%= password_field_tag 'network_ssid[multi_psk_options][][PASSPHRASE]',psk['PASSPHRASE'],:class=>"form-control psk_passfrace",:style=>"width:250px", :placeholder=>"PASSPHRASE", :data => { validation: 'required length'}, 'data-validation-length'=> "8-63", autocomplete: "new-password"%>
<%= text_field_tag 'network_ssid[dhcp_mappings][][MAC]',psk['MAC'],:class=>"form-control dhcp_mac",:style=>"width:140px", :placeholder=>"MAC",:data => { validation: 'dhcp-mac_id'}%>
<%=link_to " X ","javascript:void(0);", {:class => "remove_psk_option icon-delete btn btn-sm btn-danger"} %>
<% end %>
<%= f.text_field :ip_address, :class=>"form-control devices ip-mask ip", :placeholder=>"IP Address", :data => { :validation => "required ip verify_ip dhcp_range_check", 'validation-url' => verify_ip_home_configuration_index_path(:network_ssid => f.object.id, :verify_for => "network_ssid") } %>
<%= f.text_field :subnet_mask, :class=>"form-control devices subnet_mask ip-mask", :placeholder=>"Netmask", 'data-validation' => "required ip subnet-mask ip-conflict-gateway" %>
<%=f.select(:dns_mode, NetworkSsid::DNS_MODE, {}, :class=>"form-control", :data => { validation: 'required'}) %>
<%= f.text_field :dns_primary,:class=>"form-control ip-mask p_dns", :placeholder=>"Primary DNS", :data => { validation: 'required ip ip-netmask-gateway'} %>
<%= f.text_field :dns_secondary,:class=>"form-control ip-mask s_dns", :placeholder=>"Secondary DNS", 'data-validation'=> "required ip ip-netmask-gateway" %>
<%=f.select(:dhcp_relay_server, [["Disable","1"],["Enable","2"],['Relay','3']],{},:class=>"form-control dhcp_server",'data-validation'=> "required" )%>
<%= f.text_field :dhcp_lease_time, :class=>"form-control devices ",:value => f.object.dhcp_lease_time || "86400", :placeholder=>"DHCP Lease Time",'data-validation'=> "required phone-only-integer leasetime-check" %>
<% (@network_ssid.dhcp_ranges|| []).each_with_index do |dhcp,index|%>
>
<%= text_field_tag 'network_ssid[dhcp_ranges][][START]',dhcp['START'],:class=>"form-control dhcp_start",:style=>"width:140px",:placeholder=>"DHCP Start",:data => { validation: 'required ip ip-range-check ip-conflict-dhcp_start dhcp_range_check'}%>
<%= text_field_tag 'network_ssid[dhcp_ranges][][END]',dhcp['END'],:class=>"form-control dhcp_end",:style=>"width:140px", :placeholder=>"DHCP End",:data => { validation: 'required ip dhcp_check ip-range-check ip-conflict-dhcp_end dhcp_range_check'}%>
<%=link_to " X ","javascript:void(0);", {:class => "remove_range icon-delete btn btn-sm btn-danger"} %>
<% end %>
<% (@network_ssid.dhcp_mappings|| []).each_with_index do |dhcp,index|%>
>
<%= text_field_tag 'network_ssid[dhcp_mappings][][IPADDR]',dhcp['IPADDR'],:class=>"form-control dhcp_ip",:style=>"width:140px",:placeholder=>"IPAddress",:data => { validation: 'required ip dhcp_ip-range-check ip-conflict-dhcp_ip dhcp_range_check'}%>
<%= text_field_tag 'network_ssid[dhcp_mappings][][MAC]',dhcp['MAC'],:class=>"form-control dhcp_mac",:style=>"width:140px", :placeholder=>"MAC",:data => { validation: 'required dhcp-mac_id'}%>
<%=link_to " X ","javascript:void(0);", {:class => "remove_mapping icon-delete btn btn-sm btn-danger"} %>
<% end %>
<% (@network_ssid.dhcp_options || []).each_with_index do |dhcp,index|%>
>
<%= select_tag 'network_ssid[dhcp_options][][CODE]',options_for_select([[15 ,15], [42,42], [43,43], [66,66], [67,67],[138,138],[150,150]],dhcp['CODE']),:style=>"width:180px",:class=>"form-control dhcp_code", :data => { validation: 'required dhcp_code'} %>
<% if ['66','67','138','150'].include?(dhcp['TYPE'])%> <%= select_tag 'v_lan[dhcp_options][][TYPE]', options_for_select([['Text' ,'Text'], ['IP', 'IP'], ['Hex', 'Hex']],dhcp['TYPE']),:style=>"width:180px",:class=>"form-control dhcp_type", :disabled=>true %> <% else %> <%= select_tag 'v_lan[dhcp_options][][TYPE]', options_for_select([['Text' ,'Text'], ['IP', 'IP'], ['Hex', 'Hex']],dhcp['TYPE']),:style=>"width:180px",:class=>"form-control dhcp_type" %> <% end %>
<%= text_field_tag 'network_ssid[dhcp_options][][VALUE]',dhcp['VALUE'],:class=>"form-control dhcp_value",:style=>"width:250px", :placeholder=>"VALUE", :data => { validation: 'required'}%>
<%=link_to " X ","javascript:void(0);", {:class => "remove_option icon-delete btn btn-sm btn-danger"} %>
<% end %>
<%=f.select(:captive_portal, [["Disable","0"],["External (Radius)","1"],["External (Local Auth)","3"],["Internal (Wavespot)","2"]],{},:class=>"form-control captive_portal",:data => { validation: 'required'}) %>
<%=f.select(:auth_radius_id,options_from_collection_for_select(@r_config, 'id', 'radius_name',@network_ssid.auth_radius_id),{:include_blank=>true},:class=>"form-control") %>
<%=f.select(:acc_radius_enabled, [["Enable","1"],["Disable","0"]],{},:class=>"form-control", :data => { validation: 'required'}) %>
<%=f.select(:acc_radius_id, options_from_collection_for_select(@r_acc, 'id', 'radius_name',@network_ssid.acc_radius_id),{:include_blank=>true},:class=>"form-control", :data => { validation: 'required'}) %>
<%= f.number_field :default_interim_time, min: 61,max: 86400 ,:class => 'form-control' %>(Seconds)
<%=f.select(:radius_gw_proxy, [["Enable",true],["Disable",false]],{},:class=>"form-control", :data => { validation: 'required'}) %>
<%= f.number_field :default_idle_timeout, min: 61,max: 86400 ,:class => 'form-control' %>(Seconds)
<%=f.select(:mac_auth, [["Disable","0"],["Enable","1"]],{},:class=>"form-control", :data => { validation: 'required'}) %>
<%= f.text_field :splash_url,:class=>"form-control devices", :placeholder=>"Splash URL", 'data-validation-help' =>"eg..http://www.example.com",:data => {:validation => "url_ip" , 'validation-error-msg' => "Please Specify a valid URL"}%>
<%=f.radio_button(:overwrite_success_url,"false",{checked: true}) %> The URL they were trying to fetch
<%=f.radio_button(:overwrite_success_url,"true") %> A different URL: <%= f.text_field :success_url,:class=>"form-control", :placeholder=>"URL" ,'data-validation-help' =>"eg..http://www.example.com",:data => {:validation => "url_ip" , 'validation-error-msg' => "Please Specify a valid URL" }%>
<%if @current_network.vendor_type == "4"%>
<%=f.radio_button(:uam_secret,"true", :class => "uam-scrt") %> Enable
<%=f.radio_button(:uam_secret,"false", :class => "uam-scrt") %> Disable
<%= f.password_field :uam_secret_key, :value => f.object.uam_secret_key, :class => "form-control", :placeholder => "UAM Secret Key", :data => { validation: 'required length'}, 'data-validation-length'=> "8-63", autocomplete: "new-password" %>
<%end%>
<%=f.select(:wallgarden, [["Disable","0"],["Enable","1"]],{},:class=>"form-control") %>
<%= f.text_field :walled_garden_range,:class=>"form-control devices", :placeholder=>"Domains",'data-validation-help' =>"eg..example.com",:data => {:validation => "ip_domain" , 'validation-error-msg' => "Please Specify a valid Domain or IP"}%>
<%= f.text_field :per_user_qos, :class=>"form-control slider col-sm-6", :placeholder=>"Per User QoS", "data-slider-value" => f.object.per_user_qos || '0', "data-slider-min"=>"0", "data-slider-max"=>"20480", :style=> "top:-28px" %>
<%= text_field_tag "slider_output", f.object.per_user_qos, :class => "form-control input-sm slider-output col-md-8", :disabled => true, :size => 5, :style => "font-size: 14px;" %>
 Kbps
<%= f.fields_for :roaming, @network_ssid.roaming || Roaming.new do |r|%>
<%= r.label :message_exchange, :class => "col-sm-4 control-label" %>
<%= r.select :message_exchange,[['Over the Air','air'],['Distribution Channel','ds']],{},:class => 'col-sm-5 form-control'%>
<%= r.text_field :domain_identifier, :class=>"col-sm-5 form-control"%>
<%= r.password_field :pmk_r1_key_holder, :value => r.object.pmk_r1_key_holder, :class => "form-control", :placeholder => "password" %>
<%= r.password_field :pmk_r0_key_holder, :value => r.object.pmk_r0_key_holder, :class => "form-control", :placeholder => "password" %>
<% end %>
<%= f.fields_for :hotspot20, @network_ssid.hotspot20 || Hotspot20.new do |r|%> Access Network:

<%= r.text_field :operator_name, :class=>"col-sm-5 form-control"%>
<%= r.text_field :venue_name, :class=>"col-sm-5 form-control"%>
<%= r.label :venue_operator_language_code, :class => "col-sm-4 control-label" %>
<%= r.select :venue_operator_language_code,[['eng','1'],['fr','2']],{},:class => 'col-sm-5 form-control'%>
<%= r.select :venue_type, grouped_options_for_select(grouped_collection_of_venue_types, { :selected => r.object.venue_type.try(&:to_s) }), {}, :class => 'tags-ssid', :multiple => true,:style => 'width:130px', autocomplete: "new-password" %>
<% network_types = RadioSetting::NETWORK_TYPE %> <%= r.select :network_type, options_for_select(network_types, {:selected => r.object.network_type.try(&:to_s)}), {}, :class=>"form-control channel-list" %>
<%= r.text_field :domain_list, :class=>"form-control devices", :placeholder=>"Press Enter or Tab for adding MAC ID"%>
Identity Provider:

<%=link_to " Add Nai Realms".html_safe,"javascript:void(0);", {:class => "btn btn-warning add-realm-rows pull-right"} %>

<%=label_tag :realm_name, "Realm Name*".html_safe %>
<%=label_tag :realm_format, "Realm Format*".html_safe %>
<%=label_tag :authentication, "Authentication*".html_safe %>
<%=label_tag :gpp_plmn_id, "3GPP PLMN ID*".html_safe %>
<%=r.fields_for :nai_realms, NaiRealm.new do |n|%>

<%= n.text_field :realm_name,:class=>"form-control realm_name", :placeholder=>"Realm Name"%>
<%= n.select :realm_format,['0','1'],{},{:class=>"form-control realm_format"}%>
<%= n.select :authentication, grouped_options_for_select(grouped_collection_of_authentication, { :selected => n.object.authentication.try(&:to_s) }), {}, :class => 'form-control tags-ssid authentication', :multiple => true,:style => 'width:130px', autocomplete: "new-password" %>
<%= n.text_field :gpp_plmn_id, :class=>"form-control devices gpp_plmn_id", :placeholder=>"Press Enter or Tab for adding MAC ID"%>
<%= n.hidden_field :id, :class => "nr_id" %> <%= n.hidden_field :_destroy, :class => "realm_destroy" %> <%= link_to " X ","javascript:void(0);", {:class => "pull-right icon-delete btn btn-danger"} %>
<% end %>


Roaming Consitorium:

<%= r.text_field :roaming_consortium_oi, :class=>"form-control devices", :placeholder=>"Press Enter or Tab for adding MAC ID"%>

<% end %>