<commit_before>extends base
block vars
  - var title = 'Create an Account'
  - var description = 'Create a new account.'
  - var bodytag = 'register'

block body
  .container.custom-container
    .va-wrapper
      .view.registration-view.container
        .box.row
          .col-sm-12
            .header
              span Create Account

            if error
              .alert.alert-danger
                p #{error}

            if formErrors
              .alert.alert-danger
                each error in formErrors
                  p #{error.error}

            form.registration-form.form-horizontal.sp-form(method='post', role='form')
              if app.get('stormpathEnableUsername')
                .form-group.group-username(form-group='true')
                  label.col-sm-4 Username
                  .col-sm-8
                    - var value = form.data ? form.data.username : '';
                    input.form-control(placeholder='Username', name='username', value=value, required=app.get('stormpathRequireUsername') ? true : false, type='text')

              if app.get('stormpathEnableGivenName')
                .form-group.group-first-name(form-group='true')
                  label.col-sm-4 First Name
                  .col-sm-8
                    - var value = form.data ? form.data.givenName : '';
                    input.form-control(placeholder='<NAME>', name='givenName', value=value, required=app.get('stormpathRequireGivenName') ? true : false, type='text')

              if app.get('stormpathEnableMiddleName')
                .form-group.group-middle-name(form-group='true')
                  label.col-sm-4 Middle Name
                  .col-sm-8
                    - var value = form.data ? form.data.middleName : '';
                    input.form-control(placeholder='Middle Name', name='middleName', value=value, required=app.get('stormpathRequireMiddleName') ? true : false, type='text')

              if app.get('stormpathEnableSurname')
                .form-group.group-last-name(form-group='true')
                  label.col-sm-4 Last Name
                  .col-sm-8
                    - var value = form.data ? form.data.surname : '';
                    input.form-control(placeholder='<NAME>', name='surname', value=value, required=app.get('stormpathRequireSurname') ? true : false, type='text')

              .form-group.group-email(form-group='true')
                label.col-sm-4 Email
                .col-sm-8
                  - var value = form.data ? form.data.email : '';
                  input.form-control(placeholder='Email', name='email', value=value, required='true', type='text')

              .form-group.group-password(form-group='true')
                label.col-sm-4 Password
                .col-sm-8
                  input.form-control(placeholder='Password', name='password', required='true', type='password')

              if app.get('stormpathEnableConfirmPassword')
                .form-group.group-confirm-password(form-group='true')
                  label.col-sm-4 Confirm Password
                  .col-sm-8
                    input.form-control(placeholder='Confirm Password', name='confirmPassword', required='true', type='password')

              button.btn.btn-register.btn-sp-green(type='submit') Create Account

        a.to-login(href=config.web.login.uri) Back to Log In<commit_msg>Cleaning up the registration template.<commit_after>extends base
block vars
  - var title = 'Create an Account'
  - var description = 'Create a new account.'
  - var bodytag = 'register'
  - var registrationFields = config.web.register.fields
  - var fieldOrder = config.web.register.fieldOrder
  - var orderedFields = []

block body
  .container.custom-container
    .va-wrapper
      .view.registration-view.container
        .box.row
          .col-sm-12
            .header
              span Create Account

            if error
              .alert.alert-danger
                p #{error}

            if formErrors
              .alert.alert-danger
                each error in formErrors
                  p #{error.error}

            form.registration-form.form-horizontal.sp-form(method='post', role='form')
              each fieldName in fieldOrder
                each fieldObject, key in registrationFields
                  if fieldObject.required === true && fieldObject.name === fieldName
                    - orderedFields.push(fieldObject)

              each field in orderedFields
                div(form-group='true', class='form-group group-#{field.name}')
                  label.col-sm-4 #{field.placeholder}
                  .col-sm-8
                    - var value = form.data ? form.data[field.name] : '';
                    input.form-control(placeholder=field.placeholder, name=form.name, value=value, required=field.required, type=field.type)

              button.btn.btn-register.btn-sp-green(type='submit') Create Account

        a.to-login(href=config.web.login.uri) Back to Log In
{'fraction_non_alphanumeric': 0.11944167497507478, 'fraction_numerical': 0.003988035892323031, 'mean_word_length': 1.766685052399338, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5489027', 'n_tokens_mistral': 1365, 'n_tokens_neox': 1281, 'n_words': 256}