Applicant signup should work
This commit is contained in:
@@ -392,6 +392,8 @@ namespace Swarmops.Logic.Communications
|
||||
payload.Strings[NotificationString.RegularTitle] = organization.RegularLabel.ToString(); // may need fudging later because localization
|
||||
payload.Strings[NotificationString.ActivistTitle] = organization.ActivistLabel.ToString(); // as above
|
||||
|
||||
// TODO: Change the below to resolve to at least the global officers
|
||||
|
||||
return CreateSingleRecipientNotification (payload, organization, Person.FromIdentity (1));
|
||||
}
|
||||
|
||||
|
||||
@@ -180,6 +180,8 @@ namespace Swarmops.Logic.Communications.Payload
|
||||
Participant_Renewed,
|
||||
Participant_Terminated,
|
||||
Participant_Churned,
|
||||
Applicant_Signup,
|
||||
Applicant_Approved,
|
||||
Bitcoin_PaidOut,
|
||||
Bitcoin_Shortage,
|
||||
Bitcoin_Shortage_Urgent,
|
||||
|
||||
@@ -223,6 +223,7 @@
|
||||
<Compile Include="Communications\Payload\PayloadEnvelope.cs" />
|
||||
<Compile Include="Communications\Payload\NotificationPayload.cs" />
|
||||
<Compile Include="Security\Impersonation.cs" />
|
||||
<Compile Include="Support\LogEntries\ApplicantAddedLogEntry.cs" />
|
||||
<Compile Include="Support\SocketMessages\SocketMessageBase.cs" />
|
||||
<Compile Include="Support\BackendServiceOrder.cs" />
|
||||
<Compile Include="Support\BackendServiceOrders.cs" />
|
||||
|
||||
+18
@@ -60,6 +60,24 @@ namespace Swarmops.Logic.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to A new person has applied to be a [RegularTitle] in [OrganizationName]! [ConcernedPersonName] currently resides in [GeographyName], [CountryCode]..
|
||||
/// </summary>
|
||||
internal static string Applicant_Signup_Body {
|
||||
get {
|
||||
return ResourceManager.GetString("Applicant_Signup_Body", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to [[OrganizationName]] New Applicant: [ConcernedPersonName], [GeographyName].
|
||||
/// </summary>
|
||||
internal static string Applicant_Signup_Header {
|
||||
get {
|
||||
return ResourceManager.GetString("Applicant_Signup_Header", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The bitcoin hotwallet for [OrganizationName] just made [PaymentCount] automatic payment(s) totalling [CurrencyCode] [AmountFloat] ([BitcoinAmountFloat] microbitcoin or "bits")..
|
||||
/// </summary>
|
||||
|
||||
@@ -117,6 +117,12 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Applicant_Signup_Body" xml:space="preserve">
|
||||
<value>A new person has applied to be a [RegularTitle] in [OrganizationName]! [ConcernedPersonName] currently resides in [GeographyName], [CountryCode].</value>
|
||||
</data>
|
||||
<data name="Applicant_Signup_Header" xml:space="preserve">
|
||||
<value>[[OrganizationName]] New Applicant: [ConcernedPersonName], [GeographyName]</value>
|
||||
</data>
|
||||
<data name="BitcoinPayoutAddress_Bad_Body" xml:space="preserve">
|
||||
<value>On attempting a payout to your Bitcoin Cash payout address, the address ([BitcoinAddress]) was rejected by the underlying payout engine as invalid. It has therefore been cleared from your profile.
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Swarmops.Logic.Structure;
|
||||
using Swarmops.Logic.Swarm;
|
||||
using Swarmops.Logic.Support;
|
||||
|
||||
namespace Swarmops.Logic.Support.LogEntries
|
||||
{
|
||||
[Serializable]
|
||||
public class ApplicantAddedLogEntry: LogEntryBase<ApplicantAddedLogEntry>
|
||||
{
|
||||
[Obsolete("Do not call empty ctor directly. Intended for serialization only.", true)]
|
||||
public ApplicantAddedLogEntry()
|
||||
{
|
||||
// Do not call empty ctor directly. Intended for serialization only.
|
||||
}
|
||||
|
||||
public ApplicantAddedLogEntry (Applicant newApplicant)
|
||||
{
|
||||
this.ApplicantId = newApplicant.Identity;
|
||||
if (HttpContext.Current != null)
|
||||
{
|
||||
ActingIPAddress = SupportFunctions.GetMostLikelyRemoteIPAddress();
|
||||
}
|
||||
}
|
||||
|
||||
public int ApplicantId { get; set; }
|
||||
public string ActingIPAddress { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -30,6 +30,11 @@ namespace Swarmops.Logic.Support
|
||||
// Writing intentional
|
||||
}
|
||||
|
||||
public static SwarmopsLogEntry Create(IXmlPayload logEntry, params object[] affectedObjects)
|
||||
{
|
||||
return Create(null, logEntry, affectedObjects);
|
||||
}
|
||||
|
||||
public static SwarmopsLogEntry Create (Person person, IXmlPayload logEntry, params object[] affectedObjects)
|
||||
{
|
||||
SwarmopsLogEntry entry = SwarmopsLog.CreateEntry (person, logEntry);
|
||||
|
||||
@@ -285,8 +285,10 @@ namespace Swarmops.Frontend.Pages.Public
|
||||
|
||||
if (organization.Parameters.ParticipationEntry == "ApplicationApproval")
|
||||
{
|
||||
// Applicant Applicant =
|
||||
// SwarmopsLog.CreateEntry(newPerson, new ApplicantAddedLogEntry(, newPerson)))
|
||||
Applicant newApplicant = Applicant.Create(newPerson, organization);
|
||||
SwarmopsLog.CreateEntry(newPerson, new ApplicantAddedLogEntry(newApplicant));
|
||||
OutboundComm.CreateParticipantNotification(newPerson, newPerson, organization,
|
||||
NotificationResource.Applicant_Signup);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user