<commit_before>extends ../layouts/default
block title
  title Profile
block link
  - var selected = 'Profile'
block content
  .col-md-4
  .col-md-4
    h2.text-center Edit profile
    form.form-horizontal(role='form' method='post' action="/users/#{user.id}")
      input(type='hidden', name='_csrf', value=csrfToken)
      input(type='hidden' name='_method' value='patch')
      .form-group
        label.col-sm-4.control-label(for='inputEmail') Email
        .col-sm-8
          input#inputEmail.form-control(name='email' type='email' placeholder='Email' value=user.email required autofocus maxlength='100' title='Maximal length is 100 chars')
      .form-group
        label.col-sm-4.control-label(for='inputPassword') Password
        .col-sm-8
          input#inputPassword.form-control(name='password' type='password' placeholder='Password' pattern='.{6,}' title='Minimal length is 6 chars')

      .form-group
        label.col-sm-4.control-label(for='inputFirstName') First name
        .col-sm-8
          input#inputFirstName.form-control(name='firstName' type='text' placeholder='<NAME>' value=user.firstName required maxlength='100' pattern='.{3,100}' title='Length should be from 3 to 100 chars')
      .form-group
        label.col-sm-4.control-label(for='inputLastName') Last name
        .col-sm-8
          input#inputLastName.form-control(name='lastName' type='text' placeholder='<NAME>' value=user.lastName required maxlength='100' pattern='.{3,100}' title='Length should be from 3 to 100 chars')
      .form-group
        label.col-sm-4.control-label(for='inputCity') City
        .col-sm-8
          select.form-control.basic-select2(name='city')
            option
            for city in cities
              - var isSelected = (city.id == user.city)
              option(value=city.id selected=isSelected)=city.name
      .form-group.text-center
        button.btn.btn-success(type='submit') Save<commit_msg>Add modal with confirmation for account removing<commit_after>extends ../layouts/default
block title
  title Profile
block link
  - var selected = 'Profile'
block content
  .col-md-4
  .col-md-4
    h2.text-center Edit profile
    form.form-horizontal(role='form' method='post' action="/users/#{user.id}")
      input(type='hidden', name='_csrf', value=csrfToken)
      input(type='hidden' name='_method' value='patch')
      .form-group
        label.col-sm-4.control-label(for='inputEmail') Email
        .col-sm-8
          input#inputEmail.form-control(name='email' type='email' placeholder='Email' value=user.email required autofocus maxlength='100' title='Maximal length is 100 chars')
      .form-group
        label.col-sm-4.control-label(for='inputPassword') Password
        .col-sm-8
          input#inputPassword.form-control(name='password' type='password' placeholder='Password' pattern='.{6,}' title='Minimal length is 6 chars')

      .form-group
        label.col-sm-4.control-label(for='inputFirstName') First name
        .col-sm-8
          input#inputFirstName.form-control(name='firstName' type='text' placeholder='<NAME>' value=user.firstName required maxlength='100' pattern='.{3,100}' title='Length should be from 3 to 100 chars')
      .form-group
        label.col-sm-4.control-label(for='inputLastName') Last name
        .col-sm-8
          input#inputLastName.form-control(name='lastName' type='text' placeholder='<NAME>' value=user.lastName required maxlength='100' pattern='.{3,100}' title='Length should be from 3 to 100 chars')
      .form-group
        label.col-sm-4.control-label(for='inputCity') City
        .col-sm-8
          select.form-control.basic-select2(name='city')
            option
            for city in cities
              - var isSelected = (city.id == user.city)
              option(value=city.id selected=isSelected)=city.name
      .text-center
        .form-group
          button.btn.btn-success(type='submit') Save
        .form.group
          button.btn.btn-danger(type='button', data-toggle='modal', data-target='#removeModal') Remove my account

    #removeModal.modal.fade(tabindex='-1', role='dialog', aria-labelledby='removeModalLabel', aria-hidden='true')
      .modal-dialog
        .modal-content
          .modal-header
            button.close(type='button', data-dismiss='modal', aria-label='Close')
              span(aria-hidden='true') ×
            h4#removeModalLabel.modal-title Removing account
          .modal-body Do you want remove your account?
          .modal-footer
            form(role='form' method='post' action="/users/#{user.id}")
              input(type='hidden', name='_csrf', value=csrfToken)
              input(type='hidden' name='_method' value='delete')
              button.btn.btn-default(type='button', data-dismiss='modal') Cancel
              button.btn.btn-danger(type='submit') Remove
{'fraction_non_alphanumeric': 0.1447804473902237, 'fraction_numerical': 0.018641259320629662, 'mean_word_length': 2.967953985209532, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '5798716', 'n_tokens_mistral': 1490, 'n_tokens_neox': 1427, 'n_words': 280}