Sha256: 2199d0224e821339fbd2f7ed83b7b148ae8922d67278a34e142a9a2a64b84503

Contents?: true

Size: 1.52 KB

Versions: 92

Compression:

Stored size: 1.52 KB

Contents

<%= admin_form_for [:admin, current_resource], :html => {:multipart => true} do |f| %>
  <%= f.errors %>

  <%= f.inputs do %>
    <%= f.input :email %>
  <% end %>

  <% if current_resource.persisted? %>
  <%= link_to t('fullstack.admin.edit', :default => "Edit") + " " + t('helpers.label.password', :default => "password"), 
              "javascript:void(0);",
              :id => "edit_your_password",
              :class => "btn btn-small" %>

  <div id="password_fields" style="display:none;">
  <% else %>
  <div>
  <% end %>
    <%= f.inputs do %>
      <%= f.input :password %>
      <%= f.input :password_confirmation %>
    <% end %>
  </div>
  
  <div style="margin-bottom: 18px;">
    
  </div>

  <% if current_resource.persisted? %>
  <%= f.resource_inputs :except => %W(email password encrypted_password confirmation_token confirmed_at confirmation_sent_at unconfirmed_email remember_created_at sign_in_count current_sign_in_at last_sign_in_at current_sign_in_ip last_sign_in_ip reset_password_token reset_password_sent_at) %>  
  <% end %>
  
  
  <%= f.actions do %>
    <%= f.resource_submit %>
  <% end %>

<% end %>

<% content_for :javascripts do -%>
  <%= coffee_script_tag do %>
  
    html = $("#password_fields").find("fieldset")
    html.remove()
    $("#password_fields").show()
  
    $(document).ready ->

      $("#edit_your_password").click ->
        elems = $(html)
        elems.hide()
        $("#password_fields").empty().append(elems)
        elems.show('slow')
        $(@).remove()
      
  <% end %>
<% end %>

Version data entries

92 entries across 92 versions & 1 rubygems

Version Path
fullstack-cms-0.4.6 app/views/admin/users/_form.html.erb
fullstack-cms-0.4.5 app/views/admin/users/_form.html.erb
fullstack-cms-0.4.4 app/views/admin/users/_form.html.erb
fullstack-cms-0.3.8.fix app/views/admin/users/_form.html.erb
fullstack-cms-0.2.32.fix app/views/admin/users/_form.html.erb
fullstack-cms-0.4.3 app/views/admin/users/_form.html.erb
fullstack-cms-0.4.2 app/views/admin/users/_form.html.erb
fullstack-cms-0.4.1 app/views/admin/users/_form.html.erb
fullstack-cms-0.3.39 app/views/admin/users/_form.html.erb
fullstack-cms-0.3.38 app/views/admin/users/_form.html.erb
fullstack-cms-0.3.37 app/views/admin/users/_form.html.erb
fullstack-cms-0.3.36 app/views/admin/users/_form.html.erb
fullstack-cms-0.3.35 app/views/admin/users/_form.html.erb
fullstack-cms-0.3.34 app/views/admin/users/_form.html.erb
fullstack-cms-0.3.33 app/views/admin/users/_form.html.erb
fullstack-cms-0.3.32 app/views/admin/users/_form.html.erb
fullstack-cms-0.3.31 app/views/admin/users/_form.html.erb
fullstack-cms-0.3.30 app/views/admin/users/_form.html.erb
fullstack-cms-0.3.29 app/views/admin/users/_form.html.erb
fullstack-cms-0.3.28 app/views/admin/users/_form.html.erb