<%= form_for(@seller, remote: true, :html => {:class=>"form-horizontal"}) do |f| %>
	<div class="portlet-body form">
		<div class="row col-md-12">
      <div class="alert alert-danger hidden" id="seller_errors"></div>
    </div>
		<div class="form-body">
			<div class="row">
				<!-- nombre del vendedor -->
				<div class="form-group">
					<%= f.label :name, "Nombre", {:class=>"col-md-2 col-sm-3 control-label"} do %> Nombre <span class="required">*</span>
					<% end %>
					<div class="col-md-6 col-sm-6" style="padding-left: 0px;padding-right: 0px">
						<%= f.text_field :name, {:class=>"form-control first_input"} %>
					</div>
				</div>
				<!-- apellido vendedor -->
				<div class="form-group">
					<%= f.label :last_name, "Apellidos", {:class=>"col-md-2 col-sm-3 control-label"} do %> Apellido <span class="required">*</span>
					<% end %>
					<div class="col-md-6 col-sm-6" style="padding-left: 0px;padding-right: 0px">
						<%= f.text_field :last_name, {:class=>"form-control"} %>
					</div>
				</div>
				<!-- punto de venta -->
				<div class=<%= (current_user.usertype == "A" || current_user.usertype == "SS" ? "form-group" : "form-group hidden") %>>
					<%= f.label :pointsale_id, "Punto de venta", {:class=>"col-md-2 col-sm-3 control-label"} do %> Punto de venta
					<span class="required">*</span>
					<% end %>
					<div class="input-group col-md-6 col-sm-6 select2-bootstrap-prepend">
						<%= f.collection_select :pointsale_id, @pointsales, :id, :name, {:prompt => "Seleccione", :selected => @pointsale_id.blank? ? '' : @pointsale_id.to_i}, {:class => "form-control select2"} %>
					</div>
				</div>
			</div>
		</div>
		<div class="form-actions">
			<div class="row">
				<div class="col-md-offset-2 col-md-10">
					<%= f.submit 'Guardar', {:class=>"btn green"} %>
				</div>
			</div>
		</div>
	</div>
<% end %>
<script type="text/javascript">
	$(document).ready(function() {
		App.init();
	});
</script>
