annotate src/account.html.luan @ 62:ad9772fc588a

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 05 Mar 2025 15:03:26 -0700
parents d4d154b404f8
children f067de76084c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
1 local Luan = require "luan:Luan.luan"
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
2 local error = Luan.error
40
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
3 local Parsers = require "luan:Parsers.luan"
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
4 local json_string = Parsers.json_string or error()
46
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
5 local Html = require "luan:Html.luan"
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
6 local html_encode = Html.encode or error()
0
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
7 local Io = require "luan:Io.luan"
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
8 local Http = require "luan:http/Http.luan"
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
9 local Shared = require "site:/lib/Shared.luan"
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
10 local head = Shared.head or error()
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
11 local header = Shared.header or error()
5
a49866b52cc2 login to chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 4
diff changeset
12 local Utils = require "site:/lib/Utils.luan"
a49866b52cc2 login to chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 4
diff changeset
13 local base_url = Utils.base_url or error()
a49866b52cc2 login to chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 4
diff changeset
14 local User = require "site:/lib/User.luan"
a49866b52cc2 login to chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 4
diff changeset
15 local current_user = User.current_required or error()
0
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
16
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
17
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
18 return function()
5
a49866b52cc2 login to chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 4
diff changeset
19 local user = current_user()
a49866b52cc2 login to chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 4
diff changeset
20 if user == nil then return end
0
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
21 Io.stdout = Http.response.text_writer()
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
22 %>
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
23 <!doctype html>
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
24 <html>
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
25 <head>
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
26 <% head() %>
20
dade6a560494 add dialogs
Franklin Schmidt <fschmidt@gmail.com>
parents: 6
diff changeset
27 <script>
dade6a560494 add dialogs
Franklin Schmidt <fschmidt@gmail.com>
parents: 6
diff changeset
28 'use strict';
dade6a560494 add dialogs
Franklin Schmidt <fschmidt@gmail.com>
parents: 6
diff changeset
29
46
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
30 let email = <%= json_string(user.email) %>;
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
31 let username = <%= json_string(user.name) or "" %>;
41
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
32 let notifyEmail = <%= json_string(user.notify_email or "") %>;
40
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
33 let multiNotify = <%= user.multi_notify %>;
41
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
34 let voice = <%= json_string(user.voice_url or "") %>;
40
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
35
46
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
36 function showUsername() {
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
37 let span = document.querySelector('span[username]');
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
38 span.textContent = username || email;
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
39 }
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
40
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
41 function editUsername() {
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
42 let dialog = document.querySelector('dialog[edit_username]');
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
43 let input = dialog.querySelector('input[name=username]');
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
44 input.value = username;
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
45 openModal(dialog);
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
46 }
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
47
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
48 function saveUsername() {
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
49 let dialog = document.querySelector('dialog[edit_username]');
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
50 let input = dialog.querySelector('input[name=username]');
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
51 username = input.value;
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
52 closeModal(input);
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
53 showUsername();
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
54 ajax(`save_username.js?username=${encodeURIComponent(username)}`);
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
55 }
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
56
40
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
57 function showNotify() {
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
58 let span = document.querySelector('span[notify]');
41
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
59 span.textContent = notifyEmail ? `Send notifications to ${notifyEmail}` : 'No notifications';
40
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
60 }
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
61
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
62 function editNotify() {
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
63 let dialog = document.querySelector('dialog[edit_notify]');
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
64 let input = dialog.querySelector('input[name=notify_email]');
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
65 input.value = notifyEmail;
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
66 let radio = dialog.querySelector(`input[type=radio][value=${multiNotify}]`);
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
67 radio.checked = true;
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
68 openModal(dialog);
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
69 }
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
70
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
71 function saveNotify() {
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
72 let dialog = document.querySelector('dialog[edit_notify]');
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
73 let input = dialog.querySelector('input[name=notify_email]');
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
74 notifyEmail = input.value;
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
75 let radio = dialog.querySelector('input[type=radio]:checked');
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
76 multiNotify = radio.value === 'true';
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
77 closeModal(input);
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
78 showNotify();
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
79 ajax(`save_notify.js?email=${encodeURIComponent(notifyEmail)}&multi=${multiNotify}`);
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
80 }
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
81
41
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
82 function showVoice() {
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
83 let span = document.querySelector('span[voice]');
61
Franklin Schmidt <fschmidt@gmail.com>
parents: 60
diff changeset
84 span.textContent = voice ? `Your voice URL is ${voice}` : 'No voice URL';
41
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
85 }
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
86
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
87 function editVoice() {
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
88 let dialog = document.querySelector('dialog[edit_voice]');
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
89 let input = dialog.querySelector('input[name=voice]');
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
90 input.value = voice;
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
91 openModal(dialog);
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
92 }
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
93
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
94 function saveVoice() {
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
95 let dialog = document.querySelector('dialog[edit_voice]');
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
96 let input = dialog.querySelector('input[name=voice]');
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
97 voice = input.value;
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
98 closeModal(input);
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
99 showVoice();
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
100 ajax(`save_voice.js?url=${encodeURIComponent(voice)}`);
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
101 }
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
102
20
dade6a560494 add dialogs
Franklin Schmidt <fschmidt@gmail.com>
parents: 6
diff changeset
103 function deleteUser() {
dade6a560494 add dialogs
Franklin Schmidt <fschmidt@gmail.com>
parents: 6
diff changeset
104 let dialog = document.querySelector('dialog[delete_user]');
dade6a560494 add dialogs
Franklin Schmidt <fschmidt@gmail.com>
parents: 6
diff changeset
105 openModal(dialog);
dade6a560494 add dialogs
Franklin Schmidt <fschmidt@gmail.com>
parents: 6
diff changeset
106 }
dade6a560494 add dialogs
Franklin Schmidt <fschmidt@gmail.com>
parents: 6
diff changeset
107
dade6a560494 add dialogs
Franklin Schmidt <fschmidt@gmail.com>
parents: 6
diff changeset
108 function doDeleteUser(el) {
dade6a560494 add dialogs
Franklin Schmidt <fschmidt@gmail.com>
parents: 6
diff changeset
109 closeModal(el);
dade6a560494 add dialogs
Franklin Schmidt <fschmidt@gmail.com>
parents: 6
diff changeset
110 ajax('delete_user.js');
dade6a560494 add dialogs
Franklin Schmidt <fschmidt@gmail.com>
parents: 6
diff changeset
111 }
40
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
112
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
113 function init() {
46
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
114 showUsername();
40
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
115 showNotify();
41
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
116 showVoice();
40
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
117 }
20
dade6a560494 add dialogs
Franklin Schmidt <fschmidt@gmail.com>
parents: 6
diff changeset
118 </script>
34
Franklin Schmidt <fschmidt@gmail.com>
parents: 21
diff changeset
119 <style>
Franklin Schmidt <fschmidt@gmail.com>
parents: 21
diff changeset
120 h1 {
Franklin Schmidt <fschmidt@gmail.com>
parents: 21
diff changeset
121 text-align: center;
Franklin Schmidt <fschmidt@gmail.com>
parents: 21
diff changeset
122 }
52
c3fabb21b6c4 multi email
Franklin Schmidt <fschmidt@gmail.com>
parents: 51
diff changeset
123 input[name] {
c3fabb21b6c4 multi email
Franklin Schmidt <fschmidt@gmail.com>
parents: 51
diff changeset
124 max-width: 100%;
c3fabb21b6c4 multi email
Franklin Schmidt <fschmidt@gmail.com>
parents: 51
diff changeset
125 }
c3fabb21b6c4 multi email
Franklin Schmidt <fschmidt@gmail.com>
parents: 51
diff changeset
126 input[name=username] {
c3fabb21b6c4 multi email
Franklin Schmidt <fschmidt@gmail.com>
parents: 51
diff changeset
127 width: 300px;
c3fabb21b6c4 multi email
Franklin Schmidt <fschmidt@gmail.com>
parents: 51
diff changeset
128 }
40
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
129 input[name=notify_email] {
52
c3fabb21b6c4 multi email
Franklin Schmidt <fschmidt@gmail.com>
parents: 51
diff changeset
130 width: 500px;
41
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
131 }
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
132 input[name=voice] {
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
133 width: 500px;
40
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
134 }
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
135 span[note] {
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
136 font-size: small;
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
137 }
34
Franklin Schmidt <fschmidt@gmail.com>
parents: 21
diff changeset
138 </style>
0
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
139 </head>
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
140 <body>
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
141 <% header() %>
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
142 <div content>
3
2c63b10781e1 add login
Franklin Schmidt <fschmidt@gmail.com>
parents: 2
diff changeset
143 <h1>Your Account</h1>
51
38c209714df9 rename to Luan Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 49
diff changeset
144 <p><a href="about.html">About Luan Chat</a></p>
61
Franklin Schmidt <fschmidt@gmail.com>
parents: 60
diff changeset
145 <p>Your username is <span username></span> <a href="javascript:editUsername()">Edit</a></p>
40
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
146 <p><span notify></span> <a href="javascript:editNotify()">Edit</a></p>
41
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
147 <p><span voice></span> <a href="javascript:editVoice()">Edit</a></p>
61
Franklin Schmidt <fschmidt@gmail.com>
parents: 60
diff changeset
148 <p>Your chat URL is <%= base_url() %>/chat?with=<%=user.email%></p>
34
Franklin Schmidt <fschmidt@gmail.com>
parents: 21
diff changeset
149 <p><a href="javascript:logout()">Logout</a></p>
20
dade6a560494 add dialogs
Franklin Schmidt <fschmidt@gmail.com>
parents: 6
diff changeset
150 <p><a href="javascript:deleteUser()">Delete account</a></p>
0
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
151 </div>
46
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
152 <dialog edit_username>
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
153 <h2>Edit Username</h2>
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
154 <form action="javascript:saveUsername()">
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
155 <p>
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
156 <label>Username</label><br>
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
157 <input type=text name=username placeholder="<%=html_encode(user.email)%>"><br>
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
158 </p>
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
159 <div buttons>
60
3521166513b3 finish invite
Franklin Schmidt <fschmidt@gmail.com>
parents: 59
diff changeset
160 <button type=button onclick="closeModal(this)">Cancel</button>
3521166513b3 finish invite
Franklin Schmidt <fschmidt@gmail.com>
parents: 59
diff changeset
161 <button type=submit>Save</button>
46
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
162 </div>
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
163 </form>
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
164 </dialog>
40
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
165 <dialog edit_notify>
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
166 <h2>Edit Notification</h2>
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
167 <form action="javascript:saveNotify()">
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
168 <p>
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
169 <label>Send notifications to</label><br>
52
c3fabb21b6c4 multi email
Franklin Schmidt <fschmidt@gmail.com>
parents: 51
diff changeset
170 <input type=email multiple name=notify_email><br>
c3fabb21b6c4 multi email
Franklin Schmidt <fschmidt@gmail.com>
parents: 51
diff changeset
171 <span note>Leave blank for no notifications. Use <a href="https://pushover.net/">Pushover</a> for app notification.</span>
40
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
172 </p>
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
173 <p>
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
174 <label clickable>
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
175 <input type=radio name=multi_notify value=false>
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
176 Notify only for first message
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
177 </label><br>
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
178 <label clickable>
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
179 <input type=radio name=multi_notify value=true>
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
180 Notify for all messages
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
181 </label>
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
182 </p>
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
183 <div buttons>
60
3521166513b3 finish invite
Franklin Schmidt <fschmidt@gmail.com>
parents: 59
diff changeset
184 <button type=button onclick="closeModal(this)">Cancel</button>
3521166513b3 finish invite
Franklin Schmidt <fschmidt@gmail.com>
parents: 59
diff changeset
185 <button type=submit>Save</button>
40
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
186 </div>
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
187 </form>
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
188 </dialog>
41
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
189 <dialog edit_voice>
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
190 <h2>Edit Voice URL</h2>
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
191 <form action="javascript:saveVoice()">
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
192 <p>
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
193 <label>URL for receiving voice calls</label><br>
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
194 <input type=url name=voice><br>
62
Franklin Schmidt <fschmidt@gmail.com>
parents: 61
diff changeset
195 <span note>Leave blank for no voice URL. We recommend <a href="https://talky.io/">Talky</a>.</span>
41
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
196 </p>
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
197 <div buttons>
60
3521166513b3 finish invite
Franklin Schmidt <fschmidt@gmail.com>
parents: 59
diff changeset
198 <button type=button onclick="closeModal(this)">Cancel</button>
3521166513b3 finish invite
Franklin Schmidt <fschmidt@gmail.com>
parents: 59
diff changeset
199 <button type=submit>Save</button>
41
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
200 </div>
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
201 </form>
818697418dbe add voice link
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
202 </dialog>
20
dade6a560494 add dialogs
Franklin Schmidt <fschmidt@gmail.com>
parents: 6
diff changeset
203 <dialog delete_user>
dade6a560494 add dialogs
Franklin Schmidt <fschmidt@gmail.com>
parents: 6
diff changeset
204 <h2>Delete Account</h2>
dade6a560494 add dialogs
Franklin Schmidt <fschmidt@gmail.com>
parents: 6
diff changeset
205 <p>Are you sure that you want to delete your account?</p>
dade6a560494 add dialogs
Franklin Schmidt <fschmidt@gmail.com>
parents: 6
diff changeset
206 <div buttons>
60
3521166513b3 finish invite
Franklin Schmidt <fschmidt@gmail.com>
parents: 59
diff changeset
207 <button onclick="closeModal(this)">Cancel</button>
3521166513b3 finish invite
Franklin Schmidt <fschmidt@gmail.com>
parents: 59
diff changeset
208 <button onclick="doDeleteUser(this)">Delete</button>
20
dade6a560494 add dialogs
Franklin Schmidt <fschmidt@gmail.com>
parents: 6
diff changeset
209 </div>
dade6a560494 add dialogs
Franklin Schmidt <fschmidt@gmail.com>
parents: 6
diff changeset
210 </dialog>
40
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
211 <script> init(); </script>
45
e138343b2c76 unsubscribe and more
Franklin Schmidt <fschmidt@gmail.com>
parents: 43
diff changeset
212 <!-- ID = <%=user.id%> -->
0
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
213 </body>
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
214 </html>
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
215 <%
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
216 end