From b77f6496b12be4e5823890c1167c7b5fdb4476f5 Mon Sep 17 00:00:00 2001 From: PerPloug Date: Mon, 6 Dec 2010 22:21:17 +0000 Subject: [PATCH] New installer files [TFS Changeset #81558] --- .../installer/InstallStepCollection.cs | 13 +- umbraco/presentation/install/css/all.css | 9 +- umbraco/presentation/install/default.aspx | 5 +- umbraco/presentation/install/default.aspx.cs | 131 ++----- .../install/default.aspx.designer.cs | 2 +- .../presentation/install/js/jquery.main.js | 93 +++-- .../steps/Skinning/loadStarterKitDesigns.ascx | 77 +--- .../Skinning/loadStarterKitDesigns.ascx.cs | 21 +- .../loadStarterKitDesigns.ascx.designer.cs | 18 +- .../steps/Skinning/loadStarterKits.ascx | 103 +++-- .../steps/Skinning/loadStarterKits.ascx.cs | 4 +- .../Skinning/loadStarterKits.ascx.designer.cs | 2 +- .../presentation/install/steps/database.ascx | 357 +++++++++++------- .../install/steps/database.ascx.cs | 97 +++-- .../install/steps/database.ascx.designer.cs | 109 +----- .../install/steps/defaultUser.ascx | 72 ++-- .../install/steps/defaultUser.ascx.cs | 80 ++-- .../steps/defaultUser.ascx.designer.cs | 71 +--- .../presentation/install/steps/license.ascx | 8 +- .../presentation/install/steps/skinning.ascx | 98 ++++- .../install/steps/skinning.ascx.designer.cs | 13 +- .../presentation/install/steps/theend.ascx | 134 ++----- .../presentation/install/steps/theend.ascx.cs | 11 +- .../install/steps/theend.ascx.designer.cs | 27 -- umbraco/presentation/install/utills/Helper.cs | 2 +- umbraco/presentation/install/utills/p.aspx | 1 + umbraco/presentation/install/utills/p.aspx.cs | 24 ++ .../install/utills/p.aspx.designer.cs | 15 + .../presentation/umbraco.presentation.csproj | 19 +- umbraco/presentation/web.STANDARD.config | 16 +- 30 files changed, 788 insertions(+), 844 deletions(-) create mode 100644 umbraco/presentation/install/utills/p.aspx create mode 100644 umbraco/presentation/install/utills/p.aspx.cs create mode 100644 umbraco/presentation/install/utills/p.aspx.designer.cs diff --git a/umbraco/cms/businesslogic/installer/InstallStepCollection.cs b/umbraco/cms/businesslogic/installer/InstallStepCollection.cs index 363875408d..f32b4d151d 100644 --- a/umbraco/cms/businesslogic/installer/InstallStepCollection.cs +++ b/umbraco/cms/businesslogic/installer/InstallStepCollection.cs @@ -26,15 +26,14 @@ namespace umbraco.cms.businesslogic.installer public InstallerStep GotoNextStep(string key) { InstallerStep s = this[key]; - bool found = false; - foreach(InstallerStep i in this.Values){ - if (found && !i.Completed()) { - return i; - } - if (i.Alias == key) - found = true; + // System.Web.HttpContext.Current.Response.Write(i.Index.ToString() + i.Alias); + + if (i.Index > s.Index && !i.Completed()) { + // System.Web.HttpContext.Current.Response.Write( "FOUND" + i.Index.ToString() + i.Alias); + return i; + } } return null; diff --git a/umbraco/presentation/install/css/all.css b/umbraco/presentation/install/css/all.css index 268ca69e66..6388c8a31d 100644 --- a/umbraco/presentation/install/css/all.css +++ b/umbraco/presentation/install/css/all.css @@ -278,6 +278,11 @@ figure{display: block;} color:#fff; font-weight:normal; } + +/* added by pph */ +.summary li {margin: 0px 0px 20px; display: block} +.summary li a{color: white; text-decoration: underline} +.blogs li a{display: block;} /* btn box */ .btn-box{ width:100%; @@ -607,8 +612,8 @@ figure{display: block;} } .add-nav ul li.add-simple em{left:166px;} .add-nav ul li.add-blog em{left:319px;} -.add-nav ul li.add-personal em{left:471px;} -.add-nav ul li.add-buisness em{left:624px;} +.add-nav ul li.add-personalsite em{left:471px;} +.add-nav ul li.add-businesswebsite em{left:624px;} .add-nav ul li.add-thanks em{left:776px;} .add-nav ul li:hover em, .add-nav ul li.hover em{background:url(../images/bul3.png) no-repeat;} diff --git a/umbraco/presentation/install/default.aspx b/umbraco/presentation/install/default.aspx index 9a79035fc7..a0e69cfc5b 100644 --- a/umbraco/presentation/install/default.aspx +++ b/umbraco/presentation/install/default.aspx @@ -31,8 +31,11 @@ + +
- + +
diff --git a/umbraco/presentation/install/default.aspx.cs b/umbraco/presentation/install/default.aspx.cs index 81022850a1..94f2f441b3 100644 --- a/umbraco/presentation/install/default.aspx.cs +++ b/umbraco/presentation/install/default.aspx.cs @@ -22,56 +22,23 @@ namespace umbraco.presentation.install { private string _installStep = ""; - public string currentStepClass = ""; + public string currentStepClass = ""; protected void Page_Load(object sender, System.EventArgs e) { - //If user wishes to subscribe to security updates - if (!string.IsNullOrEmpty(Request["email"]) && !string.IsNullOrEmpty(Request["name"])) - SubscribeToNewsLetter(Request["name"], Request["email"]); - - // use buffer, so content isn't sent until it's ready (minimizing the blank screen experience) - //Response.Buffer = true; - - rp_steps.DataSource = InstallerSteps().Values; - rp_steps.DataBind(); - + // use buffer, so content isn't sent until it's ready (minimizing the blank screen experience) + //Response.Buffer = true; + rp_steps.DataSource = InstallerSteps().Values; + rp_steps.DataBind(); } - private void SubscribeToNewsLetter(string name, string email) { - try { - System.Net.WebClient client = new System.Net.WebClient(); - NameValueCollection values = new NameValueCollection(); - values.Add("name", name); - values.Add("email", email); - - client.UploadValues("http://umbraco.org/base/Ecom/SubmitEmail/installer.aspx", values); - - } catch { /* fail in silence */ } - } - - + private void loadContent(InstallerStep currentStep) { PlaceHolderStep.Controls.Clear(); PlaceHolderStep.Controls.Add(new System.Web.UI.UserControl().LoadControl(IOHelper.ResolveUrl( currentStep.UserControl ) )); step.Value = currentStep.Alias; - currentStepClass = currentStep.Alias; - - /* - if (!currentStep.Completed() && currentStep.HideNextButtonUntillCompleted) - next.Visible = false; - else - { - next.Visible = true; - next.CommandArgument = currentStep.Alias; - next.Text = currentStep.NextButtonText; - next.OnClientClick = currentStep.NextButtonClientSideClick; - } - - lt_header.Text = currentStep.Name; currentStepClass = currentStep.Alias; - * */ } int stepCounter = 0; @@ -98,8 +65,8 @@ namespace umbraco.presentation.install public void GotoNextStep(string currentStep) { - InstallerStep _s = InstallerSteps().GotoNextStep(currentStep); - Response.Redirect("?installStep=" + _s.Alias); + InstallerStep _s = InstallerSteps().GotoNextStep(currentStep); + Response.Redirect("?installStep=" + _s.Alias); } @@ -109,35 +76,27 @@ namespace umbraco.presentation.install InitializeComponent(); base.OnInit(e); - //we might override the beginning step here - _installStep = helper.Request("installStep"); - - InstallerStep currentStep; - //if this is not an upgrade we will log in with the default user. - + _installStep = helper.Request("installStep"); + InstallerStep _s; + + //if this is not an upgrade we will log in with the default user. if (!String.IsNullOrEmpty(GlobalSettings.ConfigurationStatus.Trim())) { try { ensureContext(); } catch { Response.Redirect(SystemDirectories.Umbraco + "/logout.aspx?redir=" + Server.UrlEncode(Request.RawUrl)); } - //set the first step to upgrade. if (string.IsNullOrEmpty(_installStep)) _installStep = "upgrade"; - } - if (!string.IsNullOrEmpty(_installStep) && InstallerSteps().StepExists(_installStep)) - currentStep = InstallerSteps().Get(_installStep); - else - currentStep = InstallerSteps().FirstAvailableStep(); + if (string.IsNullOrEmpty(_installStep)) + _s = InstallerSteps()["welcome"]; + else + _s = InstallerSteps()[_installStep]; - //if the step we are loading is complete, we will continue to the next one if it's set to auto redirect - if (currentStep.Completed() && currentStep.MoveToNextStepAutomaticly) - currentStep = InstallerSteps().FirstAvailableStep(); - - loadContent(currentStep); + loadContent(_s); } /// @@ -156,58 +115,16 @@ namespace umbraco.presentation.install { InstallerStepCollection ics = new InstallerStepCollection(); ics.Add(new install.steps.Definitions.Welcome()); - ics.Add(new install.steps.Definitions.License()); + ics.Add(new install.steps.Definitions.License()); ics.Add(new install.steps.Definitions.FilePermissions()); ics.Add(new install.steps.Definitions.Database()); - ics.Add(new install.steps.Definitions.DefaultUser()); - ics.Add( new install.steps.Definitions.Skinning() ); - ics.Add(new install.steps.Definitions.WebPi()); - ics.Add(new install.steps.Definitions.TheEnd()); + ics.Add(new install.steps.Definitions.DefaultUser()); + ics.Add( new install.steps.Definitions.Skinning() ); + ics.Add(new install.steps.Definitions.WebPi()); + ics.Add(new install.steps.Definitions.TheEnd()); return ics; } -/* - protected void prepareNextButton() - { - switch (step.Value) - { - case "welcome": case "upgrade": - step.Value = "license"; - loadContent(); - break; - case "license": - step.Value = "detect"; - loadContent(); - break; - case "detect": - // upgrade! - if (!String.IsNullOrEmpty(GlobalSettings.ConfigurationStatus.Trim())) - step.Value = "renaming"; - else - step.Value = "validatePermissions"; - loadContent(); - break; - case "upgradeIndex": - step.Value = "validatePermissions"; - loadContent(); - break; - case "renaming" : - step.Value = "validatePermissions"; - loadContent(); - break; - case "validatePermissions": - step.Value = "defaultUser"; - loadContent(); - break; - case "defaultUser": - step.Value = "boost"; - loadContent(); - break; -// case "theend": -// Response.Redirect("http://umbraco.org/redir/getting-started", true); -// break; - default: - break; - } - }*/ + + } } diff --git a/umbraco/presentation/install/default.aspx.designer.cs b/umbraco/presentation/install/default.aspx.designer.cs index d6c943d42d..17d01d40e4 100644 --- a/umbraco/presentation/install/default.aspx.designer.cs +++ b/umbraco/presentation/install/default.aspx.designer.cs @@ -37,6 +37,6 @@ namespace umbraco.presentation.install { /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.HtmlControls.HtmlInputHidden step; + public global::System.Web.UI.HtmlControls.HtmlInputHidden step; } } diff --git a/umbraco/presentation/install/js/jquery.main.js b/umbraco/presentation/install/js/jquery.main.js index 75facc8e89..04ebdb648e 100644 --- a/umbraco/presentation/install/js/jquery.main.js +++ b/umbraco/presentation/install/js/jquery.main.js @@ -84,38 +84,69 @@ function initStep(){ }) } function initTabs(){ - jQuery('.database-hold').each(function(){ - var _list = $(this); - var _links = _list.find('a.database-tab'); - var _select = _list.find('.sel'); - _select.each(function(){ - var select = $(this); - var selectVal = select.val() - jQuery('#database-step1-2').hide(); - select.change(function(){ - selectValNew = jQuery(this).val(); - if(selectVal != selectValNew ) jQuery('#database-step1-2').show(); - else jQuery('#database-step1-2').hide(); - }) - }) - _links.each(function() { - var _link = $(this); - var _href = _link.attr('href'); - var _tab = jQuery(_href); - if(_link.hasClass('active')) _tab.show(); - else _tab.hide(); - _link.click(function(){ - _links.filter('.active').each(function(){ - jQuery(jQuery(this).removeClass('active').attr('href')).hide(); - }); - _link.addClass('active'); - _tab.show(); - jQuery('#database-step1-2').hide(); - return false; - }); - }); - }); + jQuery('.database-hold').each(function () { + var _list = $(this); + var _links = _list.find('a.database-tab'); + var _select = _list.find('.sel'); + + + + _select.each(function () { + var select = $(this); + var selectVal = select.val() + + jQuery('#database-step1-2').hide(); + + if (configured) + toggleDatabaseOption(selectVal); + + select.change(function () { + selectValNew = jQuery(this).val(); + + if (selectVal != selectValNew) jQuery('#database-step1-2').show(); + else jQuery('#database-step1-2').hide(); + + toggleDatabaseOption(selectValNew); + + }) + }) + _links.each(function () { + var _link = $(this); + var _href = _link.attr('href'); + var _tab = jQuery(_href); + if (_link.hasClass('active')) _tab.show(); + else _tab.hide(); + _link.click(function () { + _links.filter('.active').each(function () { + jQuery(jQuery(this).removeClass('active').attr('href')).hide(); + }); + _link.addClass('active'); + _tab.show(); + jQuery('#database-step1-2').hide(); + return false; + }); + }); + }); } + +function toggleDatabaseOption(selectValNew) { + if (selectValNew != '') { + + jQuery('#database-step1').show(); + jQuery('#database-step1-2').show(); + + //hide all db options + jQuery('#database-step1-2 .row').hide(); + + if (selectValNew == 'SqlServer' || selectValNew == 'MySql') + jQuery('#database-step1-2 .sql').show(); + else if (selectValNew == 'Custom') + jQuery('#database-step1-2 .custom').show(); + else if (selectValNew.indexOf('SQLCE4Umbraco') > -1 && !hasEmbeddedDlls) + jQuery('#database-step1-2 .embedded').show(); + } +} + function initSingleTab(){ jQuery('a.single-tab').each(function(){ var _links = jQuery(this); diff --git a/umbraco/presentation/install/steps/Skinning/loadStarterKitDesigns.ascx b/umbraco/presentation/install/steps/Skinning/loadStarterKitDesigns.ascx index d6f7ed92bc..1e5ff30bf0 100644 --- a/umbraco/presentation/install/steps/Skinning/loadStarterKitDesigns.ascx +++ b/umbraco/presentation/install/steps/Skinning/loadStarterKitDesigns.ascx @@ -1,80 +1,31 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="loadStarterKitDesigns.ascx.cs" Inherits="umbraco.presentation.install.steps.Skinning.loadStarterKitDesigns" %> <%@ Import Namespace="umbraco.cms.businesslogic.packager.repositories" %> + +

Starter kit and skin have been installed

- -
- - - - - -
- -
    - - -
  • - - - - <%# ((Skin)Container.DataItem).Text %> - - <%# ((Skin)Container.DataItem).Text %> - - - - -
    <%# ((Skin)Container.DataItem).Description %>
    - -
  • -
    - + + +
+
-
Click a skin icon above to install it
- - I prefer not to install a skin - - + +
Pages:
- - - -
\ No newline at end of file +
\ No newline at end of file diff --git a/umbraco/presentation/install/steps/Skinning/loadStarterKitDesigns.ascx.cs b/umbraco/presentation/install/steps/Skinning/loadStarterKitDesigns.ascx.cs index b997e9a79b..2d66b1e232 100644 --- a/umbraco/presentation/install/steps/Skinning/loadStarterKitDesigns.ascx.cs +++ b/umbraco/presentation/install/steps/Skinning/loadStarterKitDesigns.ascx.cs @@ -25,11 +25,7 @@ namespace umbraco.presentation.install.steps.Skinning } - protected void NextStep(object sender, EventArgs e) - { - _default p = (_default)this.Page; - p.GotoNextStep(helper.Request("installStep")); - } + protected override void OnInit(EventArgs e) { @@ -101,26 +97,17 @@ namespace umbraco.presentation.install.steps.Skinning } } catch{ - _default pa = (_default)this.Page; pa.GotoNextStep(helper.Request("installStep")); } - - //((skinning)Parent.Parent.Parent).showCustomizeSkin(); - - pl_CustomizeSkin.Visible = true; - pl_loadStarterKitDesigns.Visible = false; - - if(Page.FindControl("next") != null) - Page.FindControl("next").Visible = true; - + + _default page = (_default)this.Page; + page.GotoNextStep(helper.Request("installStep")); } else { ShowConnectionError(); } - - } } } \ No newline at end of file diff --git a/umbraco/presentation/install/steps/Skinning/loadStarterKitDesigns.ascx.designer.cs b/umbraco/presentation/install/steps/Skinning/loadStarterKitDesigns.ascx.designer.cs index 86d7991989..173e8b04f7 100644 --- a/umbraco/presentation/install/steps/Skinning/loadStarterKitDesigns.ascx.designer.cs +++ b/umbraco/presentation/install/steps/Skinning/loadStarterKitDesigns.ascx.designer.cs @@ -12,6 +12,15 @@ namespace umbraco.presentation.install.steps.Skinning { public partial class loadStarterKitDesigns { + /// + /// pl_loadStarterKitDesigns control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.PlaceHolder pl_loadStarterKitDesigns; + /// /// pl_CustomizeSkin control. /// @@ -21,15 +30,6 @@ namespace umbraco.presentation.install.steps.Skinning { /// protected global::System.Web.UI.WebControls.Panel pl_CustomizeSkin; - /// - /// pl_loadStarterKitDesigns control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Panel pl_loadStarterKitDesigns; - /// /// rep_starterKitDesigns control. /// diff --git a/umbraco/presentation/install/steps/Skinning/loadStarterKits.ascx b/umbraco/presentation/install/steps/Skinning/loadStarterKits.ascx index 73521f8adf..1a236f4f21 100644 --- a/umbraco/presentation/install/steps/Skinning/loadStarterKits.ascx +++ b/umbraco/presentation/install/steps/Skinning/loadStarterKits.ascx @@ -1,66 +1,55 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="loadStarterKits.ascx.cs" Inherits="umbraco.presentation.install.steps.Skinning.loadStarterKits" %> <%@ Import Namespace="umbraco.cms.businesslogic.packager.repositories" %> - - - - - - -
+ - -
    - - -
  • - - - <%# ((Package)Container.DataItem).Text %> - - <%# ((Package)Container.DataItem).Text %> + +
  • -
    Click a starterkit icon above to install it
    - - I prefer not to install a starter kit - - +
+ +
-
- - - - -
\ No newline at end of file + \ No newline at end of file diff --git a/umbraco/presentation/install/steps/Skinning/loadStarterKits.ascx.cs b/umbraco/presentation/install/steps/Skinning/loadStarterKits.ascx.cs index 1ddcac1389..8c71595876 100644 --- a/umbraco/presentation/install/steps/Skinning/loadStarterKits.ascx.cs +++ b/umbraco/presentation/install/steps/Skinning/loadStarterKits.ascx.cs @@ -61,7 +61,7 @@ namespace umbraco.presentation.install.steps.Skinning uicontrols.Feedback fb = new global::umbraco.uicontrols.Feedback(); fb.type = global::umbraco.uicontrols.Feedback.feedbacktype.error; fb.Text = "No connection to repository. Starter Kits could not be fetched from the repository as there was no connection to: '" + repo.RepositoryUrl + "'"; - + pl_loadStarterKits.Controls.Clear(); pl_loadStarterKits.Controls.Add(fb); } @@ -86,7 +86,7 @@ namespace umbraco.presentation.install.steps.Skinning library.RefreshContent(); - ((skinning)Parent.Parent.Parent).showStarterKitDesigns(kitGuid); + ((skinning)Parent.Parent.Parent.Parent.Parent).showStarterKitDesigns(kitGuid); } else diff --git a/umbraco/presentation/install/steps/Skinning/loadStarterKits.ascx.designer.cs b/umbraco/presentation/install/steps/Skinning/loadStarterKits.ascx.designer.cs index 80774b2c8a..0baff2140d 100644 --- a/umbraco/presentation/install/steps/Skinning/loadStarterKits.ascx.designer.cs +++ b/umbraco/presentation/install/steps/Skinning/loadStarterKits.ascx.designer.cs @@ -19,7 +19,7 @@ namespace umbraco.presentation.install.steps.Skinning { /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Panel pl_loadStarterKits; + protected global::System.Web.UI.WebControls.PlaceHolder pl_loadStarterKits; /// /// rep_starterKits control. diff --git a/umbraco/presentation/install/steps/database.ascx b/umbraco/presentation/install/steps/database.ascx index 982329bda6..995c90f9e0 100644 --- a/umbraco/presentation/install/steps/database.ascx +++ b/umbraco/presentation/install/steps/database.ascx @@ -2,142 +2,241 @@ TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %> - -
-

- To complete this step, you must know some information regarding your database server - ("connection string").
- Please contact your ISP if necessary. If you're installing on a local machine or - server you might need information from your system administrator.

-

- If you do not have any database available, you can choose the embedded - database which does not require any information from your ISP or system administrators, - and will install right away. -

-
-

-

- -
-

- SQL CE 4 requires that you manually add the SQL CE 4 runtime to your Umbraco installation.
- More instructions. -

-

- You can either follow the instructions above to add SQL CE 4 or choose another database. -

-
-
+ + +
+
+

+ Database configuration

+

+ To complete this step, you must know some information regarding your database server + (”connection string”). Please contact your ISP if necessary. If you’re installingon + a local machine or server you might need information from your system administrator.

+

+ If you do not have any database available, you can choose the embedded + database which does not require any information from you ISP or system administrators.

+
+ +
+ +
+
+
+

+ 1. Do you have a blank database already installed?

+ +
+
-
    -
  1. - Type: - - - - - - -
  2. -
  3. - Server: - -
  4. -
  5. - Database name: - -
  6. -
  7. - Username: - -
  8. -
  9. - Password: - -
  10. -
  11. - Connection string: - + +
    +
    +
    +

    + 2. Now choose your database type below.

    +
    + + + + + + + +
    +
    +
    +
    + + +
    +
    +
    +

    + 3. INSTRUCTIONS: Please fill out the below fields to connect to + your database.

    +
    + + +
    + Server: + + +
    + +
    + Database name: + + +
    + +
    + Username: + + +
    + +
    + Password: + + +
    + +
    + Connection string: + + +

    + Example: datalayer=MySQL;server=192.168.2.8;user id=user;password=***;database=umbraco

    +
    +
    +
    + +
    +
     
    + install +
    +
    +
    + + + +
    +
    +

    + 2. Nodio dignissimos ducimus qui blanditiis praesentium.
    + Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque + laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi + architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas + sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione + voluptatem sequi nesciunt: +

    + www.link.com +
    +
    +
+ +
+
+ + + +
+ + + +

+ Database connection succeeded +

+ + + +

Database installed

+

Your current database is up-to-date!. Click Continue to continue the configuration wizard

- Example: datalayer=MySQL;server=192.168.2.8;user id=user;password=***;database=umbraco

- - -

- -

-
- -

- Database connection succeeded. Next step is adding umbraco tables - - -

- -

Your current database is up-to-date!. Click next to continue the configuration wizard

-
- -
-

- Press the upgrade button to upgrade your database to Umbraco - <%=umbraco.GlobalSettings.CurrentVersion%>

-

- Don't worry - no content will be deleted and everything will continue working afterwards! + No action was needed, as your database was fully up-to-date.

-
-
- -
-

- Press the install button to install the Umbraco - <%=umbraco.GlobalSettings.CurrentVersion%> - database

-
-
+
+
 
+ Continue +
- -
-

Database not found! Please check that the information in the "connection string" of the “web.config” file is correct.

-

To proceed, please edit the "web.config" file (using Visual Studio or your favourite text editor), scroll to the bottom, add the connection string for your database in the key named "umbracoDbDSN" and save the file.

-

-Click the retry button when -done.
- More information on editing web.config here.

-
-
+ + + +

+ Press the install button to upgrade your database to Umbraco + <%=umbraco.GlobalSettings.CurrentVersion%>

+

+ Don't worry - no content will be deleted and everything will continue working afterwards! +

+ +
+
 
+ >Install +
+
-
- - + +

+ Press the install button to install the Umbraco + <%=umbraco.GlobalSettings.CurrentVersion%> + database

+ +
+
 
+ Install +
+
+ + + +

Database not found! Please check that the information in the "connection string" of the “web.config” file is correct.

+

To proceed, please edit the "web.config" file (using Visual Studio or your favourite text editor), scroll to the bottom, add the connection string for your database in the key named "umbracoDbDSN" and save the file.

+

+ Click the retry button when + done.
+ More information on editing web.config here.

+ + +
+
 
+ retry +
+
+ + + +
+ + + + +

Database installed

+ +
+

+ Umbraco + <%=umbraco.GlobalSettings.CurrentVersion%> + has now been copied to your database. Press Continue to proceed.

+
+ +
+ + +

Database upgraded

+
+

+ Your database has been upgraded to the final version + <%=umbraco.GlobalSettings.CurrentVersion%>.
+ Press Continue to proceed. +

+
+
+ + +
+
 
+ Continue +
+
- - - - - -
-

- Umbraco - <%=umbraco.GlobalSettings.CurrentVersion%> - has now been copied to your database. Press Next to proceed.

-
-
- -
-

- Your database has been upgraded to the final version - <%=umbraco.GlobalSettings.CurrentVersion%>.
- Press Next to proceed. -

-
-
-
diff --git a/umbraco/presentation/install/steps/database.ascx.cs b/umbraco/presentation/install/steps/database.ascx.cs index 2d82f94401..3d26de0466 100644 --- a/umbraco/presentation/install/steps/database.ascx.cs +++ b/umbraco/presentation/install/steps/database.ascx.cs @@ -48,12 +48,31 @@ namespace umbraco.presentation.install.steps get { return DatabaseType.SelectedValue.ToLower().Contains("sqlce"); } } + protected bool IsConfigured + { + get { return DatabaseType.SelectedValue != ""; } + } + + /// + /// Returns whether the selected database is an embedded database. + /// + protected bool HasEmbeddedDatabaseFiles + { + get { + // check if sql ce is present + if (!File.Exists(IOHelper.MapPath(Path.Combine(IOHelper.ResolveUrl(SystemDirectories.Bin), "System.Data.SqlServerCe.dll")))) + return false; + else + return true; + } + } + /// /// Returns whether the connection string is set by direct text input. /// protected bool ManualConnectionString { - get { return DatabaseType.SelectedItem.Value.Length == 0; } + get { return DatabaseType.SelectedItem.Value == "Custom"; } } /// @@ -63,9 +82,6 @@ namespace umbraco.presentation.install.steps /// The event arguments. protected void Page_Load(object sender, System.EventArgs e) { - // Disable back/forward buttons - Page.FindControl("next").Visible = false; - // Does the user have to enter a connection string? if (settings.Visible) ShowDatabaseSettings(); @@ -78,12 +94,9 @@ namespace umbraco.presentation.install.steps /// protected void ShowDatabaseSettings() { - // Did the connection string of web.config get loaded? if (!Page.IsPostBack) { - - // Parse the connection string DbConnectionStringBuilder connectionStringBuilder = new DbConnectionStringBuilder(); connectionStringBuilder.ConnectionString = GlobalSettings.DbDSN; @@ -110,6 +123,15 @@ namespace umbraco.presentation.install.steps DatabaseUsername.Text = GetConnectionStringValue(connectionStringBuilder, "user id"); DatabasePassword.Text = GetConnectionStringValue(connectionStringBuilder, "password"); if (string.IsNullOrEmpty(DatabasePassword.Text)) DatabasePassword.Text = GetConnectionStringValue(connectionStringBuilder, "pwd"); + + + toggleVisible(DatabaseServerItem, !ManualConnectionString && !IsEmbeddedDatabase); + toggleVisible(DatabaseUsernameItem, !ManualConnectionString && !IsEmbeddedDatabase); + toggleVisible(DatabasePasswordItem, !ManualConnectionString && !IsEmbeddedDatabase); + toggleVisible(DatabaseNameItem, !ManualConnectionString && !IsEmbeddedDatabase); + + toggleVisible(DatabaseConnectionString, ManualConnectionString); + } // Make sure ASP.Net displays the password text @@ -126,36 +148,34 @@ namespace umbraco.presentation.install.steps if (Installer.CurrentVersion == DatabaseVersion.None) { dbEmpty.Visible = true; - dbUpgrade.Visible = false; + //dbUpgrade.Visible = false; } else { - version.Text = Installer.CurrentVersion.ToString(); + //version.Text = Installer.CurrentVersion.ToString(); } + if (Installer.IsLatestVersion) { - settings.Visible = false; installed.Visible = true; // Enable back/forward buttons - Page.FindControl("next").Visible = true; - } else { if (Installer.CanUpgrade) { - upgrade.Visible = true; + //upgrade.Visible = true; other.Visible = true; } else if (Installer.IsEmpty) { - install.Visible = true; + //install.Visible = true; none.Visible = true; } else { - retry.Visible = true; + // retry.Visible = true; error.Visible = true; } } @@ -206,7 +226,7 @@ namespace umbraco.presentation.install.steps } else { - DatabaseError.InnerText = String.Format("{0} {1}", error.Message, error.InnerException.Message); + //DatabaseError.InnerText = String.Format("{0} {1}", error.Message, error.InnerException.Message); } } @@ -260,35 +280,30 @@ namespace umbraco.presentation.install.steps /// The event arguments. protected void DatabaseType_SelectedIndexChanged(object sender, EventArgs e) { - // check if sql ce is present - if (DatabaseType.SelectedValue == "SQLCE4Umbraco.SqlCEHelper,SQLCE4Umbraco") - { - if (!File.Exists(IOHelper.MapPath(Path.Combine(IOHelper.ResolveUrl(SystemDirectories.Bin), "System.Data.SqlServerCe.dll")))) - { - sqlCeNotice.Visible = true; - } - } - - - DatabaseServerItem.Visible = !ManualConnectionString && !IsEmbeddedDatabase; - DatabaseUsernameItem.Visible = !ManualConnectionString && !IsEmbeddedDatabase; - DatabasePasswordItem.Visible = !ManualConnectionString && !IsEmbeddedDatabase; - DatabaseNameItem.Visible = !ManualConnectionString && !IsEmbeddedDatabase; + toggleVisible(DatabaseServerItem, !ManualConnectionString && !IsEmbeddedDatabase); + toggleVisible(DatabaseUsernameItem, !ManualConnectionString && !IsEmbeddedDatabase); + toggleVisible(DatabasePasswordItem, !ManualConnectionString && !IsEmbeddedDatabase); + toggleVisible(DatabaseNameItem, !ManualConnectionString && !IsEmbeddedDatabase); - DatabaseConnectionString.Visible = ManualConnectionString; + toggleVisible(DatabaseConnectionString, ManualConnectionString); + } + + private void toggleVisible(HtmlGenericControl div, bool visible) + { + if (!visible) + div.Attributes["style"] = "display: none;"; + else + div.Attributes["style"] = "display: block;"; } protected void upgrade_Click(object sender, System.EventArgs e) { Installer.Install(); - Response.Redirect("default.aspx?installStep=defaultUser", true); - - ((HtmlInputHidden)Page.FindControl("step")).Value = "upgradeIndex"; ((Button)Page.FindControl("next")).Visible = true; settings.Visible = false; - upgrade.Visible = false; + //upgrade.Visible = false; identify.Visible = false; confirms.Visible = true; upgradeConfirm.Visible = true; @@ -298,19 +313,21 @@ namespace umbraco.presentation.install.steps { Installer.Install(); - ((HtmlInputHidden)Page.FindControl("step")).Value = "validatePermissions"; - ((Button)Page.FindControl("next")).Visible = true; - + settings.Visible = false; - install.Visible = false; + //install.Visible = false; identify.Visible = false; confirms.Visible = true; installConfirm.Visible = true; //after the database install we will login the default admin user so we can install boost and nitros later on - if (GlobalSettings.ConfigurationStatus.Trim() == "") BasePages.UmbracoEnsuredPage.doLogin(new global::umbraco.BusinessLogic.User(0)); } + + protected void gotoNextStep(object sender, EventArgs e) + { + Helper.RedirectToNextStep(this.Page); + } } } \ No newline at end of file diff --git a/umbraco/presentation/install/steps/database.ascx.designer.cs b/umbraco/presentation/install/steps/database.ascx.designer.cs index d1abb98064..0fdf906715 100644 --- a/umbraco/presentation/install/steps/database.ascx.designer.cs +++ b/umbraco/presentation/install/steps/database.ascx.designer.cs @@ -19,52 +19,7 @@ namespace umbraco.presentation.install.steps { /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Panel settings; - - /// - /// div_info control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl div_info; - - /// - /// DatabaseError control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl DatabaseError; - - /// - /// sqlCeNotice control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.PlaceHolder sqlCeNotice; - - /// - /// DatabaseTypeItem control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl DatabaseTypeItem; - - /// - /// DatabaseTypeLabel control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label DatabaseTypeLabel; + protected global::System.Web.UI.WebControls.PlaceHolder settings; /// /// DatabaseType control. @@ -75,6 +30,15 @@ namespace umbraco.presentation.install.steps { /// protected global::System.Web.UI.WebControls.DropDownList DatabaseType; + /// + /// embeddedFilesMissing control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl embeddedFilesMissing; + /// /// DatabaseServerItem control. /// @@ -211,13 +175,13 @@ namespace umbraco.presentation.install.steps { protected global::System.Web.UI.WebControls.TextBox ConnectionString; /// - /// DatabaseConnectButton control. + /// jsVars control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Button DatabaseConnectButton; + protected global::System.Web.UI.WebControls.Literal jsVars; /// /// identify control. @@ -237,24 +201,6 @@ namespace umbraco.presentation.install.steps { /// protected global::System.Web.UI.WebControls.Literal dbEmpty; - /// - /// dbUpgrade control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.PlaceHolder dbUpgrade; - - /// - /// version control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal version; - /// /// installed control. /// @@ -262,7 +208,7 @@ namespace umbraco.presentation.install.steps { /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Literal installed; + protected global::System.Web.UI.WebControls.PlaceHolder installed; /// /// other control. @@ -289,34 +235,7 @@ namespace umbraco.presentation.install.steps { /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Literal error; - - /// - /// upgrade control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button upgrade; - - /// - /// install control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button install; - - /// - /// retry control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button retry; + protected global::System.Web.UI.WebControls.PlaceHolder error; /// /// confirms control. diff --git a/umbraco/presentation/install/steps/defaultUser.ascx b/umbraco/presentation/install/steps/defaultUser.ascx index 19cd6b287a..791c73c873 100644 --- a/umbraco/presentation/install/steps/defaultUser.ascx +++ b/umbraco/presentation/install/steps/defaultUser.ascx @@ -1,47 +1,39 @@ <%@ Control Language="c#" AutoEventWireup="True" Codebehind="defaultUser.ascx.cs" Inherits="umbraco.presentation.install.steps.defaultUser" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%> - -

- Please configure the password for the default umbraco administrator. -

+ - - -
- - - -
    -
  1. - User name: admin -
  2. -
  3. - Enter new password: - - * -
  4. -
  5. - Confirm password: - - * - * -
  6. -
- -

- -

- -
- - -

The password is changed!

-
+ +
+
+

Create User

+

You can now setup a new user to log into Umbraco. Please make a note of this password.

You will be able to change this once you have set the system up and logged in to the admin interface.

+
+
+
+
+
+
+
+ Name: Validaing text here
+
Email: Validaing text here
+
Username: Validaing text here
+
Password: Invalidaing text here +
+
+ Confirm Password: Invalidaing text here +
+
Sign up for our monthly newsletter +
+
+
+
 
Create user
+
+
+
+
+ diff --git a/umbraco/presentation/install/steps/defaultUser.ascx.cs b/umbraco/presentation/install/steps/defaultUser.ascx.cs index e0c0d1f299..123370e719 100644 --- a/umbraco/presentation/install/steps/defaultUser.ascx.cs +++ b/umbraco/presentation/install/steps/defaultUser.ascx.cs @@ -6,7 +6,9 @@ using System.Web; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using System.Web.Security; -using umbraco.BusinessLogic; +using umbraco.BusinessLogic; +using umbraco.providers; +using System.Collections.Specialized; #endregion namespace umbraco.presentation.install.steps @@ -19,23 +21,7 @@ namespace umbraco.presentation.install.steps protected void Page_Load(object sender, System.EventArgs e) { - BusinessLogic.User u = BusinessLogic.User.GetUser(0); - - if (u.NoConsole || u.Disabled) - { - identifyResult.Text = "

The Default user has been disabled or has no access to umbraco!

No further actions needs to be taken. Click Next to proceed.

"; - Page.FindControl("next").Visible = true; - } - else if (u.GetPassword() != "default") - { - identifyResult.Text = "

The Default user's password has been successfully changed since the installation!

No further actions needs to be taken. Click Next to proceed.

"; - Page.FindControl("next").Visible = true; - } - else - { - identifyResult.Text = "

The Default users’ password needs to be changed!

"; - changeForm.Visible = true; - } + } #region Web Form Designer generated code @@ -64,13 +50,61 @@ namespace umbraco.presentation.install.steps { User u = User.GetUser(0); MembershipUser user = Membership.Providers[UmbracoSettings.DefaultBackofficeProvider].GetUser(0, true); - user.ChangePassword(u.GetPassword(), password.Text.Trim()); + user.ChangePassword(u.GetPassword(), tb_password.Text.Trim()); - passwordChanged.Visible = true; - identify.Visible = false; - changeForm.Visible = false; - Page.FindControl("next").Visible = true; + u.LoginName = tb_login.Text; + + // Is it using the default membership provider + if (Membership.Providers[UmbracoSettings.DefaultBackofficeProvider] is UsersMembershipProvider) + { + // Save user in membership provider + UsersMembershipUser umbracoUser = user as UsersMembershipUser; + umbracoUser.FullName = tb_name.Text.Trim(); + Membership.Providers[UmbracoSettings.DefaultBackofficeProvider].UpdateUser(umbracoUser); + + // Save user details + u.Email = tb_email.Text.Trim(); + } + else + { + u.Name = tb_name.Text.Trim(); + if (!(Membership.Providers[UmbracoSettings.DefaultBackofficeProvider] is ActiveDirectoryMembershipProvider)) Membership.Providers[UmbracoSettings.DefaultBackofficeProvider].UpdateUser(user); + } + + u.Save(); + + if (cb_newsletter.Checked) + { + try + { + System.Net.WebClient client = new System.Net.WebClient(); + NameValueCollection values = new NameValueCollection(); + values.Add("name", tb_name.Text); + values.Add("email", tb_email.Text); + + client.UploadValues("http://umbraco.org/base/Ecom/SubmitEmail/installer.aspx", values); + + } + catch { /* fail in silence */ } + } + + Helper.RedirectToNextStep(this.Page); } } + + private void SubscribeToNewsLetter(string name, string email) + { + try + { + System.Net.WebClient client = new System.Net.WebClient(); + NameValueCollection values = new NameValueCollection(); + values.Add("name", name); + values.Add("email", email); + + client.UploadValues("http://umbraco.org/base/Ecom/SubmitEmail/installer.aspx", values); + + } + catch { /* fail in silence */ } + } } } diff --git a/umbraco/presentation/install/steps/defaultUser.ascx.designer.cs b/umbraco/presentation/install/steps/defaultUser.ascx.designer.cs index 74a8cdf941..4683493a13 100644 --- a/umbraco/presentation/install/steps/defaultUser.ascx.designer.cs +++ b/umbraco/presentation/install/steps/defaultUser.ascx.designer.cs @@ -19,105 +19,60 @@ namespace umbraco.presentation.install.steps { /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Panel identify; + protected global::System.Web.UI.WebControls.PlaceHolder identify; /// - /// identifyResult control. + /// tb_name control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Literal identifyResult; + protected global::System.Web.UI.WebControls.TextBox tb_name; /// - /// changeForm control. + /// tb_email control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Panel changeForm; + protected global::System.Web.UI.WebControls.TextBox tb_email; /// - /// Label1 control. + /// tb_login control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label Label1; + protected global::System.Web.UI.WebControls.TextBox tb_login; /// - /// passwordLabel control. + /// tb_password control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label passwordLabel; + protected global::System.Web.UI.WebControls.TextBox tb_password; /// - /// password control. + /// tb_password_confirm control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.TextBox password; + protected global::System.Web.UI.WebControls.TextBox tb_password_confirm; /// - /// passwordvalidator control. + /// cb_newsletter control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RequiredFieldValidator passwordvalidator; - - /// - /// confirmpasswordlabel control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label confirmpasswordlabel; - - /// - /// confirmpassword control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox confirmpassword; - - /// - /// confirmpasswordvalidator control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.RequiredFieldValidator confirmpasswordvalidator; - - /// - /// changePassword control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button changePassword; - - /// - /// passwordChanged control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Panel passwordChanged; + protected global::System.Web.UI.WebControls.CheckBox cb_newsletter; } } diff --git a/umbraco/presentation/install/steps/license.ascx b/umbraco/presentation/install/steps/license.ascx index 143fea2f5b..0183480cb0 100644 --- a/umbraco/presentation/install/steps/license.ascx +++ b/umbraco/presentation/install/steps/license.ascx @@ -2,19 +2,19 @@
-

Licence

+

License

Accept the licence for Umbraco CMS

-

By clicking the next button (or modifying the Umbraco Configuration Status in web config), you accept the licence for this software as specidied in the text below.

+

By clicking the accept button (or modify the Umbraco Configuration Status in web.config), you accept the licence for this software as specified in the text below.

-

The Licence (MIT):

+

The License (MIT):

Copyright (c) 2002 - <%=DateTime.Now.Year %> Umbraco I/S

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright and this permisson notice shall be included in all copies or substantial postions of the software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRENTY OF ANY KIND, EPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USER OR OTHER DEALINGS IN THE SOFTWARE.

-

That’s all. That didn’t hert did it?

+

That’s all. That didn’t hurt did it?