-
Notifications
You must be signed in to change notification settings - Fork 0
/
settingsSidebar.html
188 lines (162 loc) · 7.58 KB
/
settingsSidebar.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<!DOCTYPE html>
<html>
<head>
<base target="_top">
<style>
html {
background: #bbdcf0;
color: black;
line-height: 1.5;
font-family: Verdana;
}
output {
font-size: 200%;
font-family: Helvetica Neue,Helvetica,Arial,sans-serif;
}
label {
display: inline-block;
text-align: right;
font-size: small;
}
.emailButton {
border: none;
box-sizing: border-box;
}
.emailButton:hover {
background: #e1e1e1;
border-top: 1px solid #d0d0d0;
}
.Button {
background-color: #2980B9;
border: none;
border-radius: 15px;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
}
.dataInputRoles {
background: #f1f2ee;
padding: 5px;
border-radius: 15px;
margin: 5px;
border-style: solid;
border-width: 2px;
border-color: #c3d5d8;
display: grid;
grid-template-columns: repeat(auto-fill,minmax(100px, 1fr));
}
.dataInputLocations {
background: #f1f2ee;
padding: 15px;
border-radius: 15px;
margin: 5px;
border-style: solid;
border-width: 2px;
border-color: #c3d5d8;
}
.messageOutput {
background: #00FA9A;
padding: 5px;
border-radius: 15px;
border-style: solid;
border-width: 2px;
border-color: #c3d5d8;
margin: auto; text-align: center;
}
</style>
</head>
<body>
<form>
<h3>Executive Roles</h3>
<div class="dataInputRoles">
<!-- ===================================================== -->
<!-- TODO: -->
<!-- - fix CSS for very static meeting roles input -->
<!-- -->
<!-- -->
<!-- -->
<!-- Hard coded 2 values that are passed to email function -->
<!-- ===================================================== -->
<div><label for="prez"><input class="emailButton" type="button" value="✉️" onclick="google.script.run.showEmailDialog('settingRole1', 'President')" />President: </label></div>
<div><input type="text" id="settingRole1" name="settingRole1" size="18"></div>
<div><label for="vpedu"><input class="emailButton" type="button" value="✉️" onclick="google.script.run.showEmailDialog('settingRole2', 'VP of Edu.')" />VP of Edu: </label></div>
<div><input type="text" id="settingRole2" name="settingRole2" size="18"></div>
<div><label for="vpmem"><input class="emailButton" type="button" value="✉️" onclick="google.script.run.showEmailDialog('settingRole3', 'VP of Mem.')" />VP of Mem: </label></div>
<div><input type="text" id="settingRole3" name="settingRole3" size="18"></div>
<div><label for="vppr"><input class="emailButton" type="button" value="✉️" onclick="google.script.run.showEmailDialog('settingRole4', 'VP of PR')" />VP of PR: </label></div>
<div><input type="text" id="settingRole4" name="settingRole4" size="18"></div>
<div><label for="tres"><input class="emailButton" type="button" value="✉️" onclick="google.script.run.showEmailDialog('settingRole5', 'Treasurer')" />Treasurer: </label></div>
<div><input type="text" id="settingRole5" name="settingRole5" size="18"></div>
<div><label for="saa"><input class="emailButton" type="button" value="✉️" onclick="google.script.run.showEmailDialog('settingRole6', 'Sgt. at Arms')" />SAA: </label></div>
<div><input type="text" id="settingRole6" name="settingRole6" size="18"></div>
<div><label for="sec"><input class="emailButton" type="button" value="✉️" onclick="google.script.run.showEmailDialog('settingRole7', 'Secretary')" />Secretary: </label></div>
<div><input type="text" id="settingRole7" name="settingRole7" size="18"></div>
</div>
<h3>Meeting Locations</h3>
<div class="dataInputLocations">
<label for="location1">Location 1: </label>
<input type="text" id="settingLocation1" name="settingLocation1"><br>
<label for="location2">Location 2: </label>
<input type="text" id="settingLocation2" name="settingLocation2"><br>
<label for="location3">Location 3: </label>
<input type="text" id="settingLocation3" name="settingLocation3"><br>
<label for="location4">Location 4: </label>
<input type="text" id="settingLocation4" name="settingLocation4"><br>
<label for="location5">Location 5: </label>
<input type="text" id="settingLocation5" name="settingLocation5"><br>
</div>
<!--
<h3>Factory Defaults (future feature)</h3>
<div class="dataInputLocations">
<label for="headerImage">Header image: </label>
<input type="text" id="settingHeaderImage" name="settingHeaderImage"><br>
<label for="clubName">Club name: </label>
<input type="text" id="settingClubName" name="settingClubName"><br>
<label for="clubNum">Club #: </label>
<input type="text" id="settingClubNum" name="settingClubNum"><br>
<label for="meetingTitle">Meeting Title: </label>
<input type="text" id="settingMeetingTitle" name="settingMeetingTitle"><br>
</div>
-->
<div id="submitButton"></div>
<div>
<input class="Button" type="button" value="Save" onclick="formSubmit()" />
<!-- <input class="Button" type="button" value="Email PDF Copy" onclick="google.script.run.showEmailDialog()" /> -->
<input class="Button" type="button" value="Email PDF" onclick="" />
</div>
</form>
<p>
<input type="button" value="Details" onclick="google.script.run.showDetails()" />
<input type="button" value="Item/Tasks" onclick="google.script.run.showTasks()" />
<input type="button" value="Help" onclick="google.script.run.showHelp()" />
<input type="button" value="Close" onclick="google.script.host.close()" />
</p>
</body>
<!--------------------------------- Code ------------------------------------------->
<script type="text/javascript">
//runs automatically on load
google.script.run.withSuccessHandler(updateFormValues).getAllProperties();
// ------------------------- Updating Form Values ---------------------------------
function updateFormValues(properties) {
for(i = 1; i < 8; i++){
document.getElementById('settingRole'+i).value = properties['settingRole'+i];
}
for(i = 1; i < 6; i++){
document.getElementById('settingLocation'+i).value = properties['settingLocation'+i];
}
}
function formSubmit() {
google.script.run.settingsInput(document.forms[0]);
document.getElementById('submitButton').innerHTML = "<div class='messageOutput'>Saved</div>";
google.script.run.withSuccessHandler(hideSaved).waitSeconds();
}
function hideSaved() {
document.getElementById('submitButton').innerHTML = "";
}
</script>
</html>