diff --git a/Site/App_GlobalResources/Pages.Comms.designer.cs b/Site/App_GlobalResources/Pages.Comms.designer.cs index 91b2dfd8..1bcac62d 100644 --- a/Site/App_GlobalResources/Pages.Comms.designer.cs +++ b/Site/App_GlobalResources/Pages.Comms.designer.cs @@ -19,7 +19,7 @@ namespace Resources.Pages { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option or rebuild the Visual Studio project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Web.Application.StronglyTypedResourceProxyBuilder", "11.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Web.Application.StronglyTypedResourceProxyBuilder", "14.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Comms { @@ -87,6 +87,15 @@ namespace Resources.Pages { } } + /// + /// Looks up a localized string similar to Type your message here. Standard markup like *bold*, _italic_, ==headers== and similar can be used. Two newlines begin a new paragraph. The mail will be sent as dual-mode cleartext and HTML.. + /// + internal static string SendMassMessage_MessageHint { + get { + return ResourceManager.GetString("SendMassMessage_MessageHint", resourceCulture); + } + } + /// /// Looks up a localized string similar to This message would have been sent to the recipients. For the time being, this is a mock-up interface.. /// @@ -132,6 +141,15 @@ namespace Resources.Pages { } } + /// + /// Looks up a localized string similar to Subject. + /// + internal static string SendMassMessage_Subject { + get { + return ResourceManager.GetString("SendMassMessage_Subject", resourceCulture); + } + } + /// /// Looks up a localized string similar to Test. /// diff --git a/Site/App_GlobalResources/Pages.Comms.resx b/Site/App_GlobalResources/Pages.Comms.resx index f7334025..a49843b1 100644 --- a/Site/App_GlobalResources/Pages.Comms.resx +++ b/Site/App_GlobalResources/Pages.Comms.resx @@ -126,6 +126,9 @@ Send a message to a group of people in the organization. You can send the message by mail (good for newsletters and general information) or to their phones (very intrusive, and also costs a bit). + + Type your message here. Standard markup like *bold*, _italic_, ==headers== and similar can be used. Two newlines begin a new paragraph. The mail will be sent as dual-mode cleartext and HTML. + This message would have been sent to the recipients. For the time being, this is a mock-up interface. @@ -143,6 +146,10 @@ Your message is now being distributed to recipients. You will be notified when transmission is complete. + + Subject + Subject of message (if applicable; depends on transmission mode) + Test Keep SHORT- it's a small button. 6-7 letters max diff --git a/Site/Pages/v5/Comms/SendMassMessage.aspx b/Site/Pages/v5/Comms/SendMassMessage.aspx index 9b9ec82d..95e015d3 100644 --- a/Site/Pages/v5/Comms/SendMassMessage.aspx +++ b/Site/Pages/v5/Comms/SendMassMessage.aspx @@ -14,9 +14,11 @@ }); updateRecipientCount(selectedReceipientClass, selectedGeographyId); - }); - var selectedReceipientClass = 1; + $('#<%=this.TextSubject.ClientID%>').focus(); +}); + + var selectedRecipientClass = 1; var selectedGeographyId = 1; // TODO: SET ROOT GEOGRAPHY BY AUTHORITY/ACCESS function onGeographyChange(newGeographyId) { @@ -32,11 +34,30 @@ } function onClickTest() { + + var jsonData = { + recipientTypeId: selectedRecipientClass, + geographyId: selectedGeographyId, + mode: "Mail", + subject: "Test Subject", + body: "SHAKAZAM *IT WORKS*\r\n\r\nMaybe?", + dummyMail: "rick@falkvinge.net", + live: false + }; + + SwarmopsJS.ajaxCall + ("/Pages/v5/Comms/SendMassMessage.aspx/ExecuteSend", + jsonData, + function (result) { + $('#spanRecipientCount').text(result); + }); + alertify.alert(SwarmopsJS.unescape('<%= this.Localized_TestMessageResult %>')); return false; } function onRecipientChange(newRecipientClass) { + selectedRecipientClass = newRecipientClass; updateRecipientCount(newRecipientClass, selectedGeographyId); } @@ -62,13 +83,15 @@
 
 
+  


+

(...)

- +
diff --git a/Site/Pages/v5/Comms/SendMassMessage.aspx.cs b/Site/Pages/v5/Comms/SendMassMessage.aspx.cs index a4596ba6..93dc2bbd 100644 --- a/Site/Pages/v5/Comms/SendMassMessage.aspx.cs +++ b/Site/Pages/v5/Comms/SendMassMessage.aspx.cs @@ -1,4 +1,6 @@ using System; +using System.Reflection; +using System.Security.Cryptography.X509Certificates; using System.Web.Services; using System.Web.UI; using System.Web.UI.WebControls; @@ -33,6 +35,7 @@ namespace Swarmops.Frontend.Pages.Comms this.LabelGeography.Text = Resources.Pages.Comms.SendMassMessage_Geography; this.LabelRecipientType.Text = Resources.Pages.Comms.SendMassMessage_RecipientType; this.LabelHeaderMessage.Text = Resources.Pages.Comms.SendMassMessage_HeaderMessage; + this.LabelSubject.Text = Resources.Pages.Comms.SendMassMessage_Subject; this.DropRecipientClasses.Items.Clear(); this.DropRecipientClasses.Items.Add (new ListItem (Participant.Localized(CurrentOrganization.RegularLabel, TitleVariant.Plural), "1")); @@ -43,6 +46,7 @@ namespace Swarmops.Frontend.Pages.Comms this.ButtonSend.Text = Resources.Pages.Comms.SendMassMessage_SendMessage; this.ButtonTest.Text = Resources.Pages.Comms.SendMassMessage_TestMessage; + this.TextMessage.Attributes["Placeholder"] = Resources.Pages.Comms.SendMassMessage_MessageHint; } [WebMethod] @@ -98,6 +102,13 @@ namespace Swarmops.Frontend.Pages.Comms return result; } + [WebMethod] + public static AjaxCallResult ExecuteSend(int recipientTypeId, int geographyId, string mode, string subject, + string body, string dummyMail, bool live) + { + return new AjaxCallResult {Success = false}; + } + public struct ConfirmPayoutResult { public int AssignedId; diff --git a/Site/Pages/v5/Comms/SendMassMessage.aspx.designer.cs b/Site/Pages/v5/Comms/SendMassMessage.aspx.designer.cs index 7c43b59f..5eca0bfe 100644 --- a/Site/Pages/v5/Comms/SendMassMessage.aspx.designer.cs +++ b/Site/Pages/v5/Comms/SendMassMessage.aspx.designer.cs @@ -38,7 +38,7 @@ namespace Swarmops.Frontend.Pages.Comms { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label LabelRecipientType; - + /// /// LabelGeography control. /// @@ -47,7 +47,16 @@ namespace Swarmops.Frontend.Pages.Comms { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label LabelGeography; - + + /// + /// LabelGeography control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label LabelSubject; + /// /// LabelHeaderMessage control. ///