Sha256: 8018eaf1f54a8ad9b6463cd97f86d6acb47cc40873afb194b2e434dc7e9b85e9

Contents?: true

Size: 1.66 KB

Versions: 24

Compression:

Stored size: 1.66 KB

Contents

- content_for :scripts do
  :javascript
    $(function() {
      $('.preview').click(function(e) {
        for ( instance in CKEDITOR.instances )
          CKEDITOR.instances[instance].updateElement();
        var vals = $('form').serialize();
        window.open('/posts/preview?' + vals);
        e.preventDefault();
      })
    })

= error_messages_for :user

= form_for [:forge, @user] do |f|
  #form-header= title_row(:title => "Email", :explanation => "The user's email") { f.text_field :email, :class => 'title' }

  .inner-form.with-normal-sidebar
    .column.side
      - if current_user.is_admin? || current_user.is_super_admin?
        %h3 Roles
        .explanation Roles define a user's abilities throughout the site.
        - @roles.each do |role|
          - unless (role.title == "Super Admin" && !current_user.is_super_admin?) || (role.title == "Admin" && !current_user.is_admin?)
            %label
              .float-left= check_box_tag('role_ids[]', role.id, @user.role_ids.include?(role.id))
              .float-right{:style => "width: 130px"}= role.title
              .spacer
        %hr

      %h3 Avatar
      .explanation Upload a picture for this user.
      = file_select_widget(f, :avatar)
    .column.main.last
      %h3 New Password
      .explanation Leave blank unless you want to change the user's password.
      = f.password_field :password
      %hr

      %h3 New Password Confirmation
      .explanation Leave blank unless you want to change the user's password.
      = f.password_field :password_confirmation

    .spacer

  #item-list-bottom
    .float-right
      Everything look good?
      = button_link "Save", "javascript:;", :class => "submit button"

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
forge-cli-0.1.10 lib/forge/app/views/forge/users/_form.html.haml
forge-cli-0.1.9 lib/forge/app/views/forge/users/_form.html.haml
forge-cli-0.1.8 lib/forge/app/views/forge/users/_form.html.haml
forge-cli-0.1.7 lib/forge/app/views/forge/users/_form.html.haml
forge-cli-0.1.6 lib/forge/app/views/forge/users/_form.html.haml
forge-cli-0.1.5 lib/forge/app/views/forge/users/_form.html.haml
forge-cli-0.1.4 lib/forge/app/views/forge/users/_form.html.haml
forge-cli-0.1.3 lib/forge/app/views/forge/users/_form.html.haml
forge-cli-0.1.2 lib/forge/app/views/forge/users/_form.html.haml
forge-cli-0.1.1 lib/forge/app/views/forge/users/_form.html.haml
forge-cli-0.1.0 lib/forge/app/views/forge/users/_form.html.haml
forge-cli-0.0.18 lib/forge/app/views/forge/users/_form.html.haml
forge-cli-0.0.17 lib/forge/app/views/forge/users/_form.html.haml
forge-cli-0.0.16 lib/forge/app/views/forge/users/_form.html.haml
forge-cli-0.0.15 lib/forge/app/views/forge/users/_form.html.haml
forge-cli-0.0.14 lib/forge/app/views/forge/users/_form.html.haml
forge-cli-0.0.13 lib/forge/app/views/forge/users/_form.html.haml
forge-cli-0.0.12 lib/forge/app/views/forge/users/_form.html.haml
forge-cli-0.0.11 lib/forge/app/views/forge/users/_form.html.haml
forge-cli-0.0.10 lib/forge/app/views/forge/users/_form.html.haml