<commit_before><div desktop-panel>
    <div ng-if="editingSelf" class="row">
        <div class="medium-10 columns">
    	   <h1>Account Settings</h1>
    	   <h2 class="subheader">Create / update your <a ui-sref="home"><span class="ru_green">Isaac</span></a> account</h2>
        </div>
        <div class="medium-6 end columns text-right">
            <h2 class="ru-welcome logout-link">
                <a ui-sref="logout">Log out &raquo;</a>
            </h2>
        </div>
    </div>
    <div ng-if="!editingSelf" class="row">
        <div class="medium-10 columns">
           <h1>Manage a user's account</h1>
           <h2 class="subheader">Editing another user's <a ui-sref="home"><span class="ru_green">Isaac</span></a> account</h2>
        </div>
    </div>    
</div>
<div class="row account-settings-wrap">
    <div ng-if="editingSelf" class="show-for-small-only small-16 columns">
        <h1>Account settings</h1>
        <h2 class='subheader'>Set up your Isaac account, or <a ui-sref="logout">Log out &raquo;</a></h2>
    </div>
    <div ng-if="!editingSelf" class="show-for-small-only small-16 columns">
        <h1>Manage a user's account</h1>
        <h2 class='subheader'>Editing another user's Isaac account.</h2>
    </div>    
    <form class="panel" ng-submit="save()" name="account" novalidate>
        <!-- Had to use a bolck-grid here as the 16 col grid is not divisible by 3 -->
		<ul class="large-block-grid-3 medium-block-grid-1 small-block-grid-1 ru-pad">
            <li>
                <div class="row">
                    <div class="large-16 medium-8 columns">
            	       <label for="account-firstname">
                            <strong>First Name</strong>
                            <span class="ru-form-required"></span>
                            <span class="ru-error-message" ng-if="account.firstname.$invalid && account.firstname.$dirty">
                                Required
                            </span>
                        </label>
    				    <input id="account-firstname" name="firstname" type="text" ng-model="user.givenName" required>
                    </div>
                    <div class="large-16 medium-8 columns">
				        <label for="account-lastname">
                            <strong>Last Name</strong>
                            <span class="ru-form-required"></span>
                            <span class="ru-error-message" ng-if="account.secondname.$invalid && account.secondname.$dirty">
                                Required
                            </span>
                        </label>
    				    <input id="account-lastname" name="secondname" type="text" ng-model="user.familyName" required>
                    </div>
                </div>
                <div class="row">
                    <div class="large-16 columns">
				        <label for="account-email">
                            <strong>Your Email Address</strong>
                            <span class="ru-form-required"></span>
                            <span class="ru-error-message" ng-if="account.email.$invalid && account.email.$dirty">
                                Enter a valid email
                            </span>
                            </label>
    			         <input id="account-email" name="email" type="email" ng-model="user.email" required>
                    </div>
                </div>
                <div class="row">
                    <div ng-show="!user.role && editingSelf" class="large-16 columns">
                        <label>
                            <strong>Are you a teacher?</strong>
                        </label>
                        <a class="teacher-link" ui-sref="contact"><span class="underline">Contact us</span> for an upgraded account.</a>
                    </div>
                    <div ng-show="user.role && (user.role == 'TEACHER' || user.role == 'ADMIN' || user.role == 'CONTENT_EDITOR') && editingSelf" class="large-16 columns">
                        <label>
                            <strong>Upgraded account:</strong>
                        </label>
                        <p>Your account has been assigned the {{user.role.toLowerCase()}} role.</p>
                    </div>
                    <div ng-show="!editingSelf" class="large-16 columns">
                        <label>
                            <strong>Change user's role:</strong>
                        </label>
                        <select ng-model="user.role">
                            <option value="">No role</option>
                            <option value="TEACHER">Teacher</option>
                            <option value="CONTENT_EDITOR">Content Editor</option>
                            <option value="ADMIN">Admin</option>
                        </select>
                    </div>
                </div>
            </li>
            <li>
                <div class="row">
                    <div id="password-wrap" class="large-8 medium-8 columns">
                        <label for="account-password">
                            <!-- Change text if user doesn't have account -->
                            <strong ng-if="user.hasSegueAccount">Change password</strong>
                            <strong ng-if="!user.hasSegueAccount">Set password</strong>
                        </label>
                        <input id="account-password" type="password" ng-model="user.password" name="password" placeholder="Enter password">        
                    </div>
                    <div id="password2-wrap" class="large-8 medium-8 columns">
                        <label for="account-password2" ng-class="{'disabled' : !user.password}"><strong>Confirm password</strong></label>
                        <input id="account-password2" type="password" placeholder="Re-enter password" ng-disabled="!user.password" match="user.password" ng-model="password2" name="<PASSWORD>">
                        <span class="ru-error-message" ng-if="account.password2.$invalid && account.password2.$dirty">
                            Passwords do not match
                        </span>
                    </div>
                </div>
                <div id="account-gender" class="ac-custom ac-radio ac-fill row">
                    <div class="large-8 medium-8 small-8 columns">
                        <label for="r1">Male</label>
                        <input id="r1" name="r1" type="radio" ng-model="user.gender" value="MALE" question-radio-button>
                    </div>
                    <div class="large-8 medium-8 small-8 columns">
                        <label for="r2">Female</label>
                        <input id="r2" name="r1" type="radio" ng-model="user.gender" value="FEMALE" question-radio-button>
                    </div><commit_msg>Only show new / change password box if users already have a segue account as this confused them.<commit_after><div desktop-panel>
    <div ng-if="editingSelf" class="row">
        <div class="medium-10 columns">
    	   <h1>Account Settings</h1>
    	   <h2 class="subheader">Create / update your <a ui-sref="home"><span class="ru_green">Isaac</span></a> account</h2>
        </div>
        <div class="medium-6 end columns text-right">
            <h2 class="ru-welcome logout-link">
                <a ui-sref="logout">Log out &raquo;</a>
            </h2>
        </div>
    </div>
    <div ng-if="!editingSelf" class="row">
        <div class="medium-10 columns">
           <h1>Manage a user's account</h1>
           <h2 class="subheader">Editing another user's <a ui-sref="home"><span class="ru_green">Isaac</span></a> account</h2>
        </div>
    </div>    
</div>
<div class="row account-settings-wrap">
    <div ng-if="editingSelf" class="show-for-small-only small-16 columns">
        <h1>Account settings</h1>
        <h2 class='subheader'>Set up your Isaac account, or <a ui-sref="logout">Log out &raquo;</a></h2>
    </div>
    <div ng-if="!editingSelf" class="show-for-small-only small-16 columns">
        <h1>Manage a user's account</h1>
        <h2 class='subheader'>Editing another user's Isaac account.</h2>
    </div>    
    <form class="panel" ng-submit="save()" name="account" novalidate>
        <!-- Had to use a bolck-grid here as the 16 col grid is not divisible by 3 -->
		<ul class="large-block-grid-3 medium-block-grid-1 small-block-grid-1 ru-pad">
            <li>
                <div class="row">
                    <div class="large-16 medium-8 columns">
            	       <label for="account-firstname">
                            <strong>First Name</strong>
                            <span class="ru-form-required"></span>
                            <span class="ru-error-message" ng-if="account.firstname.$invalid && account.firstname.$dirty">
                                Required
                            </span>
                        </label>
    				    <input id="account-firstname" name="firstname" type="text" ng-model="user.givenName" required>
                    </div>
                    <div class="large-16 medium-8 columns">
				        <label for="account-lastname">
                            <strong>Last Name</strong>
                            <span class="ru-form-required"></span>
                            <span class="ru-error-message" ng-if="account.secondname.$invalid && account.secondname.$dirty">
                                Required
                            </span>
                        </label>
    				    <input id="account-lastname" name="secondname" type="text" ng-model="user.familyName" required>
                    </div>
                </div>
                <div class="row">
                    <div class="large-16 columns">
				        <label for="account-email">
                            <strong>Your Email Address</strong>
                            <span class="ru-form-required"></span>
                            <span class="ru-error-message" ng-if="account.email.$invalid && account.email.$dirty">
                                Enter a valid email
                            </span>
                            </label>
    			         <input id="account-email" name="email" type="email" ng-model="user.email" required>
                    </div>
                </div>
                <div class="row">
                    <div ng-show="!user.role && editingSelf" class="large-16 columns">
                        <label>
                            <strong>Are you a teacher?</strong>
                        </label>
                        <a class="teacher-link" ui-sref="contact"><span class="underline">Contact us</span> for an upgraded account.</a>
                    </div>
                    <div ng-show="user.role && (user.role == 'TEACHER' || user.role == 'ADMIN' || user.role == 'CONTENT_EDITOR') && editingSelf" class="large-16 columns">
                        <label>
                            <strong>Upgraded account:</strong>
                        </label>
                        <p>Your account has been assigned the {{user.role.toLowerCase()}} role.</p>
                    </div>
                    <div ng-show="!editingSelf" class="large-16 columns">
                        <label>
                            <strong>Change user's role:</strong>
                        </label>
                        <select ng-model="user.role">
                            <option value="">No role</option>
                            <option value="TEACHER">Teacher</option>
                            <option value="CONTENT_EDITOR">Content Editor</option>
                            <option value="ADMIN">Admin</option>
                        </select>
                    </div>
                </div>
            </li>
            <li>
                <div ng-class="{'invisible': !user.hasSegueAccount}" class="row">
                    <div id="password-wrap" class="large-8 medium-8 columns">
                        <label for="account-password">
                            <!-- Change text if user doesn't have account -->
                            <strong ng-if="user.hasSegueAccount">Change password</strong>
                            <strong ng-if="!user.hasSegueAccount">Set password</strong>
                        </label>
                        <input id="account-password" type="password" ng-model="user.password" name="password" placeholder="Enter password">        
                    </div>
                    <div id="password2-wrap" class="large-8 medium-8 columns">
                        <label for="account-password2" ng-class="{'disabled' : !user.password}"><strong>Confirm password</strong></label>
                        <input id="account-password2" type="password" placeholder="Re-<PASSWORD>" ng-disabled="!user.password" match="user.password" ng-model="password2" name="password2">
                        <span class="ru-error-message" ng-if="account.password2.$invalid && account.password2.$dirty">
                            Passwords do not match
                        </span>
                    </div>
                </div>
                <div id="account-gender" class="ac-custom ac-radio ac-fill row">
                    <div class="large-8 medium-8 small-8 columns">
                        <label for="r1">Male</label>
                        <input id="r1" name="r1" type="radio" ng-model="user.gender" value="MALE" question-radio-button>
                    </div>
                    <div class="large-8 medium-8 small-8 columns">
                        <label for="r2">Female</label>
                        <input id="r2" name="r1" type="radio" ng-model="user.gender" value="FEMALE" question-radio-button>
                    </div>
{'fraction_non_alphanumeric': 0.1402961242560604, 'fraction_numerical': 0.010088546958920017, 'mean_word_length': 1.4314452091053467, 'pattern_counts': {'":': 0, '<': 321, '<?xml version=': 0, '>': 321, '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': '239109', 'n_tokens_mistral': 3739, 'n_tokens_neox': 3530, 'n_words': 758}