<%= form_for snmp_config , as: :snmp_config,method: (snmp_config.id.blank? ? "post" : "put"), html: { class: "form-horizontal" , role: "form"} do |f| %>

SNMP Configuration

<%= label_tag :invenotry,"AP / Network / AP Tags", :class=>"col-sm-2 control-label" %>
<%= f.select :associated_resources, grouped_options_for_select(grouped_collection_of_ap_and_networks_and_tags, { selected: @snmp_config.associated_resources}), {}, :multiple => true, :class=>"form-control associated-resource", :placeholder=>"Type to select APs / AP Tags / Network", :data => { validation: 'required'} %>
<%=f.label :ro_community, "RO Community*".html_safe, :class=>"col-sm-4 control-label"%>
<%= f.text_field :ro_community,:class=>"form-control", :placeholder=>"RO Community", :data => {validation: 'required'}%>
<%=f.label :rw_community, "RW Community*".html_safe, :class=>"col-sm-4 control-label"%>
<%= f.text_field :rw_community,:class=>"form-control", :placeholder=>"RW Community", :data => {validation: 'required'}%>
<%=f.label :server_ip, "Server IP*".html_safe, :class=>"col-sm-4 control-label"%>
<%= f.text_field :server_ip,:class=>"form-control ip-mask", :placeholder=>"Server IP", :data => {validation: 'required ip'}%>
<%=f.label :server_port, "Server Port*".html_safe, :class=>"col-sm-4 control-label"%>
<%= f.text_field :server_port,:class=>"form-control number-mask", :placeholder=>"Server Port", :data => {validation: 'required port number'}%>
<%=f.label :server_community, "Server Community*".html_safe, :class=>"col-sm-4 control-label"%>
<%= f.text_field :server_community,:class=>"form-control", :placeholder=>"Server Community", :data => {validation: 'required'}%>
<%=f.submit (f.object.new_record? ? "Create SNMP Configuration" : 'Update SNMP Configuration'),:class=>"btn btn-success create_network"%> <%= link_to "Cancel", snmp_configs_path, :class => "btn btn-primary" %>
<% end %>