<commit_before><!-- Load JS / CSS
================================================== -->
<link href="css/datepicker.css" rel="stylesheet">
<link href="css/timepicker.css" rel="stylesheet">
<link href="css/create.css" rel="stylesheet">
<script src="js/prettify.js" type="text/javascript"></script>
<script src="js/bootstrap-datepicker.js"></script>
<script src="js/bootstrap-timepicker.js"></script>
<script src="js/bootstrap-tooltip.js"></script>
<section id="main">
 <!-- PUT CONTENT IN HERE
================================================== --> 
  <form class="form-horizontal well" id="createForm">
    <fieldset>
      <legend>Election Information</legend>
      <div class="control-group">
        <label class="control-label" for="organization">Organization</label>
        <div class="controls">
          <select id="organization" class="input-xlarge">
            <option>Brown College</option>
          </select>
        </div>
      </div>
      
      <!-- Election Name -->
      <div class="control-group">
        <label class="control-label" for="name">Election Name</label>
        <div class="controls">
          <input type="text" class="input-xlarge" id="name">
        </div>
      </div>

      <!-- Start and End Date Time -->
      <div class="control-group">
        <label class="control-label">Voting Times</label>
        <div class="controls controls-row">
          <!-- Start Date -->
          <div class="input-append date" data-date-format="mm/dd/yy">
            <input class="input-mini" size="16" type="text" readonly="" id="startDate">
            <span class="add-on"><i class="icon-calendar"></i></span>
          </div>
          <!-- Start Time -->
          <div class="input-append bootstrap-timepicker-component">
            <input class="input-mini timepicker-default" type="text" id="startTime">
            <span class="add-on"><i class="icon-time"></i></span>
          </div>

          <span class="help-inline">-</span>

          <!-- End Date -->
          <div class="input-append date" data-date-format="mm/dd/yy">
            <input class="input-mini" size="16" type="text" readonly="" id="endDate">
            <span class="add-on"><i class="icon-calendar"></i></span>
          </div>
          <!-- End Time -->
          <div class="input-append bootstrap-timepicker-component">
            <input class="input-mini timepicker-default" type="text" id="endTime">
            <span class="add-on"><i class="icon-time"></i></span>
          </div>
        </div>
      </div>
      <!-- Eligible Voters -->
      <div class="control-group">
        <label class="control-label" for="eligible-voters">Eligible Voters</label>
        <div class="controls">
          <textarea class="span5" id="eligible-voters" rows="5" placeholder="Comma separated NetIDs"></textarea>
        </div>
      </div>
      
      <!-- Add Positions -->
      <div class="control-group">
        <label class="control-label" for="positions">Positions</label>
        <div class="controls" id="positions">
          <a data-toggle="modal" href="#addPositions" class="btn">Add Position</a>
          <div id="positions-list"></div>
        </div>
      </div>
      
      <!-- Add Positions Modal -->
      <div id="addPositions" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="addPositionsLabel" aria-hidden="true">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
          <h3 id="addPositionsLabel">Add Position</h3>
        </div>
        <div class="modal-body">
          <div class="control-group">
            <label class="control-label" for="position-select-type">Position type</label>
            <div class="controls">
              <select id="position-select-type">
                <option id="ranked-choice" value="0">Ranked-Choice Voting Position</option>
                <option id="single-choice" value="1">Single-Choice Voting Position</option>
              </select>
            </div>
          </div>
          
          <!-- Single Person Position -->
          <div class="selection-content" id="0">
            <h4>Ranked-Choice Voting Position</h4>
            <p>Ranked-Choice Voting (also known as instant runoff voting) allows voters to rank a first, second, third (and onwards) choice candidate for a single position. This makes it possible to elect people by majority vote without the need for a separate run-off election.</p>
          </div>
          
          <!-- Multiple People Position -->
          <div class="selection-content" id="1" style="display:none">
            <h4>Single-Choice Voting Position</h4>
            <p>Single-Choice voting allows voters to only vote for a single candidate for a position.</p>
          </div>
          
          <hr>
            <form>
              <fieldset>
                <!-- Position Name -->
                <div class="control-group">
                  <label class="control-label" for="position-name">Position Name</label>
                  <div class="controls">
                    <input type="text" class="input-xlarge" id="position-name">
                  </div>
                </div>
                
                <div class="control-group">
                  <label class="control-label" for="position-slots" rel="tooltip" data-placement="right" data-original-title="Number of people that will be elected for the position.">Position Slots</label>
                  <div class="controls">
                    <input type="number" class="input-mini" name="slots" min="1" max="10" id="position-slots" value="1">
                  </div>
                </div>
                
                <div class="control-group">
                  <label class="control-label" for="position-candidates">Candidates<br /></label>
                  <div class="controls">
                    <div class="add-on btn" id="position-add-candidate" style="margin-bottom:5px;"><i class="icon-plus"></i></div>
                    <div style="margin-bottom: 5px;" id="position-candidates"></div>
                  </div>
                </div>
              </fieldset>
            </form>
        </div>
        <div class="modal-footer">
          <button class="btn" data-dismiss="modal">Close</button>
          <span id="position-add-submit" class="btn btn-primary">Add Position</span>
        </div>
      </div>
      
      <!-- Form Actions -->
      <div class="form-actions">
        <button type="submit" class="btn btn-primary">Create</button>
        <button type="reset" class="btn">Cancel</button>
      </div>
    </fieldset>
  </form>
</section>

<script src="js/create.js"></script><commit_msg>Added write-in slot to the election creation process<commit_after><!-- Load JS / CSS
================================================== -->
<link href="css/datepicker.css" rel="stylesheet">
<link href="css/timepicker.css" rel="stylesheet">
<link href="css/create.css" rel="stylesheet">
<script src="js/prettify.js" type="text/javascript"></script>
<script src="js/bootstrap-datepicker.js"></script>
<script src="js/bootstrap-timepicker.js"></script>
<script src="js/bootstrap-tooltip.js"></script>
<section id="main">
 <!-- PUT CONTENT IN HERE
================================================== --> 
  <form class="form-horizontal well" id="createForm">
    <fieldset>
      <legend>Election Information</legend>
      <div class="control-group">
        <label class="control-label" for="organization">Organization</label>
        <div class="controls">
          <select id="organization" class="input-xlarge">
            <option>Brown College</option>
          </select>
        </div>
      </div>
      
      <!-- Election Name -->
      <div class="control-group">
        <label class="control-label" for="name">Election Name</label>
        <div class="controls">
          <input type="text" class="input-xlarge" id="name">
        </div>
      </div>

      <!-- Start and End Date Time -->
      <div class="control-group">
        <label class="control-label">Voting Times</label>
        <div class="controls controls-row">
          <!-- Start Date -->
          <div class="input-append date" data-date-format="mm/dd/yy">
            <input class="input-mini" size="16" type="text" readonly="" id="startDate">
            <span class="add-on"><i class="icon-calendar"></i></span>
          </div>
          <!-- Start Time -->
          <div class="input-append bootstrap-timepicker-component">
            <input class="input-mini timepicker-default" type="text" id="startTime">
            <span class="add-on"><i class="icon-time"></i></span>
          </div>

          <span class="help-inline">-</span>

          <!-- End Date -->
          <div class="input-append date" data-date-format="mm/dd/yy">
            <input class="input-mini" size="16" type="text" readonly="" id="endDate">
            <span class="add-on"><i class="icon-calendar"></i></span>
          </div>
          <!-- End Time -->
          <div class="input-append bootstrap-timepicker-component">
            <input class="input-mini timepicker-default" type="text" id="endTime">
            <span class="add-on"><i class="icon-time"></i></span>
          </div>
        </div>
      </div>
      <!-- Eligible Voters -->
      <div class="control-group">
        <label class="control-label" for="eligible-voters">Eligible Voters</label>
        <div class="controls">
          <textarea class="span5" id="eligible-voters" rows="5" placeholder="Comma separated NetIDs"></textarea>
        </div>
      </div>
      
      <!-- Add Positions -->
      <div class="control-group">
        <label class="control-label" for="positions">Positions</label>
        <div class="controls" id="positions">
          <a data-toggle="modal" href="#addPositions" class="btn">Add Position</a>
          <div id="positions-list"></div>
        </div>
      </div>
      
      <!-- Add Positions Modal -->
      <div id="addPositions" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="addPositionsLabel" aria-hidden="true">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
          <h3 id="addPositionsLabel">Add Position</h3>
        </div>
        <div class="modal-body">
          <div class="control-group">
            <label class="control-label" for="position-select-type">Position type</label>
            <div class="controls">
              <select id="position-select-type">
                <option id="ranked-choice" value="0">Ranked-Choice Voting Position</option>
                <option id="single-choice" value="1">Single-Choice Voting Position</option>
              </select>
            </div>
          </div>
          
          <!-- Single Person Position -->
          <div class="selection-content" id="0">
            <h4>Ranked-Choice Voting Position</h4>
            <p>Ranked-Choice Voting (also known as instant runoff voting) allows voters to rank a first, second, third (and onwards) choice candidate for a single position. This makes it possible to elect people by majority vote without the need for a separate run-off election.</p>
          </div>
          
          <!-- Multiple People Position -->
          <div class="selection-content" id="1" style="display:none">
            <h4>Single-Choice Voting Position</h4>
            <p>Single-Choice voting allows voters to only vote for a single candidate for a position.</p>
          </div>
          
          <hr>
            <form>
              <fieldset>
                <!-- Position Name -->
                <div class="control-group">
                  <label class="control-label" for="position-name">Position Name</label>
                  <div class="controls">
                    <input type="text" class="input-xlarge" id="position-name">
                  </div>
                </div>
                
                <div class="control-group">
                  <label class="control-label" for="position-slots" rel="tooltip" data-placement="right" data-original-title="Number of people that will be elected for the position.">Position Slots</label>
                  <div class="controls">
                    <input type="number" class="input-mini" name="slots" min="1" max="10" id="position-slots" value="1">
                  </div>
                </div>
                
                <div class="control-group">
                  <label class="control-label" for="position-candidates">Candidates<br /></label>
                  <div class="controls">
                    <div class="add-on btn btn-success" id="position-add-candidate" style="margin-bottom:5px;"><i class="icon-plus icon-white"></i></div>
                    <div style="margin-bottom: 5px;" id="position-candidates"></div>
                  </div>
                </div>
                
                <div class="control-group">
                  <label class="control-label">Write-in Slots</label>
                  <div class="controls">
                    <input type="number" class="input-mini" name="slots" min="1" max="10" id="write-in-slots" value="0">
                  </div>
                </div>
                
              </fieldset>
            </form>
        </div>
        <div class="modal-footer">
          <button class="btn" data-dismiss="modal">Close</button>
          <span id="position-add-submit" class="btn btn-primary">Add Position</span>
        </div>
      </div>
      
      <!-- Form Actions -->
      <div class="form-actions">
        <button type="submit" class="btn btn-primary">Create</button>
        <button type="reset" class="btn">Cancel</button>
      </div>
    </fieldset>
  </form>
</section>

<script src="js/create.js"></script>
{'fraction_non_alphanumeric': 0.1782477341389728, 'fraction_numerical': 0.0035966048050640196, 'mean_word_length': 2.163367463026166, 'pattern_counts': {'":': 0, '<': 380, '<?xml version=': 0, '>': 380, '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': '5142184', 'n_tokens_mistral': 3879, 'n_tokens_neox': 3734, 'n_words': 839}