33{% set currentPage = "Collaborations" %}
44
55{% block body %}
6+
67< ol class ="breadcrumb ">
78 < li > < a href ="/ "> Home</ a > </ li >
89 < li > < a href ="/create "> Create</ a > </ li >
@@ -21,86 +22,44 @@ <h1>Faculty Collaborator(s) </h1>
2122 method = "POST "
2223 >
2324
24- <!-- <form action="/addCommitteeMember" method="post">
25- <select class="selectpicker form-control" data-role="chosen" id="addCommitteeMember" multiple="" name="addCommitteeMember">
26- {% for committeeMember in notCommittee %}
27- <option value="{{committeeMember.fID}}">{{committeeMember.firstname}} {{committeeMember.lastname}}</option>
28- {% endfor %}
29- </select>
30-
31- -->
32-
3325 {% for id in range (0, numCollab) %}
3426 < div class = 'form-group ' id = "cgroup{{id}} " style ="margin-left:100px; ">
3527 < h4 > < b > Collaborator #{{id + 1}} </ b > </ h4 >
36-
37- < label for ='firstname{{id}} ' class = 'col-sm-2 control-label '>
38- First Name:
39- </ label >
40- < div class = 'col-sm-7 '>
41- < input name = 'firstname[] '
42- id = 'firstname{{id}} '
43- type = 'text '
44- class = 'form-control '
45- placeholder = 'John '
46- required
47- />
48- </ div >
49- </ div >
50-
51- < div class = 'form-group ' id = "cgroup{{id}} " style ="margin-left:100px; ">
52- < label for ='lastname{{id}} ' class = 'col-sm-2 control-label '>
53- Last Name:
54- </ label >
55- < div class = 'col-sm-7 '>
56- < input name = 'lastname[] '
57- id = 'lastname{{id}} '
58- type = 'text '
59- class = 'form-control '
60- placeholder = 'Doe '
61- required
62- />
63- </ div >
64- </ div >
28+ </ div >
6529
6630 < div class = 'form-group ' id = "cgroup{{id}} " style = "margin-left:100px; ">
6731 < label for ='username{{id}} ' class = 'col-sm-2 control-label '>
6832 Username:
6933 </ label >
7034 < div class = 'col-sm-7 '>
71- < select class = "selectpicker form-control " data-live-search ="true " id = "getCollabUsernames " name = "getCollabUsernames ">
72- < option disabled selected > --- </ option >
35+ < select required class = "selectpicker form-control " data-live-search ="true " id = "getCollabUsernames " name = "getCollabUsernames " data-style =" btn-primary ">
36+ < option disabled selected value ="" > doej; Jane Doe </ option >
7337 {% for faculty in allFaculty %}
74- {% if faculty.lastname != "" %}
75- < option value ="{{faculty.fID}} "> {{faculty.username}}</ option >
76- <!-- <option value="" disabled selected>doej</option> -->
38+ {% if faculty.lastname != "" %} <!-- needed to remove test users -->
39+ {% if faculty.username != g.user.username %}
40+ < option title ={{faculty.username}} value ="{{faculty.fID}} "> {{faculty.username}}; {{faculty.firstname}} {{faculty.lastname}}</ option >
41+ {% endif %}
7742 {% endif %}
7843 {% endfor %}
7944 </ select >
80- <!-- <input name = 'username[]'
81- id = 'username{{id}}'
82- type = 'text'
83- class = 'form-control'
84- placeholder = 'doej'
85- required
86- /> -->
8745 </ div >
8846 </ div >
8947 {% endfor %}
9048
9149 < div class ="row ">
9250 < div class = "form-group " >
9351 < div class = "col-sm-1 ">
94- < input type ="button " value ="Back " onclick ="window.history.back() " class ="btn btn-primary "/>
52+ < input type ="button " value ="Back " onclick ="window.history.back() " class ="btn btn-succeess "/>
9553 </ input >
9654 </ div >
9755
9856
9957 < div class = "col-sm-offset-9 col-sm-2 " id = "submitButton ">
10058 < button id = "submit "
10159 type = "submit "
102- class ="btn btn-block btn-primary form-control "
103- type ="submit "/>
60+ class ="btn btn-block btn-success form-control "
61+ type ="submit "
62+ />
10463 Submit
10564 </ button >
10665 </ div >
@@ -115,12 +74,6 @@ <h4> <b> Collaborator #{{id + 1}} </b> </h4>
11574
11675
11776
118-
119-
120-
121-
122-
123-
12477< script >
12578 var numCollabs = parseInt ( "{{numCollab}}" ) ;
12679 var username = "{{username}}" ;
@@ -130,11 +83,11 @@ <h4> <b> Collaborator #{{id + 1}} </b> </h4>
13083{% block footer_imports %}
13184{% for id in range (0, numCollab) %}
13285< script type = "text/javascript ">
133- /* global delay, checkValidBNumber, BNUMBERCHECKDELAY */
134- $ ( "#cbnumber {{id}}" ) . keyup ( function ( ) {
86+ /* global delay, checkValidUsername, USERNAMECHECKDELAY */
87+ $ ( "#cusername {{id}}" ) . keyup ( function ( ) {
13588 delay ( function ( ) {
136- checkValidBNumber ( "{{id}}" ) ;
137- } , BNUMBERCHECKDELAY ) ;
89+ checkValidUsername ( "{{id}}" ) ;
90+ } , USERNAMECHECKDELAY ) ;
13891 } ) ;
13992 </ script >
14093{% endfor %}
0 commit comments