<commit_before><!DOCTYPE html>
<html ng-app="forms-app">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>NextGen Dynamic Extensions Form Builder - Demo</title>

    <link href="../css/app.css" rel="stylesheet" type="text/css"></link>
    <link href="../external/select2/css/select2.css" rel="stylesheet" type="text/css"></link>
    <link href="../external/select2/css/select2-bootstrap.css" rel="stylesheet" type="text/css"></link>
    <link href="../external/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"></link>
    <link href="../external/eternicode/css/datepicker.css" rel="stylesheet" type="text/css"></link>
    <link href="../external/de/css/de.css" rel="stylesheet" type="text/css"></link>

    <script src="../external/jquery/jquery.min.js" type="text/javascript"></script>
    <script src="../external/select2/select2.min.js" type="text/javascript"></script>
    <script src="../external/angularjs/angular.min.js" type="text/javascript"></script>
    <script src="../external/angularjs/angular-resource.min.js" type="text/javascript"></script>
    <script src="../external/angularjs/ui-bootstrap-tpls-0.10.0.min.js" type="text/javascript"></script>
    <script src="../external/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
    <script src="../external/eternicode/js/bootstrap-datepicker.js" type="text/javascript"></script>

    <style type="text/css">
      .yellowbg {
        background-color: #ffffcc;
      }

      .plus-hr {
        margin-top: 4px;
        margin-bottom: 4px;
      }
  
      .plus-addon {
        position: relative;
      }

      .plus-addon-input-right input {
        padding-right: 30px;
      }

      .plus-addon-input-right span {
        position: absolute;
        right: 0px;
        padding: 10px 20px;
        pointer-events: none;
      }

      .modal-content {
        height: 550px;
      }

    </style>
  </head>
  <body ng-controller="FormsController">
    <!--div id="notifications" class="cp-notifs hidden">{{alert(notify.msg, notify.type)}</div-->
    <div id="notifications" class="cp-notifs hidden"></div>
    <div id="containers-list" class="container">
      <div class="row">
        <div class="col-xs-2"><button class="btn btn-primary" ng-click="addForm()">Add Form</button></div>
        <div class="col-xs-offset-7 col-xs-3">
          <div class="plus-addon plus-addon-input-right">
            <span class="glyphicon glyphicon-search"></span>
            <input type="text" class="form-control" placeholder="Search Forms" ng-model="searchFormName">
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-7"><h3>Forms</h3></div>
      </div>
      <table class="table" overflow="auto" ng-if="formsList.length > 0">
        <thead>
          <tr>
            <th class="col-xs-4">Form Name</th>
            <th class="col-xs-3">Created By</th>
            <th class="col-xs-2">Last Updated</th>
            <th class="col-xs-1">Count of Protocols</th>
          </tr>
        </thead>
        <tbody>
          <tr ng-repeat="form in formsList | filter:searchFormName" 
              ng-mouseenter="form.highlight=true"
              ng-mouseleave="form.highlight=false">
            <td>
              <a style="cursor:pointer;" ng-click="editForm(form)" tooltip-placement="right" tooltip="Click to edit form">{{form.caption}}</a>
            </td>
            <td>{{formatUsername(form.createdBy)}}</td>
            <td ng-if="form.modificationTime">{{formatDate(form.modificationTime)}}</td>
            <td ng-if="!form.modificationTime">{{formatDate(form.creationTime)}}</td>
            <td> 
              {{form.cpCount == -1 ? "ALL" : form.cpCount}} 
              <span style="cursor: pointer;" ng-if="form.highlight" class="pull-right glyphicon glyphicon-eye-open"
                    ng-click="showFormContexts(form)"
                    tooltip="Click to attach form to a Collection Protocol"
                    tooltip-placement="left">
              </span>
            </td>
          </tr>
        </tbody>
      </table>
    </div>

    <script type="text/ng-template" id="formCtxts.html">
      <div class="modal-header" style="height: 10%;">
        <h4>{{form.caption}}</h4>
      </div>
      <div class="modal-body" style="height: 75%;">
        <div style="margin-bottom: 10px;">
          Used in following collection protocols
        </div>
        <table class="table" style="margin-bottom: 0px;">
          <thead>
            <tr>
              <th class="col-xs-6">Collection Protocol</th>
              <th class="col-xs-6">Level</th>
            </tr>
          </thead>
        </table>
        <div style="height:40%; margin-bottom: 20px; width: 100%; overflow:auto;">
          <table class="table">
            <tbody>
              <tr ng-repeat="cpFormCtxt in cpFormCtxts">
                <td class="col-xs-6">{{cpFormCtxt.title}}</td>
                <td class="col-xs-6">{{cpFormCtxt.levels.join(", ")}}</td>
              </tr>
            </tbody>
          </table>
        </div>
        <div style="height: 45%; overflow: auto;">
          <div>Use form in following collection protocols</div>
          <div class="checkbox">
            <label><input type="checkbox" ng-checked="allProtocols" ng-model="allProtocols"> All Present and Future Collection Protocols </label>
          </div>
          <div ng-show="allProtocols != true" style="margin-top:10px;margin-bottom:10px;">
            <ka-select style="width: 100%" multiple data-placeholder="Select One or More Collection Protocols"
                       options="cpList" option-id="id" option-value="shortTitle" selected="selectedCps"></ka-select>
          </div>
          <div style="margin-top:10px;margin-bottom:10px;">
            <ka-select style="width: 100%" data-placeholder="Select Level"
                       options="extnEntities" option-id="entity" option-value="name" selected="selectedEntity"></ka-select>
          </div>
        </div>
      </div>
      <div class="modal-footer" ng-switch on="enableAttach(allProtocols, selectedCps, selectedEntity)" style="height: 12%;">
        <button ng-switch-when="true"  class="btn btn-primary" ng-click="attach(allProtocols, selectedCps, selectedEntity)">Attach Form</button>
        <button ng-switch-when="true"  class="btn btn-default" ng-click="cancel()">Cancel</button>
        <button ng-switch-when="false" class="btn btn-primary" ng-click="cancel()">Done</button>
      </div> 
    </script>

    <script src="../js/utility.js" type="text/javascript"></script>
    <script src="../js/wrapper.js" type="text/javascript"></script>
    <script src="../js/directives.js" type="text/javascript"></script>
    <script src="../js/forms-controller.js" type="text/javascript"></script>
    <script src="../js/forms-service.js" type="text/javascript"></script>
    <script src="../js/forms-app.js" type="text/javascript"></script>
</body>
<commit_msg>Minor UI fix<commit_after><!DOCTYPE html>
<html ng-app="forms-app">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>NextGen Dynamic Extensions Form Builder - Demo</title>

    <link href="../css/app.css" rel="stylesheet" type="text/css"></link>
    <link href="../external/select2/css/select2.css" rel="stylesheet" type="text/css"></link>
    <link href="../external/select2/css/select2-bootstrap.css" rel="stylesheet" type="text/css"></link>
    <link href="../external/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"></link>
    <link href="../external/eternicode/css/datepicker.css" rel="stylesheet" type="text/css"></link>
    <link href="../external/de/css/de.css" rel="stylesheet" type="text/css"></link>

    <script src="../external/jquery/jquery.min.js" type="text/javascript"></script>
    <script src="../external/select2/select2.min.js" type="text/javascript"></script>
    <script src="../external/angularjs/angular.min.js" type="text/javascript"></script>
    <script src="../external/angularjs/angular-resource.min.js" type="text/javascript"></script>
    <script src="../external/angularjs/ui-bootstrap-tpls-0.10.0.min.js" type="text/javascript"></script>
    <script src="../external/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
    <script src="../external/eternicode/js/bootstrap-datepicker.js" type="text/javascript"></script>

    <style type="text/css">
      .yellowbg {
        background-color: #ffffcc;
      }

      .plus-hr {
        margin-top: 4px;
        margin-bottom: 4px;
      }
  
      .plus-addon {
        position: relative;
      }

      .plus-addon-input-right input {
        padding-right: 30px;
      }

      .plus-addon-input-right span {
        position: absolute;
        right: 0px;
        padding: 10px 20px;
        pointer-events: none;
      }

      .modal-content {
        height: 550px;
      }

    </style>
  </head>
  <body ng-controller="FormsController">
    <!--div id="notifications" class="cp-notifs hidden">{{alert(notify.msg, notify.type)}</div-->
    <div id="notifications" class="cp-notifs hidden"></div>
    <div id="containers-list" class="container">
      <div class="row">
        <div class="col-xs-2"><button class="btn btn-primary" ng-click="addForm()">Add Form</button></div>
        <div class="col-xs-offset-7 col-xs-3">
          <div class="plus-addon plus-addon-input-right">
            <span class="glyphicon glyphicon-search"></span>
            <input type="text" class="form-control" placeholder="Search Forms" ng-model="searchFormName">
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-7"><h3>Forms</h3></div>
      </div>
      <table class="table" overflow="auto" ng-if="formsList.length > 0">
        <thead>
          <tr>
            <th class="col-xs-4">Form Name</th>
            <th class="col-xs-3">Created By</th>
            <th class="col-xs-2">Last Updated</th>
            <th class="col-xs-1">Count of Protocols</th>
          </tr>
        </thead>
        <tbody>
          <tr ng-repeat="form in formsList | filter:searchFormName" 
              ng-mouseenter="form.highlight=true"
              ng-mouseleave="form.highlight=false">
            <td>
              <a style="cursor:pointer;" ng-click="editForm(form)" tooltip-placement="right" tooltip="Click to edit form">{{form.caption}}</a>
            </td>
            <td>{{formatUsername(form.createdBy)}}</td>
            <td ng-if="form.modificationTime">{{formatDate(form.modificationTime)}}</td>
            <td ng-if="!form.modificationTime">{{formatDate(form.creationTime)}}</td>
            <td> 
              {{form.cpCount == -1 ? "ALL" : form.cpCount}} 
              <div style="cursor: pointer;" ng-if="form.highlight" class="pull-right" ng-click="showFormContexts(form)"
                   tooltip="Click to attach form to a Collection Protocol"
                   tooltip-placement="left">
                <span class="glyphicon glyphicon-wrench"></span>
                Attach
              </div>
            </td>
          </tr>
        </tbody>
      </table>
    </div>

    <script type="text/ng-template" id="formCtxts.html">
      <div class="modal-header" style="height: 10%;">
        <h4>{{form.caption}}</h4>
      </div>
      <div class="modal-body" style="height: 75%;">
        <div style="margin-bottom: 10px;">
          Used in following collection protocols
        </div>
        <table class="table" style="margin-bottom: 0px;">
          <thead>
            <tr>
              <th class="col-xs-6">Collection Protocol</th>
              <th class="col-xs-6">Level</th>
            </tr>
          </thead>
        </table>
        <div style="height:40%; margin-bottom: 20px; width: 100%; overflow:auto;">
          <table class="table">
            <tbody>
              <tr ng-repeat="cpFormCtxt in cpFormCtxts">
                <td class="col-xs-6">{{cpFormCtxt.title}}</td>
                <td class="col-xs-6">{{cpFormCtxt.levels.join(", ")}}</td>
              </tr>
            </tbody>
          </table>
        </div>
        <div style="height: 45%; overflow: auto;">
          <div>Use form in following collection protocols</div>
          <div class="checkbox">
            <label><input type="checkbox" ng-checked="allProtocols" ng-model="allProtocols"> All Present and Future Collection Protocols </label>
          </div>
          <div ng-show="allProtocols != true" style="margin-top:10px;margin-bottom:10px;">
            <ka-select style="width: 100%" multiple data-placeholder="Select One or More Collection Protocols"
                       options="cpList" option-id="id" option-value="shortTitle" selected="selectedCps"></ka-select>
          </div>
          <div style="margin-top:10px;margin-bottom:10px;">
            <ka-select style="width: 100%" data-placeholder="Select Level"
                       options="extnEntities" option-id="entity" option-value="name" selected="selectedEntity"></ka-select>
          </div>
        </div>
      </div>
      <div class="modal-footer" ng-switch on="enableAttach(allProtocols, selectedCps, selectedEntity)" style="height: 12%;">
        <button ng-switch-when="true"  class="btn btn-primary" ng-click="attach(allProtocols, selectedCps, selectedEntity)">Attach Form</button>
        <button ng-switch-when="true"  class="btn btn-default" ng-click="cancel()">Cancel</button>
        <button ng-switch-when="false" class="btn btn-primary" ng-click="cancel()">Done</button>
      </div> 
    </script>

    <script src="../js/utility.js" type="text/javascript"></script>
    <script src="../js/wrapper.js" type="text/javascript"></script>
    <script src="../js/directives.js" type="text/javascript"></script>
    <script src="../js/forms-controller.js" type="text/javascript"></script>
    <script src="../js/forms-service.js" type="text/javascript"></script>
    <script src="../js/forms-app.js" type="text/javascript"></script>
</body>

{'fraction_non_alphanumeric': 0.18251404494382023, 'fraction_numerical': 0.010674157303370787, 'mean_word_length': 2.5363794387881797, 'pattern_counts': {'":': 0, '<': 335, '<?xml version=': 0, '>': 337, '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': '5358516', 'n_tokens_mistral': 4476, 'n_tokens_neox': 4271, 'n_words': 764}