summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vmail-listmessages-html.lsp25
-rw-r--r--vmail-model.lua1
2 files changed, 13 insertions, 13 deletions
diff --git a/vmail-listmessages-html.lsp b/vmail-listmessages-html.lsp
index 3d148a6..7ab94f6 100644
--- a/vmail-listmessages-html.lsp
+++ b/vmail-listmessages-html.lsp
@@ -34,6 +34,15 @@ if viewlibrary.check_permission("listfolders") then
end
end
%>
+<% -- Figure out the callback number
+callmenumber = nil
+if viewlibrary.check_permission("editmyusersettings") and viewlibrary.check_permission("callbackmymessage") then
+ local settings = viewlibrary.dispatch_component("editmyusersettings", nil, true)
+ if settings and settings.value and settings.value.callmenumber then
+ callmenumber = settings.value.callmenumber.value
+ end
+end
+%>
<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery-latest.js"></script>
<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery.tablesorter.js"></script>
@@ -68,9 +77,6 @@ end
<% if viewlibrary.check_permission("movemessage") or viewlibrary.check_permission("movemymessage") then %>
$("#multimove").click(HandleMulti);
<% end %>
-<% if viewlibrary.check_permission("callbackmessage") or viewlibrary.check_permission("callbackmymessage") then %>
- $("#multicallback").click(HandleMulti);
-<% end %>
});
</script>
@@ -120,16 +126,6 @@ end
</form>
<% end %>
<% end %>
-<% if viewlibrary.check_permission("callbackmessage") or viewlibrary.check_permission("callbackmymessage") then %>
- <form id="multicallback" action="<%= html.html_escape(page_info.script .. page_info.prefix .. page_info.controller) %>/
- <% if viewlibrary.check_permission("callbackmessage") then io.write("callbackmessage") else io.write("callbackmymessage") end %>
- " method="POST">
- <input class="hidden" type="hidden" name="redir" value="<%= html.html_escape(page_info.orig_action) %>" >
- <input class="hidden" type="hidden" name="message" value="" >
- <input class="submit" type="submit" value="Callback">
- <input class="text" type="text" name="extension" value="" style="width:auto;">
- </form>
-<% end %>
</TD></TR></TABLE>
<table><tr><td>
<small>select: </small>
@@ -161,6 +157,9 @@ end
<%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/downloadmymessage?message="..v.uuid, label="Download "} %>
<%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/downloadmymessage?message="..v.uuid, class="playmessage", label="Play "} %>
<% end %>
+ <% if callmenumber then %>
+ <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/callbackmymessage?message="..v.uuid.."&extension="..callmenumber, label="Callback "} %>
+ <% end %>
</TD>
<TD><%= html.html_escape(os.date("%x", v.created_epoch)) %></TD>
<TD><%= html.html_escape(os.date("%X", v.created_epoch)) %></TD>
diff --git a/vmail-model.lua b/vmail-model.lua
index 6441406..9032dca 100644
--- a/vmail-model.lua
+++ b/vmail-model.lua
@@ -46,6 +46,7 @@ local voicemail_params_creation_script = {
"INSERT INTO voicemail_params VALUES(null, 'vm-keep-local-after-email', 'boolean', 'Keep voicemail after emailed', 'When disabled the message will be deleted from the voicemailbox after the notification email is sent. This allows receiving voicemail via email alone, rather than having the voicemail available from the Web interface or by telephone. CAUTION: Attach voicemail to email must be enabled, OTHERWISE YOUR MESSAGES WILL BE LOST FOREVER.', 'true')",
"INSERT INTO voicemail_params VALUES(null, 'vm-notify-mailto', 'text', 'Pager Email Address', 'Email a short notification', '')",
"INSERT INTO voicemail_params VALUES(null, 'vm-notify-email-all-messages', 'boolean', 'Pager Email Enable', '', 'false')",
+ "INSERT INTO voicemail_params VALUES(null, 'callmenumber', 'text', 'Call Me Number', '', '')",
}
local voicemail_folders_creation_script = {