<commit_before>%h1= resource.email
%hr

= simple_form_for resource, url: resource_path, method: :put do |f|
  .row-fluid
    .span6
      .well
        %fieldset
          %legend Account Information
          %p.text-right
            Your account was created #{time_ago_in_words resource.created_at} ago.
          = f.input :username
          = f.association :domain
          = f.input :name

    .span6
      .well
        %fieldset
          %legend Change Password
          = f.input :password, hint: 'Leave blank, if you do not want to change it.'
          = f.input :password_confirmation, label: false

  - if current_mailbox.admin?
    .row-fluid
      .span6
        .well
          %fieldset
            %legend Quota
            = f.input :quota, hint: 'in Bytes'

  .form-actions
    %button{type: 'submit', class: 'btn btn-primary'}
      %i{class: 'icon-ok icon-white'}
      Update Mailbox
    %button{type: 'reset', class: 'btn btn-danger'}
      %i{class: 'icon-remove icon-white'}
      Reset Form

%h2 Aliases

.well
  %p
    There are
    = resource.aliases.count
    aliases pointing to your E-Mail address:

  %p
    = resource.aliases.map(&:email).join(', ')

%h2 Unhappy?

.well
  %p You can cancel your account here. It will not be recoverable.
  = link_to mailbox_path, class: 'btn btn-danger', method: :delete, confirm: 'Your account will not be recoverable, are you really sure? You were warned.' do
    = content_tag :i, nil, class: 'icon-thumbs-down icon-white'
    Delete Account<commit_msg>Only show aliases for user if there are any.<commit_after>%h1= resource.email
%hr

= simple_form_for resource, url: resource_path, method: :put do |f|
  .row-fluid
    .span6
      .well
        %fieldset
          %legend Account Information
          %p.text-right
            Your account was created #{time_ago_in_words resource.created_at} ago.
          = f.input :username
          = f.association :domain
          = f.input :name

    .span6
      .well
        %fieldset
          %legend Change Password
          = f.input :password, hint: 'Leave blank, if you do not want to change it.'
          = f.input :password_confirmation, label: false

  - if current_mailbox.admin?
    .row-fluid
      .span6
        .well
          %fieldset
            %legend Quota
            = f.input :quota, hint: 'in Bytes'

  .form-actions
    %button{type: 'submit', class: 'btn btn-primary'}
      %i{class: 'icon-ok icon-white'}
      Update Mailbox
    %button{type: 'reset', class: 'btn btn-danger'}
      %i{class: 'icon-remove icon-white'}
      Reset Form

- if (aliases = resource.aliases).any?
  %h2 Aliases

  .well
    %p
      There are
      = aliases.count
      aliases pointing to your E-Mail address:

    %p
      = aliases.map(&:email).join(', ')

%h2 Unhappy?

.well
  %p You can cancel your account here. It will not be recoverable.
  = link_to mailbox_path, class: 'btn btn-danger', method: :delete, confirm: 'Your account will not be recoverable, are you really sure? You were warned.' do
    = content_tag :i, nil, class: 'icon-thumbs-down icon-white'
    Delete Account
{'fraction_non_alphanumeric': 0.10819462227912932, 'fraction_numerical': 0.0038412291933418692, 'mean_word_length': 2.2349896480331264, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1864006', 'n_tokens_mistral': 1008, 'n_tokens_neox': 982, 'n_words': 308}