-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprofile.html
94 lines (85 loc) · 3.45 KB
/
profile.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
---
layout: default
page: form
---
<div class="formblock">
{% for form in site.data.orginfo %}
{% assign loopindex = forloop.index0%}
<section class="page {% if loopindex == 0 %}show{% endif %} col col--xs-12 col--sm-12 col--md-8 col--lg-8 col--md-offset-2 col--lg-offset-2" id="{{form.grantinfo}}">
{% if forloop.index > 1 %}<button class="turn prev">Prev Page</button>{% endif %}
{% if forloop.index < forloop.length %}<button class="turn next">Next Page</button>{% endif %}
{% if form.desc %}
<section class="block">
<div class="form-desc col col--xs-12 col--sm-12 col--md-12 col--lg-12">
{{form.desc}}
</div>
</section>
{% endif %}
<div class="title"><h2>{{ form.name }}</h2></div>
{% for section in form.sections %}
<section class="block" id="{{section.name}}">
<h3>{{section.header}}</h3>
<form class="form">
{% for question in section.questions %}
<div class="question {% if question.required %}required{% endif%}">
<label>{{question.label}}</label>
{% if question.type == "dropdown" %}
<select id="{{question.dbfield}}" class="live">
{% for option in question.content %}
<option data_id="{{option.label}}">{{option.label}}</option>
{% endfor %}
</select>
{% elsif question.type == "text" %}
<input class="live" type="text" id="{{question.dbfield}}" />
{% elsif question.type == "number" %}
<input class="live" type="number" min="0.0" step="0.01" id="{{question.dbfield}}" />
{% elsif question.type == "money" %}
<div class="money"><input class="live" type="number" min="0.0" step="0.01" id="{{question.dbfield}}" /></div>
{% elsif question.type == "percentage" %}
<div class="percentage"><input class="live" type="number" min="0.0" max="100.0" step="0.1" id="{{question.dbfield}}" /></div>
{% elsif question.type == "radio" %}
<div class="radio">
{% for option in question.content %}
<p>
<input class="live" type="radio" id="{{question.dbfield}}-{{option.label}}"
name="{{question.dbfield}}" value="{{option.label}}" />
<label for="{{question.dbfield}}-{{option.label}}">{{option.label}}</label>
</p>
{% endfor %}
</div>
{% elsif question.type == "peoplelist" %}
<div class="peoplelist" id="{{question.dbfield}}">
<div class="header">
<div>Contributor</div>
<div>Hours</div>
</div>
<div class="bod">
</div>
<a class="button people-button" id="{{question.dbfield}}">Add contributor</a>
</div>
{% else %}
{% endif %}
{% if question.desc %}
<div class="tag" data-tooltip="{{question.desc}}">
<img src="{{ "/img/tooltip.png" | prepend: site.baseurl | prepend: site.url }}" />
</div>
{% endif %}
</div>
{% endfor %}
</form>
</section>
{% endfor %}
{% if forloop.last %}<a class="button bottomgrant" href="{{ "/list" | prepend: site.baseurl | prepend: site.url }}">Save and Return to Home</a>{% endif %}
{% if forloop.index > 1 %}<button class="turn prev">Prev Page</button>{% endif %}
{% if forloop.index < forloop.length %}<button class="turn next">Next Page</button>{% endif %}
</section>
{% endfor %}
</div>
<div style="display:none" id="ppllistTemplate">
<div class="time" db_id="<%= id %>" obj_id="<%= id %>">
<select id="<%= dbid %>" class="live ppl objlist">
<option>Loading contributors...</option>
</select>
<input class="live ppl hours" type="number" min="0.0" step="0.1" id="<%= dbid %>" value="0" />
</div>
</div>