= simple_form_for [:admin, @user] do |f|
  - if @user.errors.any?
    #error_explanation
      %h2
        = pluralize(@user.errors.count, "error")
        prohibited this user from being saved:
      %ul
        - @user.errors.full_messages.each do |msg|
          %li= msg

  = f.input :email
  .field
  - if current_user.is_super_user?
    = f.input :is_admin
  .field
  - if current_user.is_super_user?
    = f.input :is_super_user
  = f.button :submit, :class => 'btn btn-primary', :value => 'Save'

= simple_form_for [:admin, @user] do |f|
  - if @user.errors.any?
    #error_explanation
      %h2
        = pluralize(@user.errors.count, "error")
        prohibited this user from being saved:
      %ul
        - @user.errors.full_messages.each do |msg|
          %li= msg

  = f.input :email
  .field
  - if current_user.is_super_user?
    = f.input :is_admin
  .field
  - if current_user.is_super_user? && current_user != @user
    = f.input :is_super_user
  = f.button :submit, :class => 'btn btn-primary', :value => 'Save'

Fix for bug: SuperUser should not be able to untick themselves as a SuperUser
Fix for bug: SuperUser should not be able to untick themselves as a SuperUser
