Skip to content

Commit 0837a8c

Browse files
committed
Minor stylistic adjustments and comments
1 parent 95be8bd commit 0837a8c

File tree

4 files changed

+34
-16
lines changed

4 files changed

+34
-16
lines changed

api/committee.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@
88

99
@app.route("/<username>/committee", methods = ["GET"])
1010
def committee_GET (username):
11-
username = os.getenv("USER")
11+
if username != authUser(request.environ):
12+
return { "response": cfg["response"]["badUsername"] }
1213

1314
ldap = getLDAPFaculty(username)
1415

1516
return render_template ("committee.html",
16-
username = os.getenv('USER'),
17+
username = username,
1718
ldap = ldap
1819
)

api/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ flow:
3737
done: "start"
3838
# END NO MAS
3939

40-
contacts:
40+
contacts: # I think this should move to the Parameters table, so it can be more easily configured in the UI by the committee.
4141
irbChairName: "Dan Huck"
4242
irbChairEmail: "[email protected]"
4343

api/programs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
def getAllPrograms ():
44
# This returns the program table
55
progQ = (Programs.select()
6-
.order_by(+Programs.abbreviation))
6+
.order_by(+Programs.abbreviation)) # + is short for Sort ascending
77

88
if progQ.exists():
99
return progQ.select()

api/templates/create.html

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -73,34 +73,51 @@ <h1>URCPP Project Basics</h1>
7373
<div class = "input-group date">
7474

7575
<div class = "col-sm-9">
76-
<input id = "startDate"
77-
name = "startDate"
78-
type = "text"
79-
class = "form-control"
80-
value = "{% if proj.startDate is defined %}{{proj.startDate.strftime('%m-%d-%Y')}}{% endif %}"
81-
placeholder = "mm-dd-yyyy"
82-
onkeydown="return false"
83-
required>
76+
<input id = "startDate"
77+
name = "startDate"
78+
type = "text"
79+
class = "form-control"
80+
value = "{% if proj.startDate is defined %}{{proj.startDate.strftime('%m-%d-%Y')}}{% endif %}"
81+
placeholder = "mm-dd-yyyy"
82+
onkeydown="return false"
83+
required>
8484
</div>
8585
</div>
8686
</div>
8787

8888
<script type = "text/javascript">
8989
$(function() {
90-
$("#startDate").datepicker({dateFormat: "mm-dd-yy", startDate: "01-01-{{params.year}}", endDate: "12-31-{{params.year}}"});
91-
90+
$("#startDate").datepicker({
91+
dateFormat: "mm-dd-yy",
92+
startDate: "01-01-{{params.year}}",
93+
endDate: "12-31-{{params.year}}"
94+
});
9295
});
9396
</script>
9497

9598
<div class = "row col-md-offset-1" style="font-size:1.4em;">
9699
<div class = "checkbox">
97-
<label><input name = "isServiceToCommunity" {% if proj.isServiceToCommunity %} checked {% endif %} id = "isServiceToCommunity" type = "checkbox" class="checkbox" value = "{{proj.isServiceToCommunity}}">Does your project provide a service to the community?</label>
100+
<label><input name = "isServiceToCommunity"
101+
{% if proj.isServiceToCommunity %} checked {% endif %}
102+
id = "isServiceToCommunity"
103+
type = "checkbox"
104+
class="checkbox"
105+
value = "{{proj.isServiceToCommunity}}">
106+
Does your project provide a service to the community?
107+
</label>
98108
</div>
99109
</div>
100110

101111
<div class = "row col-md-offset-1" style="font-size:1.4em;">
102112
<div class = "checkbox">
103-
<label><input name = "hasCommunityPartner" {% if proj.hasCommunityPartner %} checked {% endif %} id = "hasCommunityPartner" type = "checkbox" class="checkbox" value = "{{proj.hasCommunityPartner}}">Does your project involve working with community partners? </label>
113+
<label><input name = "hasCommunityPartner"
114+
{% if proj.hasCommunityPartner %} checked {% endif %}
115+
id = "hasCommunityPartner"
116+
type = "checkbox"
117+
class="checkbox"
118+
value = "{{proj.hasCommunityPartner}}">
119+
Does your project involve working with community partners?
120+
</label>
104121
</div>
105122
</div>
106123
<br />

0 commit comments

Comments
 (0)