<commit_before><h1>Editing district</h1>

<div class = "new_form">
  <%= form_for(@district, :html=> {:multipart => true}) do |f| %>
    <fieldset>
      <%= render :partial => f %>

      <div class = "form_row">
        <%= f.label :key, 'District Key' %>
        <%= f.text_field :key %>
        <%= help_popup "This key is part of the filter that converts plaintext passwords to hashes stored in the database.   It should match the key used when you generate the users.csv.  When users login, the same conversion occurs and the hashes are compared.   If you've changed this key twice already, the system will prevent you from doing so again, as it could potentially lock out your users.  This also serves as a default password for users.  They can enter this and then they will receive a confirmation email and be able to change their password."
        %>
      </div>
      <div class ="form_row">
        <%= f.label :lock_tier, 'Restrict tiers?' %>
        <%= f.check_box :lock_tier %>
        <%= help_popup "Some interventions are assigned certain tiers.  If this option is checked, then they will be limited to the current tier (and below) of the selected student.  Student tiers change via checklists, recommendations, and principal overrides." %>
      </div>
      <div class ="form_row">
       <%= f.label :restrict_free_lunch, 'Restrict Lunch Status?' %>
        <%= f.check_box :restrict_free_lunch %>
        <%= help_popup "If checked, the lunch status will be hidden from the extended profile unless the user is a principal of the student." %>
      </div>
      <div class ="form_row">
        <%= f.label :forgot_password, "Allow Password <br/> Recovery?".html_safe %>
        <%= f.check_box :forgot_password %>
        <%= help_popup "If checked, users will be able to reset their password by email if they forget it.  They must also have their email address assigned
        in SIMS." %>
      </div>
      <br clear ="both">
      <div class ="form_row">
        <%= f.label :google_apps %>
        <%= f.check_box :google_apps %><br />
        <%= f.label :google_apps_domain %>
        <%= f.text_field :google_apps_domain %>
        <%= help_popup "If you use gmail or google apps, users can login using their email and password.   You must  also enter your domain by entering it here Checking this will provide a google mail link/image on the login page." %>
      </div>

    <% if defined? OmniAuth::Windowslive %>
        <div class ="form_row">
          <%= f.label :windows_live %>
          <%= f.check_box :windows_live %>
          <%= help_popup "If you use hotmail, outlook.com or live.com for email users can login using their email and password.   Checking this will
        provide a windows live link/image on the login page" %>
      </div>
    <% end %>

      <div class ="form_row">
       <%= f.label :custom_interventions %>
        <%= f.select :custom_interventions, [['Enabled',''],['Content Admins','content_admins'],['Disabled','disabled'] ] %>
        <%= help_popup "You can restrict custom interventions to content administrators, or disable them." %>
      </div>
      <div class ="form_row">
        <%= f.label :logo, "Attach or replace logo<br/> #{District::LOGO_SIZE} ".html_safe %>
        <%= f.file_field :logo %>
        <%= help_popup "Attach a png, gif, or jpg of your district's logo.  It will be scaled to #{District::LOGO_SIZE},
              so you may want to adjust the image size to that to avoid distortion."  %>
            </div>

      <br clear ="both">

      <%- if @district.logo? -%>
        <div class ="form_row" id="existing_logo" >
          <%= f.label :logo %>
          <%= image_tag(@district.logo.url, :alt => 'Photo', :title => 'Current logo', :size => District::LOGO_SIZE) %>
          <%= link_to_function 'Remove Logo' do |page|
            f.object.delete_logo = 1
            page.replace_html 'existing_logo', hidden_field_tag('district[delete_logo]',"1")
            page.insert_html :bottom, 'existing_logo', "Your logo will be removed when you hit update."
            end %>

        <%= help_popup "You don't need to delete the logo if you want to replace it.   Use this if you want to remove the logo and return to the district name in the upper left corner of the page instead of an image." %>
        </div>
      <% end %>

      <h4> District documents (optional) <%=help_popup 'These files will appear in the menu at the left for all users under District Documents.  They are optional.' %>
      </h4>
      <%= render :partial => 'assets/asset_form', :locals => {:form=>f, :parent =>'district'}  %>

      <div class="form_row center_submit">
        <%= f.submit "Update" %>
      </div>
  </fieldset>
  <% end %>
</div>
<%= link_to 'Back', root_url %>
<commit_msg>update check for exsiting windows live config<commit_after><h1>Editing district</h1>

<div class = "new_form">
  <%= form_for(@district, :html=> {:multipart => true}) do |f| %>
    <fieldset>
      <%= render :partial => f %>

      <div class = "form_row">
        <%= f.label :key, 'District Key' %>
        <%= f.text_field :key %>
        <%= help_popup "This key is part of the filter that converts plaintext passwords to hashes stored in the database.   It should match the key used when you generate the users.csv.  When users login, the same conversion occurs and the hashes are compared.   If you've changed this key twice already, the system will prevent you from doing so again, as it could potentially lock out your users.  This also serves as a default password for users.  They can enter this and then they will receive a confirmation email and be able to change their password."
        %>
      </div>
      <div class ="form_row">
        <%= f.label :lock_tier, 'Restrict tiers?' %>
        <%= f.check_box :lock_tier %>
        <%= help_popup "Some interventions are assigned certain tiers.  If this option is checked, then they will be limited to the current tier (and below) of the selected student.  Student tiers change via checklists, recommendations, and principal overrides." %>
      </div>
      <div class ="form_row">
       <%= f.label :restrict_free_lunch, 'Restrict Lunch Status?' %>
        <%= f.check_box :restrict_free_lunch %>
        <%= help_popup "If checked, the lunch status will be hidden from the extended profile unless the user is a principal of the student." %>
      </div>
      <div class ="form_row">
        <%= f.label :forgot_password, "Allow Password <br/> Recovery?".html_safe %>
        <%= f.check_box :forgot_password %>
        <%= help_popup "If checked, users will be able to reset their password by email if they forget it.  They must also have their email address assigned
        in SIMS." %>
      </div>
      <br clear ="both">
      <div class ="form_row">
        <%= f.label :google_apps %>
        <%= f.check_box :google_apps %><br />
        <%= f.label :google_apps_domain %>
        <%= f.text_field :google_apps_domain %>
        <%= help_popup "If you use gmail or google apps, users can login using their email and password.   You must  also enter your domain by entering it here Checking this will provide a google mail link/image on the login page." %>
      </div>

    <% if defined? ::WINDOWS_LIVE_CONFIG %>
        <div class ="form_row">
          <%= f.label :windows_live %>
          <%= f.check_box :windows_live %>
          <%= help_popup "If you use hotmail, outlook.com or live.com for email users can login using their email and password.   Checking this will
        provide a windows live link/image on the login page" %>
      </div>
    <% end %>

      <div class ="form_row">
       <%= f.label :custom_interventions %>
        <%= f.select :custom_interventions, [['Enabled',''],['Content Admins','content_admins'],['Disabled','disabled'] ] %>
        <%= help_popup "You can restrict custom interventions to content administrators, or disable them." %>
      </div>
      <div class ="form_row">
        <%= f.label :logo, "Attach or replace logo<br/> #{District::LOGO_SIZE} ".html_safe %>
        <%= f.file_field :logo %>
        <%= help_popup "Attach a png, gif, or jpg of your district's logo.  It will be scaled to #{District::LOGO_SIZE},
              so you may want to adjust the image size to that to avoid distortion."  %>
            </div>

      <br clear ="both">

      <%- if @district.logo? -%>
        <div class ="form_row" id="existing_logo" >
          <%= f.label :logo %>
          <%= image_tag(@district.logo.url, :alt => 'Photo', :title => 'Current logo', :size => District::LOGO_SIZE) %>
          <%= link_to_function 'Remove Logo' do |page|
            f.object.delete_logo = 1
            page.replace_html 'existing_logo', hidden_field_tag('district[delete_logo]',"1")
            page.insert_html :bottom, 'existing_logo', "Your logo will be removed when you hit update."
            end %>

        <%= help_popup "You don't need to delete the logo if you want to replace it.   Use this if you want to remove the logo and return to the district name in the upper left corner of the page instead of an image." %>
        </div>
      <% end %>

      <h4> District documents (optional) <%=help_popup 'These files will appear in the menu at the left for all users under District Documents.  They are optional.' %>
      </h4>
      <%= render :partial => 'assets/asset_form', :locals => {:form=>f, :parent =>'district'}  %>

      <div class="form_row center_submit">
        <%= f.submit "Update" %>
      </div>
  </fieldset>
  <% end %>
</div>
<%= link_to 'Back', root_url %>

{'fraction_non_alphanumeric': 0.12377578662221296, 'fraction_numerical': 0.001250260470931444, 'mean_word_length': 2.768747546132705, 'pattern_counts': {'":': 0, '<': 151, '<?xml version=': 0, '>': 171, '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': '7037516', 'n_tokens_mistral': 2968, 'n_tokens_neox': 2735, 'n_words': 1062}