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

Integration Type

<%=f.label :vendor_name, "Vendor Name", :class=>"col-sm-4 control-label"%>
<%= f.select :vendor_name,options_for_select(IntegrationType::VENDOR_NAME.map{|n,v| [v,n]}),{},:class=>"form-control logging_type",:data => { validation: 'required'} %>
<% int = integration_type.try(:details) || {}%>
<%=f.label :username, "Username", :class=>"col-sm-4 control-label"%>
<%= text_field_tag 'username' ,int['username'],:class => 'form-control sms-custom-user ',:data => {validation: 'required special-character'}%>
<%=f.label :password, "Password", :class=>"col-sm-4 control-label"%>
<%= text_field_tag 'password',int['password'],:class => 'form-control custom-email-hide' ,:type => "password", :data => {validation: 'required'}%>
<%=f.label :sz_host, "SZ Host", :class=>"col-sm-4 control-label"%>
<%= text_field_tag :sz_host,int['sz_host'],:class=>"form-control devices", :placeholder=>"SZ Host", 'data-validation-help' =>"eg..http://www.example.com",:data => {:validation => "url_ip" , 'validation-error-msg' => "Please Specify a valid URL"}%>
<% if false %>
<%= button_to 'Featch Zones'%>
<% end %>
<% if @zones.present? %>
<%=f.label :zone, "Zones *".html_safe, :class=>"col-sm-4 control-label"%>
<%= select_tag("zone", grouped_options_for_select(@zones, {:selected => ()} ),:multiple => true, :class=>"form-control zone-list", :placeholder => "Type to add Zone") %>
<% end %>
<%= f.submit integration_type.new_record? ? "Create" : "Update", :class => "btn btn-success" %> <%= link_to "Cancel", integration_types_path, :class => "btn btn-primary" %>
<% end %>