<commit_before>{% extends "base.html" %}

{% block subtitle %}
  Preferences
{% endblock subtitle %}

{% block navbar_breadcrumb %}
  <ul class="nav navbar-nav oppia-navbar-breadcrumb">
    <li>
      <span class="oppia-navbar-breadcrumb-separator"></span>
      Preferences
    </li>
  </ul>
{% endblock navbar_breadcrumb %}

{% block header_js %}
  {{ super() }}
  <script type="text/javascript">
    GLOBALS.LANGUAGE_CODES_AND_NAMES = JSON.parse(
      '{{LANGUAGE_CODES_AND_NAMES|js_string}}');
  </script>

  <style>
    html, body {
      background-color: #eee;
    }
  </style>
{% endblock header_js %}

{% block content %}
  <div class="oppia-dashboard-container ng-scope" ng-controller="Preferences">
    <h2 class="oppia-page-heading">Preferences</h2>
    <div class="oppia-page-heading-subtext">
      Any changes that you make on this page will be auto-saved.
    </div>
    <md-card class="oppia-page-card">
      <div class="row">
        <div role="form" class="form-horizontal">
          <div class="form-group">
            <label class="col-lg-2 col-md-2 col-sm-2">Username</label>
            <div class="col-lg-10 col-md-10 col-sm-10">
              {% if username %}
                <a href="/profile/{{username}}">{{username}}</a>
              {% else %}
                <em>Not yet selected</em>
              {% endif %}
            </div>
          </div>
        </div>

        <div role="form" class="form-horizontal">
          <div class="form-group">
            <label class="col-lg-2 col-md-2 col-sm-2">Picture</label>
            <div class="col-lg-10 col-md-10 col-sm-10">
              <div class="oppia-editable-section" title="Change profile picture" style="height: 150px; width: 150px">
                <div class="oppia-click-to-start-editing" ng-click="showEditProfilePictureModal()"></div>
                <i class="material-icons oppia-editor-edit-icon" style="top: 8px; right: 8px;">&#xE254;</i>
                <img ng-if="profilePictureDataUrl" ng-src="<[profilePictureDataUrl]>" class="img-thumbnail">
                <img ng-if="!profilePictureDataUrl" src="/images/general/no_profile_picture.png" class="img-thumbnail">
              </div>
            </div>
          </div>
        </div>

        <div role="form" class="form-horizontal">
          <div class="form-group">
            <label class="col-lg-2 col-md-2 col-sm-2">Bio</label>
            <div class="col-lg-10 col-md-10 col-sm-10">
              <textarea ng-model="userBio" ng-blur="saveUserBio(userBio)" rows="5"></textarea>
              <span class="help-block" style="font-size: smaller">
                This field is optional. Anything you write here is public and
                world-viewable.
              </span>
            </div>
          </div>
        </div>

        <div role="form" class="form-horizontal">
          <div class="form-group">
            <label class="col-lg-2 col-md-2 col-sm-2">Subject Interests</label>
            <div class="col-lg-10 col-md-10 col-sm-10">
              <div ng-if="hasPageLoaded">
                <select2-dropdown
                  item="$parent.subjectInterests"
                  ng-model="subjectInterests"
                  tag-mode="true" allow-multiple-choices="true"
                  new-choice-regex="<[TAG_REGEX_STRING]>" width="100%"
                  placeholder="Enter subject interests..."
                  ng-change="onSubjectInterestsSelectionChange($parent.subjectInterests)"
                  invalid-search-term-message="Add a new subject interest (using lowercase letters and spaces)..."
                  on-selection-change="onSubjectInterestsSelectionChange($parent.subjectInterests)">
                </select2-dropdown>
              </div>
              <span class="help-block" style="font-size: smaller">
                E.g.: mathematics, computer science, art, ...
              </span>
              <div style="height: 18px; width: 550px;">
                <span style="color: red; font-size: 0.8em;" aria-live="assertive" ng-show="changedAtLeastOnce">
                  <[subjectInterestsWarningText]>
                </span>
              </div>
            </div>
          </div>
        </div>

        <div role="form" class="form-horizontal">
          <div class="form-group">
            <label class="col-lg-2 col-md-2 col-sm-2">Preferred Languages</label>
            <div class="col-lg-10 col-md-10 col-sm-10">
              <!--
                If the ng-if is omitted, the select2-dropdown directive won't be
                updated after the initial page load.
              -->
              <div ng-if="hasPageLoaded">
                <select2-dropdown choices="LANGUAGE_CHOICES"
                  item="$parent.preferredLanguageCodes" allow-multiple-choices="true"
                  new-choice-regex=".^" width="400"
                  placeholder="Select preferred languages..."
                  on-selection-change="savePreferredLanguageCodes($parent.preferredLanguageCodes)">
                </select2-dropdown>
              </div>
              <span class="help-block" style="font-size: smaller">
                These languages will be selected by default when you search the
                gallery for explorations.
              </span>
            </div>
          </div><commit_msg>Fix #1703: Fix the preferred languages dropdown width on the Preferences page.<commit_after>{% extends "base.html" %}

{% block subtitle %}
  Preferences
{% endblock subtitle %}

{% block navbar_breadcrumb %}
  <ul class="nav navbar-nav oppia-navbar-breadcrumb">
    <li>
      <span class="oppia-navbar-breadcrumb-separator"></span>
      Preferences
    </li>
  </ul>
{% endblock navbar_breadcrumb %}

{% block header_js %}
  {{ super() }}
  <script type="text/javascript">
    GLOBALS.LANGUAGE_CODES_AND_NAMES = JSON.parse(
      '{{LANGUAGE_CODES_AND_NAMES|js_string}}');
  </script>

  <style>
    html, body {
      background-color: #eee;
    }
  </style>
{% endblock header_js %}

{% block content %}
  <div class="oppia-dashboard-container ng-scope" ng-controller="Preferences">
    <h2 class="oppia-page-heading">Preferences</h2>
    <div class="oppia-page-heading-subtext">
      Any changes that you make on this page will be auto-saved.
    </div>
    <md-card class="oppia-page-card">
      <div class="row">
        <div role="form" class="form-horizontal">
          <div class="form-group">
            <label class="col-lg-2 col-md-2 col-sm-2">Username</label>
            <div class="col-lg-10 col-md-10 col-sm-10">
              {% if username %}
                <a href="/profile/{{username}}">{{username}}</a>
              {% else %}
                <em>Not yet selected</em>
              {% endif %}
            </div>
          </div>
        </div>

        <div role="form" class="form-horizontal">
          <div class="form-group">
            <label class="col-lg-2 col-md-2 col-sm-2">Picture</label>
            <div class="col-lg-10 col-md-10 col-sm-10">
              <div class="oppia-editable-section" title="Change profile picture" style="height: 150px; width: 150px">
                <div class="oppia-click-to-start-editing" ng-click="showEditProfilePictureModal()"></div>
                <i class="material-icons oppia-editor-edit-icon" style="top: 8px; right: 8px;">&#xE254;</i>
                <img ng-if="profilePictureDataUrl" ng-src="<[profilePictureDataUrl]>" class="img-thumbnail">
                <img ng-if="!profilePictureDataUrl" src="/images/general/no_profile_picture.png" class="img-thumbnail">
              </div>
            </div>
          </div>
        </div>

        <div role="form" class="form-horizontal">
          <div class="form-group">
            <label class="col-lg-2 col-md-2 col-sm-2">Bio</label>
            <div class="col-lg-10 col-md-10 col-sm-10">
              <textarea ng-model="userBio" ng-blur="saveUserBio(userBio)" rows="5"></textarea>
              <span class="help-block" style="font-size: smaller">
                This field is optional. Anything you write here is public and
                world-viewable.
              </span>
            </div>
          </div>
        </div>

        <div role="form" class="form-horizontal">
          <div class="form-group">
            <label class="col-lg-2 col-md-2 col-sm-2">Subject Interests</label>
            <div class="col-lg-10 col-md-10 col-sm-10">
              <div ng-if="hasPageLoaded">
                <select2-dropdown
                  item="$parent.subjectInterests"
                  ng-model="subjectInterests"
                  tag-mode="true" allow-multiple-choices="true"
                  new-choice-regex="<[TAG_REGEX_STRING]>" width="100%"
                  placeholder="Enter subject interests..."
                  ng-change="onSubjectInterestsSelectionChange($parent.subjectInterests)"
                  invalid-search-term-message="Add a new subject interest (using lowercase letters and spaces)..."
                  on-selection-change="onSubjectInterestsSelectionChange($parent.subjectInterests)">
                </select2-dropdown>
              </div>
              <span class="help-block" style="font-size: smaller">
                E.g.: mathematics, computer science, art, ...
              </span>
              <div style="height: 18px; width: 550px;">
                <span style="color: red; font-size: 0.8em;" aria-live="assertive" ng-show="changedAtLeastOnce">
                  <[subjectInterestsWarningText]>
                </span>
              </div>
            </div>
          </div>
        </div>

        <div role="form" class="form-horizontal">
          <div class="form-group">
            <label class="col-lg-2 col-md-2 col-sm-2">Preferred Languages</label>
            <div class="col-lg-10 col-md-10 col-sm-10">
              <!--
                If the ng-if is omitted, the select2-dropdown directive won't be
                updated after the initial page load.
              -->
              <div ng-if="hasPageLoaded">
                <select2-dropdown choices="LANGUAGE_CHOICES"
                  item="$parent.preferredLanguageCodes" allow-multiple-choices="true"
                  new-choice-regex=".^" width="100%"
                  placeholder="Select preferred languages..."
                  on-selection-change="savePreferredLanguageCodes($parent.preferredLanguageCodes)">
                </select2-dropdown>
              </div>
              <span class="help-block" style="font-size: smaller">
                These languages will be selected by default when you search the
                gallery for explorations.
              </span>
            </div>
          </div>
{'fraction_non_alphanumeric': 0.14648255271505878, 'fraction_numerical': 0.014741556260496362, 'mean_word_length': 1.9246930422919508, 'pattern_counts': {'":': 0, '<': 187, '<?xml version=': 0, '>': 187, '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': '5031', 'n_tokens_mistral': 3275, 'n_tokens_neox': 3028, 'n_words': 618}