<div class="row">
  <div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
    <div class="card">
      <div class="body">
        <%= simple_form_for([:settings,@employee]) do |f| %>
        <%= f.error_notification %>

        <div class="form-inputs p-l-15">
          <%= f.input :name %>
          <%= f.input :is_active,:input_html=>{:class=>"col-md-9"} %>
          <% if current_user.role == "administrator" %>
            <%= f.input :role, :collection => Lookup.collection_of("employee_roles"),:class=>'form-group' %>
          <% else %>
            <%= f.input :role, :collection => Lookup.collection_of("employee_roles").select{|r| r[1] != "administrator"},:class=>'form-group' %>
          <% end %>
          <%= f.input :emp_id,  :label => "Employee Numberic ID (*Unique)" %>
          <%= f.input :password %>

        </div>
        <div class="form-inputs p-l-15">
          <label>Employee Image</label>
          <div class="panel padding-10">
            <div class="form-group">
              <div class="menu-item-img">
                <% if f.object.image_path? %>
                  <p><%= f.object.name %></p>
                     <%= image_tag f.object.image_path.url, :class => "img-thumbnail" %>
                <% else %>                
                  <%= image_tag "/image/menu_images/default.png", :class => "img-thumbnail" %>
                <% end %>          
              </div>
              <%= f.file_field :image_path, :class => "img-thumbnail" %>
            </div>
          </div>
        </div>   

        <div class="form-actions p-l-15">
           <%= f.submit t('views.btn.submit'),:class => 'btn btn-primary btn-lg waves-effect' %>
        </div>
        <% end %>
      </div>
    </div>
  </div>
 <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
    <div class="card">
      <div class="body">
          <h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
          <p>
          1) <%= t("views.right_panel.detail.name") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.employee_txt") %> <%= t("views.right_panel.detail.name_txt2") %> <br>
          2) <%= t("views.right_panel.detail.role") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.role_txt") %> <br>
          3) <%= t("views.right_panel.detail.employee_numeric_id") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.employee_numeric_id_txt") %> <br>
          4) <%= t("views.right_panel.detail.password") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.password_txt") %> <br>
          </p>
          <h5><i class="material-icons md-18">list <%= t("views.right_panel.header.button_lists") %></i> </h5>
          <p>
          1) <%= t("views.right_panel.button.submit") %> - <%= t("views.right_panel.detail.submit_btn_txt") %> <%= t("views.right_panel.detail.employee_txt") %> <br>
          </p>
          <h5><i class="material-icons md-18">list <%= t("views.right_panel.header.link_lists") %></i> </h5>
          <p>
            1) <%= t("views.right_panel.button.home") %> - <%= t("views.right_panel.detail.home_txt") %> <br>
            2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.employee_txt") %> <br>
          </p>
      </div>
    </div>  
  </div>
</div>

<script type="text/javascript">
  $(document).on('turbolinks:load', function() {
    $('body').bootstrapMaterialDesign();
  });
</script>
