From e3b6057c3e934ee95cb197b94bda54e0bb00f155 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Mon, 2 Jan 2017 01:23:10 +0100 Subject: [PATCH] Added orgname to subject for mass mail --- Logic/Communications/Payload/ParticipantMailPayload.cs | 2 +- Site/Pages/v5/Comms/SendMassMessage.aspx | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Logic/Communications/Payload/ParticipantMailPayload.cs b/Logic/Communications/Payload/ParticipantMailPayload.cs index 93522fa9..39234c89 100644 --- a/Logic/Communications/Payload/ParticipantMailPayload.cs +++ b/Logic/Communications/Payload/ParticipantMailPayload.cs @@ -95,7 +95,7 @@ namespace Swarmops.Logic.Communications.Payload RenderedComm result = new RenderedComm(); result[CommRenderPart.BodyText] = body; - result[CommRenderPart.Subject] = subject; + result[CommRenderPart.Subject] = "[" + Strings[MailPayloadString.OrganizationName] + "] " + subject; result[CommRenderPart.SenderMail] = "admin@swarmops.com"; // TODO: FIX FIX FIX HACK result[CommRenderPart.SenderName] = "Swarmops Administrative"; diff --git a/Site/Pages/v5/Comms/SendMassMessage.aspx b/Site/Pages/v5/Comms/SendMassMessage.aspx index e0e6ee40..cf1db8ce 100644 --- a/Site/Pages/v5/Comms/SendMassMessage.aspx +++ b/Site/Pages/v5/Comms/SendMassMessage.aspx @@ -35,12 +35,20 @@ function onClickTest() { + var body = $('#<%=this.TextMessage.ClientID%>').val().trim(); + + if (body.length < 2) // interpreted as empty + { + alertify.alert("You should write a message body before sending your message."); // TODO: LOC + return false; + } + 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?", + alertify.prompt("You're currently using the Sandbox. Where would you like a test message sent?", // TODO: LOC function (evt, value) { testMessageSandboxAddress = value; // may need sanitation