form_for @password do |f|

%p
  %div.title
    %span.title Password Pusher
    %br
    %span.tagline Go Ahead.  Email Another Password.
%p.payload
  = f.text_field(:payload, { :class => "password", :value => PAYLOAD_INITIAL_TEXT, :onfocus => "prepareTextField(this)", :onblur => "revertTextField(this)", :autocomplete => "off" })
%p
  Delete password after:
  %p.slider_box
    = range_field_tag("password_expire_after_days", EXPIRE_AFTER_DAYS_DEFAULT, {:name => "password[expire_after_days]", :class => "slider", :min => EXPIRE_AFTER_DAYS_MIN, :max => EXPIRE_AFTER_DAYS_MAX, :step => "1", :onchange => "showDaysValue(this.value)"})
    %span#daysrange
      == #{EXPIRE_AFTER_DAYS_DEFAULT} Days
  %p.slider_box
    = range_field_tag("password_expire_after_views", EXPIRE_AFTER_VIEWS_DEFAULT, {:name => "password[expire_after_views]", :class => "slider", :min => EXPIRE_AFTER_VIEWS_MIN, :max => EXPIRE_AFTER_VIEWS_MAX, :step => "1", :onchange => "showViewsValue(this.value)"})
    %span#viewsrange
      == #{EXPIRE_AFTER_VIEWS_DEFAULT} Views
  %br
    %span.note
      (whichever comes first)
  - if DELETABLE_BY_VIEWER_PASSWORDS
    %p.notes
      = check_box_tag "password[deletable_by_viewer]", nil, DELETABLE_BY_VIEWER_DEFAULT
      Allow viewers to optionally delete password before expiration

%p
  = f.submit(:value => "Push it!")

%p.notes

%p
  %span
    #cookie-save.cookie-save
      %a{ :onclick => "saveExpirations()", :href => "#" } Save
      these settings as
      %i default
      in a browser cookie.
%span.tip
  * Tip: Only enter the password into the box.  Other identifying information can compromise security.
%p
%span.note
  All passwords are encrypted prior to storage and are available to only those with the direct link.
%br/
%span.note
  Once expired, encrypted passwords are unequivocally deleted from the database.

%p.notes

New
= link_to "workflow",  "http://www.packal.org/workflow/passwordpusher"
for Alfred users.  Thanks to
= link_to "@psteinweber", "https://github.com/pglombardo/PasswordPusher/issues/29"
for the idea.