<%= form_for @author, url: @url, html: { multipart: true } do |f| %> <% if @author.errors.any? %>

<%= @author.errors.full_messages.to_sentence %>

<%= link_to '#', class: 'alert--trigger' do %> <%= embedded_svg 'fuel/icons/alert-icon.svg', class: 'alert--close-icon' %> <% end %>
<% end %>
<%= f.label :first_name %> <%= f.text_field :first_name %>
<%= f.label :last_name %> <%= f.text_field :last_name %>
<%= f.label :title %> <%= f.text_field :title %>
<%= f.label :start_date %> <%= f.text_field :start_date, data: { value: @author.start_date.try(:strftime, "%m/%d/%Y") }, class: 'datepicker' %>
<%= f.label :bio, 'Author Bio' %> <%= f.text_area :bio %>
<%= f.label :email %> <%= f.email_field :email, placeholder: "ryan@example.com" %>
<%= f.label :twitter %> <%= f.text_field :twitter, placeholder: "ryan_p_francis" %>
<%= f.label :github %> <%= f.text_field :github, placeholder: "francirp" %>
<%= f.label :dribbble %> <%= f.text_field :dribbble, placeholder: "ryan_p_francis" %>
<%= f.submit class: 'button button--secondary' %> <% if @author.id %> <%= link_to 'Delete Author', fuel.admin_author_path(@author), method: :delete, data: { confirm: "Are you sure you want to delete #{@author.full_name}?" }, class: "delete-post button button--danger" %> <% end %>
<%= f.label :avatar, 'Updated Author Picture' %>
<%= image_tag @author.avatar.url || 'fuel/default-img.jpg' %>
<%= f.file_field :avatar %>
<% end %>