<commit_before><!--
  ~ Copyright © 2013 <NAME>, Inc. (JSI). All Rights Reserved.
  ~
  ~ The U.S. Agency for International Development (USAID) funded this section of the application development under the terms of the USAID | DELIVER PROJECT contract no. GPO-I-00-06-00007-00.
  -->

<div>
    <h2><span>Supply Lines</span>
        <a href="#" id="supplyline-add-new"
           class="pull-right btn btn-primary"
           ng-click="startAddNewSupplyline()">Add New</a></h2>


    <!--   <div ng-hide="supplylineLoaded()" openlmis-message="msg.loading"></div>
   -->
    <div>
        <div class="alert alert-success" id="saveSuccessMsgDiv" ng-bind="message" ng-show="message"/>
        <div  class="list-header-container">
            <div class="row-fluid list-header">
                <div class="span1" style="float: left; width: 60px;">&nbsp;</div>
                <div class="span1" style="float: left; width: 60px;">&nbsp;</div>
                <div class="span2" style="overflow: visible;">Program</div>
                <div class="span2" style="overflow: visible;">Supplying Facility</div>
                <div class="span2" style="overflow: visible;">Supervisory Node</div>
                <div class="span3" style="overflow: visible;">Description</div>
            </div>
        </div>

        <form class="supplyline-form" id="createSupplylineForm" ng-show="newSupplylineMode" name="createSupplylineForm"
              ng-submit="createSupplyline()" novalidate>
            <div ng-class="formActive">
                <div class="row-fluid list-row">

                    <div class="span3">
                        <select name="programid" id="programid" ng-model="newSupplyline.program.id"
                                ng-options="pg.id as pg.name for pg in programs" ng-required="true"
                                ng-disabled="supplyline.dataReportable == 'false'">
                            <option value="">--- Select Program ---</option>
                        </select>
                        <span class="label-required">*</span>
                        <span class="form-error" style="float: left"
                              ng-show="createSupplylineForm.programid.$error.required && showErrorForCreate">Please fill this value
                        </span>

                    </div>
                    <div class="span3">
                        <select name="supplyingfacilityid" id="supplyingfacilityid"
                                ng-model="newSupplyline.supplyingFacility.id"
                                ng-options="f.id as f.name for f in facilities" ng-required="true"
                                ng-disabled="supplyline.dataReportable == 'false'">
                            <option value="">--- Select Supplying Facility ---</option>
                        </select>
                        <span class="label-required">*</span>
                        <span class="form-error" style="float: left"
                              ng-show="createSupplylineForm.supplyingfacilityid.$error.required && showErrorForCreate">Please fill this value
                        </span>

                    </div>

                    <div class="span3">
                        <select name="supervisorynode" id="supervisorynode"
                                ng-model="newSupplyline.supervisoryNode.id"
                                ng-options="sn.id as sn.name for sn in supervisoryNodes" ng-required="true"
                                ng-disabled="supplyline.dataReportable == 'false'">
                            <option value="">--- Select Supervisory Node ---</option>
                        </select>
                        <span class="label-required">*</span>
                        <span class="form-error" style="float: left"
                              ng-show="createSupplylineForm.supervisorynode.$error.required && showErrorForCreate">Please fill this value
                        </span>

                    </div>

                    <div class="span3">
                        <input id="description" name="description" type="text" ng-required="true"
                               ng-model="newSupplyline.description"
                               maxlength="15" placeholder="Description"/>
                        <span class="label-required">*</span>
                        <span class="form-error" style="float: left"
                              ng-show="createSupplylineForm.description.$error.required && showErrorForCreate">Please fill this value
                        </span>

                    </div>


                </div>
                <div class="row-fluid supplyline-button-row">
                    <div class="span1">&nbsp;</div>
                    <div class="span2">
                        <input type="submit" class="btn btn-primary btn-small" openlmis-message="button.create"/>
                        <input type="button" class="btn btn-cancel btn-small" openlmis-message="button.cancel"
                               ng-click="cancelAddNewSupplyline()"/>
                    </div>
                    <div ng-show="creationError" class="span9 form-error" ng-bind="creationError"></div>
                </div>


            </div>
        </form>

        <!-- edit form-->
        <form class="edit-supplyline-form" id="editSupplylineForm_{{$index}}" ng-repeat="supplyline in supplylines"
              name="editSupplylineForm"
              ng-submit="updateSupplyline(supplyline, editSupplylineForm);"
              ng-show="supplylines && (supplylines.length > 0)" novalidate>
            <input type="hidden" ng-model="backupSupplylineRow"/>

            <div ng-class="supplylinesBackupMap[supplyline.id].editFormActive">
                <div class="row-fluid list-row" ng-show="supplylinesBackupMap[supplyline.id].edit">

            <!-- edit trigger -->

                    <div class="span3" >
                        <span ng-hide="supplylinesBackupMap[supplyline.id].edit" ng-bind="supplyline.program.id"></span>
                        <select name="programid" id="programid_{{$index}}"
                                ng-model="supplyline.program.id"
                                ng-options="pg.id as pg.name for pg in programs" ng-required="true"
                                ng-disabled="supplyline.dataReportable == 'false'"
                                ng-show="supplylinesBackupMap[supplyline.id].edit">
                            <option value="">--- Select Program ---</option>
                        </select>
                        <span ng-show="supplylinesBackupMap[supplyline.id].edit" class="label-required">*</span>
                        <span class="form-error" style="float: left" ng-show="editSupplylineForm.programid.$error.required && showErrorForEdit"
                              openlmis-message="missing.value"></span>

                    </div>


                    <div class="span3">
                        <span ng-hide="supplylinesBackupMap[supplyline.id].edit" ng-bind="supplyline.supplyingFacility.id"></span>
                        <select name="supplyingfacilityid" id="supplyingfacilityid_{{$index}}"
                                ng-model="supplyline.supplyingFacility.id"
                                ng-options="f.id as f.name for f in facilities" ng-required="true"
                                ng-disabled="supplyline.dataReportable == 'false'"
                                ng-show="supplylinesBackupMap[supplyline.id].edit">>
                            <option value="">--- Select Supplying Facility ---</option>
                        </select>
                        <span ng-show="supplylinesBackupMap[supplyline.id].edit" class="label-required">*</span>
                        <span class="form-error" style="float: left" ng-show="editSupplylineForm.supplyingfacilityid.$error.required && showErrorForEdit"
                              openlmis-message="missing.value"></span>

                    </div>

                    <div class="span3">
                        <span ng-hide="supplylinesBackupMap[supplyline.id].edit" ng-bind="supplyline.supervisoryNode.id"></span>
                        <select name="supervisorynode" id="supervisorynode_{{$index}}"
                                ng-model="supplyline.supervisoryNode.id"
                                ng-options="sn.id as sn.name for sn in supervisoryNodes" ng-required="true"
                                ng-disabled="supplyline.dataReportable == 'false'"
                                ng-show="supplylinesBackupMap[supplyline.id].edit">>
                            <option value="">--- Select Supervisory Node ---</option>
                        </select>
                        <span ng-show="supplylinesBackupMap[supplyline.id].edit" class="label-required">*</span>
                        <span class="form-error" style="float: left" ng-show="editSupplylineForm.supervisorynode.$error.required && showErrorForEdit"
                              openlmis-message="missing.value"></span>

                    </div>

                    <div class="span2">
                        <input id="description_{{$index}}" name="desc" ng-show="supplylinesBackupMap[supplyline.id].edit" type="text"  ng:required="true"<commit_msg>Fixed angularJS error on supply line save page<commit_after><!--
  ~ Copyright © 2013 <NAME>, Inc. (JSI). All Rights Reserved.
  ~
  ~ The U.S. Agency for International Development (USAID) funded this section of the application development under the terms of the USAID | DELIVER PROJECT contract no. GPO-I-00-06-00007-00.
  -->

<div>
    <h2><span>Supply Lines</span>
        <a href="#" id="supplyline-add-new"
           class="pull-right btn btn-primary"
           ng-click="startAddNewSupplyline()">Add New</a></h2>


    <!--   <div ng-hide="supplylineLoaded()" openlmis-message="msg.loading"></div>
   -->
    <div>
        <div class="alert alert-success" id="saveSuccessMsgDiv" ng-bind="message" ng-show="message"/>
        <div  class="list-header-container">
            <div class="row-fluid list-header">
                <div class="span1" style="float: left; width: 60px;">&nbsp;</div>
                <div class="span1" style="float: left; width: 60px;">&nbsp;</div>
                <div class="span2" style="overflow: visible;">Program</div>
                <div class="span2" style="overflow: visible;">Supplying Facility</div>
                <div class="span2" style="overflow: visible;">Supervisory Node</div>
                <div class="span3" style="overflow: visible;">Description</div>
            </div>
        </div>

        <form class="supplyline-form" id="createSupplylineForm" ng-show="newSupplylineMode" name="createSupplylineForm"
              ng-submit="createSupplyline()" novalidate>
            <div ng-class="formActive">
                <div class="row-fluid list-row">

                    <div class="span3">
                        <select name="programid" id="programid" ng-model="newSupplyline.program.id"
                                ng-options="pg.id as pg.name for pg in programs" ng-required="true"
                                ng-disabled="supplyline.dataReportable == 'false'">
                            <option value="">--- Select Program ---</option>
                        </select>
                        <span class="label-required">*</span>
                        <span class="form-error" style="float: left"
                              ng-show="createSupplylineForm.programid.$error.required && showErrorForCreate">Please fill this value
                        </span>

                    </div>
                    <div class="span3">
                        <select name="supplyingfacilityid" id="supplyingfacilityid"
                                ng-model="newSupplyline.supplyingFacility.id"
                                ng-options="f.id as f.name for f in facilities" ng-required="true"
                                ng-disabled="supplyline.dataReportable == 'false'">
                            <option value="">--- Select Supplying Facility ---</option>
                        </select>
                        <span class="label-required">*</span>
                        <span class="form-error" style="float: left"
                              ng-show="createSupplylineForm.supplyingfacilityid.$error.required && showErrorForCreate">Please fill this value
                        </span>

                    </div>

                    <div class="span3">
                        <select name="supervisorynode" id="supervisorynode"
                                ng-model="newSupplyline.supervisoryNode.id"
                                ng-options="sn.id as sn.name for sn in supervisoryNodes" ng-required="true"
                                ng-disabled="supplyline.dataReportable == 'false'">
                            <option value="">--- Select Supervisory Node ---</option>
                        </select>
                        <span class="label-required">*</span>
                        <span class="form-error" style="float: left"
                              ng-show="createSupplylineForm.supervisorynode.$error.required && showErrorForCreate">Please fill this value
                        </span>

                    </div>

                    <div class="span3">
                        <input id="description" name="description" type="text" ng-required="true"
                               ng-model="newSupplyline.description"
                               maxlength="15" placeholder="Description"/>
                        <span class="label-required">*</span>
                        <span class="form-error" style="float: left"
                              ng-show="createSupplylineForm.description.$error.required && showErrorForCreate">Please fill this value
                        </span>

                    </div>


                </div>
                <div class="row-fluid supplyline-button-row">
                    <div class="span1">&nbsp;</div>
                    <div class="span2">
                        <input type="submit" class="btn btn-primary btn-small" openlmis-message="button.create"/>
                        <input type="button" class="btn btn-cancel btn-small" openlmis-message="button.cancel"
                               ng-click="cancelAddNewSupplyline()"/>
                    </div>
                    <div ng-show="creationError" class="span9 form-error" ng-bind="creationError"></div>
                </div>


            </div>
        </form>

        <!-- edit form-->
        <form class="edit-supplyline-form" id="editSupplylineForm_{{$index}}" ng-repeat="supplyline in supplylines"
              name="editSupplylineForm"
              ng-submit="updateSupplyline(supplyline, editSupplylineForm);"
              ng-show="supplylines && (supplylines.length > 0)" novalidate>
            <input type="hidden" ng-model="backupSupplylineRow"/>

            <div ng-class="supplylinesBackupMap[supplyline.id].editFormActive">
                <div class="row-fluid list-row" ng-show="supplylinesBackupMap[supplyline.id].edit">

            <!-- edit trigger -->

                    <div class="span3" >
                        <span ng-hide="supplylinesBackupMap[supplyline.id].edit" ng-bind="supplyline.program.id"></span>
                        <select name="programid" id="programid_{{$index}}"
                                ng-model="supplyline.program.id"
                                ng-options="pg.id as pg.name for pg in programs" ng-required="true"
                                ng-disabled="supplyline.dataReportable == 'false'"
                                ng-show="supplylinesBackupMap[supplyline.id].edit">
                            <option value="">--- Select Program ---</option>
                        </select>
                        <span ng-show="supplylinesBackupMap[supplyline.id].edit" class="label-required">*</span>
                        <span class="form-error" style="float: left" ng-show="editSupplylineForm.programid.$error.required && showErrorForEdit"
                              openlmis-message="missing.value"></span>

                    </div>


                    <div class="span3">
                        <span ng-hide="supplylinesBackupMap[supplyline.id].edit" ng-bind="supplyline.supplyingFacility.id"></span>
                        <select name="supplyingfacilityid" id="supplyingfacilityid_{{$index}}"
                                ng-model="supplyline.supplyingFacility.id"
                                ng-options="f.id as f.name for f in facilities" ng-required="true"
                                ng-disabled="supplyline.dataReportable == 'false'"
                                ng-show="supplylinesBackupMap[supplyline.id].edit">>
                            <option value="">--- Select Supplying Facility ---</option>
                        </select>
                        <span ng-show="supplylinesBackupMap[supplyline.id].edit" class="label-required">*</span>
                        <span class="form-error" style="float: left" ng-show="editSupplylineForm.supplyingfacilityid.$error.required && showErrorForEdit"
                              openlmis-message="missing.value"></span>

                    </div>

                    <div class="span3">
                        <span ng-hide="supplylinesBackupMap[supplyline.id].edit" ng-bind="supplyline.supervisoryNode.id"></span>
                        <select name="supervisorynode" id="supervisorynode_{{$index}}"
                                ng-model="supplyline.supervisoryNode.id"
                                ng-options="sn.id as sn.name for sn in supervisoryNodes" ng-required="true"
                                ng-disabled="supplyline.dataReportable == 'false'"
                                ng-show="supplylinesBackupMap[supplyline.id].edit">>
                            <option value="">--- Select Supervisory Node ---</option>
                        </select>
                        <span ng-show="supplylinesBackupMap[supplyline.id].edit" class="label-required">*</span>
                        <span class="form-error" style="float: left" ng-show="editSupplylineForm.supervisorynode.$error.required && showErrorForEdit"
                              openlmis-message="missing.value"></span>

                    </div>

                    <div class="span2">
                        <input id="description_{{$index}}" name="desc" ng-show="supplylinesBackupMap[supplyline.id].edit" type="text"  ng-required="true"
{'fraction_non_alphanumeric': 0.13071195157229334, 'fraction_numerical': 0.00439277870038035, 'mean_word_length': 1.596745027124774, 'pattern_counts': {'":': 0, '<': 257, '<?xml version=': 0, '>': 261, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4336686', 'n_tokens_mistral': 4941, 'n_tokens_neox': 4618, 'n_words': 830}