<commit_before><div ng-controller="SettingsController" class="user" data-ng-init="onInit()">

    <div id="wrapper">

        <div id="genericHeading">
            <a href ng-click="goToPage('/')"><img src="img/logo-small.png" width="100" height="43" alt="[matrix]"/></a>
        </div>

        <h1>Settings</h1>
        <div class="section">
            <form>
                <div class="profile-avatar">
                    <img ng-src="{{ (null !== profile.avatarUrl) ? httpUri(profile.avatarUrl, 320, 320) : 'img/default-profile.png' }}" m-file-input="profile.avatarFile"/>
                </div>
                <div>
                    <input id="user-displayname-input" size="40" ng-model="profile.displayName" placeholder="Your display name"/>
                    <br/>
                    <button id="user-save-button"
                            ng-disabled="(profile.displayName === profileOnServer.displayName) && (profile.avatarUrl === profileOnServer.avatarUrl)"
                            ng-click="saveProfile()">Save changes</button>
                </div>
            </form>
        </div>
        <br/>

        <h3>Linked emails</h3>
        <div class="section">
            <form>
                <input size="40" ng-model="linkedEmails.linkNewEmail" ng-enter="linkEmail(linkedEmails.linkNewEmail)" />
                <button ng-disabled="!linkedEmails.linkNewEmail" ng-click="linkEmail(linkedEmails.linkNewEmail)">
                    Link Email
                </button>
                {{ emailFeedback }}
            </form>
            <form ng-hide="!linkedEmails.emailBeingAuthed">
                Enter validation token for {{ linkedEmails.emailBeingAuthed }}:
                <br />
                <input size="20" ng-model="linkedEmails.emailCode" ng-enter="submitEmailCode(linkedEmails.emailCode)" />
                <button ng-disabled="!linkedEmails.emailCode || !linkedEmails.linkNewEmail" ng-click="submitEmailCode(linkedEmails.emailCode)">
                    Submit Code
                </button>   
            </form>
            <table>
                <tr ng-repeat="(address, info) in linkedEmails.linkedEmailList">
                    <td>{{address}}</td>
                </tr>
            </table>
        </div>
        <br/>

        <h3>Notifications</h3>
        <div class="section">
            <h4>Words to Alert On</h4>
            <div class="section">
                <ul>
                    <li ng-repeat="rule in settings.rules.content">
                        <button  ng-click="deleteContentRule(rule)" ng-disabled="rule.default">Delete</button>
                        '{{rule.pattern}}': <span ng-repeat="a in rule.actions"><i>{{stringForAction(a)}}</i> </span>
                    </li>
                    <li>
                        <form ng-submit="addContentRule(content_rule_add_input, [ rule_add_action.content ])">
                            <input type="text" ng-model="content_rule_add_input" />
                            <select ng-model="rule_add_action.content">
                                <option value="notify">Always Notify</option>
                                <option value="dont_notify">Never Notify</option>
                            </select>
                            <input type="submit" value="Add" ng-disabled="!content_rule_add_input" />
                        </form>
                    </li>
                </ul>
            </div>
            <h4>Rooms</h4>
            <div class="section">
                <ul>
                    <li ng-repeat="rule in settings.rules.room">
                        <button  ng-click="deleteRoomRule(rule)" ng-disabled="rule.default">Delete</button>
                        '{{rooms[rule.rule_id].name}}': <span ng-repeat="a in rule.actions"><i>{{stringForAction(a)}}</i> </span>
                    </li>
                    <li>
                        <form ng-submit="addRoomRule(room_rule_add_input, [ rule_add_action.room ])">
                            <select ng-model="room_rule_add_input">
                                <option ng-repeat="(room_id, room) in rooms" value="{{room_id}}">{{room.name}}</option>
                            </select>
                            <select ng-model="rule_add_action.room">
                                <option value="notify">Always Notify</option>
                                <option value="dont_notify">Never Notify</option>
                            </select>
                            <input type="submit" value="Add" ng-disabled="!room_rule_add_input" />
                        </form>
                    </li>
                </ul>
            </div>
            <h4>Senders</h4>
            <div class="section">
                <ul>
                    <li ng-repeat="rule in settings.rules.sender">
                        <button  ng-click="deleteSenderRule(rule)" ng-disabled="rule.default">Delete</button>
                        '{{rule.rule_id}}': <span ng-repeat="a in rule.actions"><i>{{stringForAction(a)}}</i> </span>
                    </li>
                    <li>
                        <form ng-submit="addSenderRule(sender_rule_add_input, [ rule_add_action.sender ])">
                            <input type="text" ng-model="sender_rule_add_input" />
                            <select ng-model="rule_add_action.sender">
                                <option value="notify">Always Notify</option>
                                <option value="dont_notify">Never Notify</option>
                            </select>
                            <input type="submit" value="Add" ng-disabled="!sender_rule_add_input" />
                        </form>
                    </li>
                </ul>
            </div>
        </div><commit_msg>C;ear text boxes when add is pressed.<commit_after><div ng-controller="SettingsController" class="user" data-ng-init="onInit()">

    <div id="wrapper">

        <div id="genericHeading">
            <a href ng-click="goToPage('/')"><img src="img/logo-small.png" width="100" height="43" alt="[matrix]"/></a>
        </div>

        <h1>Settings</h1>
        <div class="section">
            <form>
                <div class="profile-avatar">
                    <img ng-src="{{ (null !== profile.avatarUrl) ? httpUri(profile.avatarUrl, 320, 320) : 'img/default-profile.png' }}" m-file-input="profile.avatarFile"/>
                </div>
                <div>
                    <input id="user-displayname-input" size="40" ng-model="profile.displayName" placeholder="Your display name"/>
                    <br/>
                    <button id="user-save-button"
                            ng-disabled="(profile.displayName === profileOnServer.displayName) && (profile.avatarUrl === profileOnServer.avatarUrl)"
                            ng-click="saveProfile()">Save changes</button>
                </div>
            </form>
        </div>
        <br/>

        <h3>Linked emails</h3>
        <div class="section">
            <form>
                <input size="40" ng-model="linkedEmails.linkNewEmail" ng-enter="linkEmail(linkedEmails.linkNewEmail)" />
                <button ng-disabled="!linkedEmails.linkNewEmail" ng-click="linkEmail(linkedEmails.linkNewEmail)">
                    Link Email
                </button>
                {{ emailFeedback }}
            </form>
            <form ng-hide="!linkedEmails.emailBeingAuthed">
                Enter validation token for {{ linkedEmails.emailBeingAuthed }}:
                <br />
                <input size="20" ng-model="linkedEmails.emailCode" ng-enter="submitEmailCode(linkedEmails.emailCode)" />
                <button ng-disabled="!linkedEmails.emailCode || !linkedEmails.linkNewEmail" ng-click="submitEmailCode(linkedEmails.emailCode)">
                    Submit Code
                </button>   
            </form>
            <table>
                <tr ng-repeat="(address, info) in linkedEmails.linkedEmailList">
                    <td>{{address}}</td>
                </tr>
            </table>
        </div>
        <br/>

        <h3>Notifications</h3>
        <div class="section">
            <h4>Words to Alert On</h4>
            <div class="section">
                <ul>
                    <li ng-repeat="rule in settings.rules.content">
                        <button  ng-click="deleteContentRule(rule)" ng-disabled="rule.default">Delete</button>
                        '{{rule.pattern}}': <span ng-repeat="a in rule.actions"><i>{{stringForAction(a)}}</i> </span>
                    </li>
                    <li>
                        <form ng-submit="addContentRule(content_rule_add_input, [ rule_add_action.content ]); content_rule_add_input = '';">
                            <input type="text" ng-model="content_rule_add_input" />
                            <select ng-model="rule_add_action.content">
                                <option value="notify">Always Notify</option>
                                <option value="dont_notify">Never Notify</option>
                            </select>
                            <input type="submit" value="Add" ng-disabled="!content_rule_add_input" />
                        </form>
                    </li>
                </ul>
            </div>
            <h4>Rooms</h4>
            <div class="section">
                <ul>
                    <li ng-repeat="rule in settings.rules.room">
                        <button  ng-click="deleteRoomRule(rule)" ng-disabled="rule.default">Delete</button>
                        '{{rooms[rule.rule_id].name}}': <span ng-repeat="a in rule.actions"><i>{{stringForAction(a)}}</i> </span>
                    </li>
                    <li>
                        <form ng-submit="addRoomRule(room_rule_add_input, [ rule_add_action.room ])">
                            <select ng-model="room_rule_add_input">
                                <option ng-repeat="(room_id, room) in rooms" value="{{room_id}}">{{room.name}}</option>
                            </select>
                            <select ng-model="rule_add_action.room">
                                <option value="notify">Always Notify</option>
                                <option value="dont_notify">Never Notify</option>
                            </select>
                            <input type="submit" value="Add" ng-disabled="!room_rule_add_input" />
                        </form>
                    </li>
                </ul>
            </div>
            <h4>Senders</h4>
            <div class="section">
                <ul>
                    <li ng-repeat="rule in settings.rules.sender">
                        <button  ng-click="deleteSenderRule(rule)" ng-disabled="rule.default">Delete</button>
                        '{{rule.rule_id}}': <span ng-repeat="a in rule.actions"><i>{{stringForAction(a)}}</i> </span>
                    </li>
                    <li>
                        <form ng-submit="addSenderRule(sender_rule_add_input, [ rule_add_action.sender ]); sender_rule_add_input = '';">
                            <input type="text" ng-model="sender_rule_add_input" />
                            <select ng-model="rule_add_action.sender">
                                <option value="notify">Always Notify</option>
                                <option value="dont_notify">Never Notify</option>
                            </select>
                            <input type="submit" value="Add" ng-disabled="!sender_rule_add_input" />
                        </form>
                    </li>
                </ul>
            </div>
        </div>
{'fraction_non_alphanumeric': 0.14034787079084912, 'fraction_numerical': 0.004969582726415902, 'mean_word_length': 1.40560593569662, 'pattern_counts': {'":': 0, '<': 263, '<?xml version=': 0, '>': 263, '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': '6334148', 'n_tokens_mistral': 3196, 'n_tokens_neox': 3007, 'n_words': 487}