Added entry for test mail address

This commit is contained in:
Rick Falkvinge
2017-01-02 01:15:26 +01:00
parent c1d0ad7f3c
commit 346837c7e5
2 changed files with 27 additions and 1 deletions
+21 -1
View File
@@ -35,13 +35,31 @@
function onClickTest() {
if (<%=this.RunningOnSandbox%> && testMessageSandboxAddress == '')
{
// Prompt for an address to send to
// This should preferably be in a mod on just Sandbox and not in code everywhere
alertify.prompt("You're currently using the Sandbox. Where would you like a test message sent?",
function (evt, value)
{
testMessageSandboxAddress = value; // may need sanitation
onClickTest(); // rerun with value set
},
function() {
alertify.log('Canceled.');
});
return false; // do not process at this time, wait for async response
}
var jsonData = {
recipientTypeId: selectedRecipientClass,
geographyId: selectedGeographyId,
mode: "Mail",
subject: "Test Subject",
body: "SHAKAZAM *IT WORKS*\r\n\r\nMaybe?",
dummyMail: "rick@falkvinge.net",
dummyMail: testMessageSandboxAddress,
live: false
};
@@ -76,6 +94,8 @@
}
var testMessageSandboxAddress = '';
</script>
</asp:Content>
@@ -8,6 +8,7 @@ using Resources;
using Swarmops.Logic.Communications;
using Swarmops.Logic.Security;
using Swarmops.Logic.Structure;
using Swarmops.Logic.Support;
using Swarmops.Logic.Swarm;
namespace Swarmops.Frontend.Pages.Comms
@@ -118,6 +119,11 @@ namespace Swarmops.Frontend.Pages.Comms
public string DisplayMessage;
};
public string RunningOnSandbox
{
get { return PilotInstallationIds.IsPilot(PilotInstallationIds.DevelopmentSandbox) ? "true" : "false"; }
}
// ReSharper disable once InconsistentNaming
public string Localized_SendMessageResult
{