<commit_before>.row
    .col-md-3
        include includes/navigation
    .col-md-9
        include includes/breadcrumb

        .page-header
            h1 Users

        .row
            .col-md-2: h3 Basic
            .col-md-10
                form.form-horizontal(role="form", name="userForm")
                    fieldset(ng-disabled="loading")

                        //- User name
                        .form-group(ng-class="{'has-error':userForm.name.$invalid && userForm.name.$dirty}")
                            label.col-sm-3.control-label(for="name") Name
                            .col-sm-7
                                input.form-control#name(type="text", required, name="name", ng-model="user.name", ng-maxlength="50", ng-trim="true")

                        //- User email
                        .form-group(ng-class="{'has-error':userForm.email.$invalid && userForm.email.$dirty}")
                            label.col-sm-3.control-label(for="email") Email
                            .col-sm-7
                                input.form-control#email(type="email", required, name="email", ng-model="user.email", ng-maxlength="50", ng-trim="true")

                        //- User website
                        .form-group
                            label.col-sm-3.control-label(for="website") Website
                            .col-sm-7
                                input.form-control#website(type="text", name="website", ng-model="user.website", ng-trim="true", ng-maxlength="100")

                        // User location
                        .form-group
                            label.col-sm-3.control-label(for="location") Location
                            .col-sm-7
                                input.form-control#location(type="text", name="location", ng-model="user.location", ng-trim="true", ng-maxlength="100")

                        // User image
                        .form-group
                            label.col-sm-3.control-label(for="image") Image
                            .col-sm-7
                                input.form-control#image(type="text", name="image", ng-model="user.image", ng-trim="true")

                        // User image preview
                        .form-group(ng-if="user.image")
                            label.col-sm-3.control-label(for="image") Image Preview
                            .col-sm-7
                                img.img-thumbnail(ng-src="{{user.image}}", alt="user image preview")

                        //- User bio
                        .form-group(ng-class="{'has-error':userForm.bio.$invalid}")
                            label.col-sm-3.control-label(for="bio") Bio
                            .col-sm-7
                                textarea.form-control#bio(type="text", name="bio", ng-model="user.bio", rows="4", ng-maxlength="200", ng-trim="true")
                                p.help-block.pull-right(ng-show="userForm.bio.$valid" ng-pluralize, count="user.bio.length || 0",
                                when="{'0':'No characters', 'one': 'just one character', 'other':'{} characters'}")
                                p.help-block(ng-show="userForm.bio.$error.maxlength")
                                    i.fa.fa-exclamation-triangle
                                    | User bio should not be longer than 200 characters

                        //- Update form buttons
                        .form-group
                            .col-sm-7.col-sm-offset-3
                                button.btn.btn-primary(ng-click="saveUser()", ng-disabled="userForm.$invalid") Save
                                button.btn.btn-default(ng-click="resetUser()") Reset

        hr

        .row
            .col-md-2: h3 Password
            .col-md-10
                form.form-horizontal(name="passForm")

                    //- Current / old password
                    .form-group(ng-class="{'has-error':passForm.current.$invalid && passForm.current.$dirty}")
                        label.col-sm-3.control-label(for="current") Current Password
                        .col-sm-7
                            input.form-control#current(type="password", name="current", ng-model="passwd.current", ng-maxlength="100", ng-required="passReq")

                    //- New password
                    .form-group(ng-class="{'has-error':passForm.new.$invalid && passForm.new.$dirty,'has-success':passForm.new.$valid && passForm.new.$dirty}")
                        label.col-sm-3.control-label(for="new") New Password
                        .col-sm-7
                            input.form-control#new(type="password", name="new", ng-model="passwd.new", ng-maxlength="100", ng-minlength="6", ng-required="passReq")
                            p.help-block(ng-show="passForm.new.$invalid && passForm.new.$dirty")
                                i.fa.fa-exclamation-triangle
                                span(ng-show="passForm.new.$error.minlength")  New password must be at least 6 characters long
                                span(ng-show="passForm.new.$error.required && passForm.new.$dirty")  New password must not be empty

                    //- Password verification
                    .form-group(ng-class="{'has-error':passForm.verify.$invalid && passForm.verify.$dirty,'has-success':passForm.verify.$valid && passForm.verify.$dirty}")
                        label.col-sm-3.control-label(for="verify") Confirm Password
                        .col-sm-7(ng-class="{'has-error':passForm.verify.$invalid && passForm.verify.$dirty}")
                            input.form-control#verify(type="password", name="verify", ng-model="passwd.verify", ng-maxlength="100", ng-required="passReq")
                            p.help-block
                                i.fa.fa-exclamation-triangle(ng-show="passForm.verify.$invalid && passForm.verify.$dirty")
                                span(ng-show="passForm.verify.$error.match")  The new password and confirm password do not match

                    //- Form buttons
                    .form-group
                        .col-sm-7.col-sm-offset-3
                            button.btn.btn-primary(ng-click="savePasswd()", ng-disabled="passForm.$invalid") Update Password
                            button.btn.btn-default(ng-click="resetPasswd()") Reset

        .row
            hr<commit_msg>Error messages appear on the right instead of below fields<commit_after>.row
    .col-md-3
        include includes/navigation
    .col-md-9
        include includes/breadcrumb

        .page-header
            h1 Users

        .row
            .col-md-2: h3 Basic
            .col-md-10
                form.form-horizontal(role="form", name="userForm")
                    fieldset(ng-disabled="loading")

                        //- User name
                        .form-group(ng-class="{'has-error':userForm.name.$invalid && userForm.name.$dirty}")
                            label.col-sm-2.control-label(for="name") Name
                            .col-sm-6
                                input.form-control#name(type="text", required, name="name", ng-model="user.name", ng-maxlength="50", ng-trim="true")
                            .col-sm-4.text-danger(ng-show="userForm.name.$invalid")
                                i.fa.fa-fw.fa-exclamation-triangle
                                | Name is required

                        //- User email
                        .form-group(ng-class="{'has-error':userForm.email.$invalid && userForm.email.$dirty}")
                            label.col-sm-2.control-label(for="email") Email
                            .col-sm-6
                                input.form-control#email(type="email", required, name="email", ng-model="user.email", ng-maxlength="50", ng-trim="true")
                            .col-sm-4.text-danger(ng-show="userForm.email.$invalid")
                                i.fa.fa-fw.fa-exclamation-triangle
                                | Email address is required

                        //- User website
                        .form-group
                            label.col-sm-2.control-label(for="website") Website
                            .col-sm-6
                                input.form-control#website(type="text", name="website", ng-model="user.website", ng-trim="true", ng-maxlength="100")

                        // User location
                        .form-group
                            label.col-sm-2.control-label(for="location") Location
                            .col-sm-6
                                input.form-control#location(type="text", name="location", ng-model="user.location", ng-trim="true", ng-maxlength="100")

                        // User image
                        .form-group
                            label.col-sm-2.control-label(for="image") Image
                            .col-sm-6
                                input.form-control#image(type="text", name="image", ng-model="user.image", ng-trim="true")

                        // User image preview
                        .form-group(ng-if="user.image")
                            label.col-sm-2.control-label(for="image") Image Preview
                            .col-sm-6
                                img.img-thumbnail(ng-src="{{user.image}}", alt="user image preview")

                        //- User bio
                        .form-group(ng-class="{'has-error':userForm.bio.$invalid}")
                            label.col-sm-2.control-label(for="bio") Bio
                            .col-sm-6
                                textarea.form-control#bio(type="text", name="bio", ng-model="user.bio", rows="4", ng-maxlength="200", ng-trim="true")
                                p.help-block.pull-right(ng-show="userForm.bio.$valid" ng-pluralize, count="user.bio.length || 0",
                                when="{'0':'No characters', 'one': 'just one character', 'other':'{} characters'}")
                                p.help-block(ng-show="userForm.bio.$error.maxlength")
                                    i.fa.fa-exclamation-triangle
                                    | User bio should not be longer than 200 characters

                        //- Update form buttons
                        .form-group
                            .col-sm-6.col-sm-offset-3
                                button.btn.btn-primary(ng-click="saveUser()", ng-disabled="userForm.$invalid") Save
                                button.btn.btn-default(ng-click="resetUser()") Reset

        hr

        .row
            .col-md-2: h3 Password
            .col-md-10
                form.form-horizontal(name="passForm")

                    //- Current / old password
                    .form-group(ng-class="{'has-error':passForm.current.$invalid && passForm.current.$dirty}")
                        label.col-sm-2.control-label(for="current") Current Password
                        .col-sm-6
                            input.form-control#current(type="password", name="current", ng-model="passwd.current", ng-maxlength="100", ng-required="passReq")
                        .col-sm-4.text-danger(ng-show="passForm.current.$invalid && passForm.current.$dirty")
                            i.fa.fa-fw.fa-exclamation-triangle
                            | Current password is required

                    //- New password
                    .form-group(ng-class="{'has-error':passForm.new.$invalid && passForm.new.$dirty,'has-success':passForm.new.$valid && passForm.new.$dirty}")
                        label.col-sm-2.control-label(for="new") New Password
                        .col-sm-6
                            input.form-control#new(type="password", name="new", ng-model="passwd.new", ng-maxlength="100", ng-minlength="6", ng-required="passReq")
                        .col-sm-4.text-danger(ng-show="passForm.new.$invalid && passForm.new.$dirty")
                            i.fa.fa-fw.fa-exclamation-triangle
                            span(ng-show="passForm.new.$error.minlength") New password must be at least 6 characters long
                            span(ng-show="passForm.new.$error.required && passForm.new.$dirty") New password must not be empty

                    //- Password verification
                    .form-group(ng-class="{'has-error':passForm.verify.$invalid && passForm.verify.$dirty,'has-success':passForm.verify.$valid && passForm.verify.$dirty}")
                        label.col-sm-2.control-label(for="verify") Confirm Password
                        .col-sm-6
                            input.form-control#verify(type="password", name="verify", ng-model="passwd.verify", ng-maxlength="100", ng-required="passReq")
                        .col-sm-4.text-danger(ng-show="passForm.verify.$invalid && passForm.verify.$dirty")
                            i.fa.fa-fw.fa-exclamation-triangle
                            | The new password and confirm password do not match

                    //- Form buttons
                    .form-group
                        .col-sm-6.col-sm-offset-2
                            button.btn.btn-primary(ng-click="savePasswd()", ng-disabled="passForm.$invalid") Update Password
                            button.btn.btn-default(ng-click="resetPasswd()") Reset
{'fraction_non_alphanumeric': 0.1378226711560045, 'fraction_numerical': 0.010101010101010102, 'mean_word_length': 1.2906598114824337, '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': 9, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1549127', 'n_tokens_mistral': 3579, 'n_tokens_neox': 3359, 'n_words': 482}