This is the organization's custom welcome text. It has not yet been written; it is set in Admin / Org Settings.
Creating the first user
diff --git a/Site5/Pages/v5/Public/Signup.aspx.cs b/Site5/Pages/v5/Public/Signup.aspx.cs
index 335079e7..afb2f2d2 100644
--- a/Site5/Pages/v5/Public/Signup.aspx.cs
+++ b/Site5/Pages/v5/Public/Signup.aspx.cs
@@ -4,7 +4,10 @@ using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
+using Resources;
+using Swarmops.Logic.Security;
using Swarmops.Logic.Structure;
+using Swarmops.Logic.Swarm;
namespace Swarmops.Frontend.Pages.Public
{
@@ -24,8 +27,81 @@ namespace Swarmops.Frontend.Pages.Public
{
throw new ArgumentException("Organization not specified"); // TODO: make a friendly landing page instead
}
+
+
+ // Override style widths - (this will cause problems with a future responsive design; come back here to fix that)
+
+ this.DropCountries.Style[HtmlTextWriterStyle.Width] = "162px";
+
+ /*
+ this.BoxTitle.Text = PageTitle = String.Format(Resources.Pages.Swarm.AddPerson_Title,
+ Participant.Localized(CurrentOrganization.RegularLabel));
+ InfoBoxLiteral = String.Format(Resources.Pages.Swarm.AddPerson_Info, Global.Timespan_OneYear,
+ Participant.Localized(CurrentOrganization.RegularLabel, TitleVariant.Ship),
+ DateTime.Today.AddYears(1).ToLongDateString());*/
+
+ if (!Page.IsPostBack)
+ {
+ Localize();
+ Populate();
+
+ this.TextName.Focus();
+ }
+
}
+ private void Populate()
+ {
+ Countries allCountries = Countries.All;
+ this.DropCountries.Items.Clear();
+
+ foreach (Country country in allCountries)
+ {
+ string countryLocalName = country.Localized;
+ string countryDisplay = country.Code + " " + countryLocalName;
+ this.DropCountries.Items.Add (new ListItem (countryDisplay, country.Code));
+ }
+
+ if (this.Organization.DefaultCountry != null)
+ {
+ this.DropCountries.SelectedValue = this.Organization.DefaultCountry.Code;
+ }
+
+ this.DropGenders.Items.Clear();
+ this.DropGenders.Items.Add (new ListItem (Global.Global_UnknownUndisclosed, "Unknown"));
+ this.DropGenders.Items.Add (new ListItem (Global.Global_Female, "Female"));
+ this.DropGenders.Items.Add (new ListItem (Global.Global_Male, "Male"));
+ }
+
+ private void Localize()
+ {
+ this.LiteralErrorCity.Text = Resources.Pages.Swarm.AddPerson_ErrorCity;
+ this.LiteralErrorMail.Text = Resources.Pages.Swarm.AddPerson_ErrorMail;
+ this.LiteralErrorName.Text = Resources.Pages.Swarm.AddPerson_ErrorName;
+ this.LiteralErrorStreet.Text = Resources.Pages.Swarm.AddPerson_ErrorStreet;
+ this.LiteralErrorDate.Text = Resources.Pages.Swarm.AddPerson_ErrorDate;
+
+ this.LabelName.Text = Resources.Global.Global_Name;
+ this.LabelCountry.Text = Resources.Global.Global_Country;
+ this.LabelMail.Text = Resources.Global.Global_Mail;
+ this.LabelPhone.Text = Resources.Global.Global_Phone;
+ this.LabelStreet1.Text = Resources.Pages.Swarm.AddPerson_Street1PO;
+ this.LabelStreet2.Text = Resources.Pages.Swarm.AddPerson_Street2;
+ this.LabelPostalCode.Text = Resources.Global.Global_PostalCode;
+ this.LabelCity.Text = Resources.Global.Global_City;
+ this.LabelGeographyDetected.Text = Resources.Pages.Swarm.AddPerson_GeographyDetected;
+ this.LabelDateOfBirth.Text = Resources.Global.Global_DateOfBirth;
+ this.LabelLegalGender.Text = Resources.Pages.Swarm.AddPerson_LegalGender;
+
+ this.TextDateOfBirth.Attributes["placeholder"] = Global.Global_DateFormatShortReadable;
+ this.TextName.Attributes["placeholder"] = "Joe Smith";
+ this.TextMail.Attributes["placeholder"] = "joe@example.com";
+ this.TextPhone.Attributes["placeholder"] = "+1 263 151 1341";
+ this.TextStreet1.Attributes["placeholder"] = "78 West Avenue";
+ this.TextPostal.Attributes["placeholder"] = "12345";
+ }
+
+
protected Organization Organization;
}
}
\ No newline at end of file
diff --git a/Site5/Pages/v5/Swarm/AddPerson.aspx b/Site5/Pages/v5/Swarm/AddPerson.aspx
index b848f2f2..4f82aeca 100644
--- a/Site5/Pages/v5/Swarm/AddPerson.aspx
+++ b/Site5/Pages/v5/Swarm/AddPerson.aspx
@@ -3,17 +3,17 @@
+