Merge remote-tracking branch 'origin/6.2.0' into 7.0.0
Conflicts: .gitignore build/Build.bat src/Umbraco.Core/Configuration/UmbracoVersion.cs src/Umbraco.Core/Models/PropertyExtensions.cs src/Umbraco.Core/TypeFinder.cs src/Umbraco.Web.UI/Umbraco.Web.UI.csproj src/Umbraco.Web.UI/config/ClientDependency.config src/Umbraco.Web/Umbraco.Web.csproj src/Umbraco.Web/UmbracoContext.cs
This commit is contained in:
@@ -2163,6 +2163,8 @@
|
||||
<Content Include="Umbraco\PartialViews\Templates\Login.cshtml" />
|
||||
<Content Include="Umbraco\PartialViews\Templates\EmptyTemplate.cshtml" />
|
||||
<Content Include="Umbraco\PartialViews\Templates\RegisterMember.cshtml" />
|
||||
<Content Include="Umbraco\PartialViews\Templates\LoginStatus.cshtml" />
|
||||
<Content Include="Umbraco\PartialViews\Templates\EditProfile.cshtml" />
|
||||
<None Include="Umbraco_client\CodeMirror\js\mode\coffeescript\LICENSE" />
|
||||
<None Include="Umbraco_client\CodeMirror\js\mode\pascal\LICENSE" />
|
||||
<None Include="Umbraco_client\CodeMirror\js\mode\perl\LICENSE" />
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
@inherits Umbraco.Web.Macros.PartialViewMacroPage
|
||||
|
||||
@using System.Web.Mvc.Html
|
||||
@using ClientDependency.Core.Mvc
|
||||
@using umbraco.cms.businesslogic.member
|
||||
@using Umbraco.Web
|
||||
@using Umbraco.Web.Models
|
||||
@using Umbraco.Web.Controllers
|
||||
|
||||
@{
|
||||
var profileModel = new ProfileModel();
|
||||
|
||||
Html.EnableClientValidation();
|
||||
Html.EnableUnobtrusiveJavaScript();
|
||||
Html.RequiresJs("/umbraco_client/ui/jquery.js");
|
||||
Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.min.js");
|
||||
Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.unobtrusive.min.js");
|
||||
}
|
||||
|
||||
@if (Member.IsLoggedOn())
|
||||
{
|
||||
@Html.RenderJsHere()
|
||||
|
||||
using (Html.BeginUmbracoForm<ProfileController>("HandleUpdateProfile"))
|
||||
{
|
||||
<fieldset>
|
||||
<legend>Edit profile</legend>
|
||||
|
||||
@Html.LabelFor(m => profileModel.Name)
|
||||
@Html.TextBoxFor(m => profileModel.Name)
|
||||
@Html.ValidationMessageFor(m => profileModel.Name)
|
||||
<br />
|
||||
|
||||
@Html.LabelFor(m => profileModel.Email)
|
||||
@Html.TextBoxFor(m => profileModel.Email)
|
||||
@Html.ValidationMessageFor(m => profileModel.Email)
|
||||
<br />
|
||||
|
||||
@for (var i = 0; i < profileModel.MemberProperties.Count; i++)
|
||||
{
|
||||
@Html.LabelFor(m => profileModel.MemberProperties[i].Value, profileModel.MemberProperties[i].Name)
|
||||
@Html.EditorFor(m => profileModel.MemberProperties[i].Value)
|
||||
@Html.HiddenFor(m => profileModel.MemberProperties[i].Alias)
|
||||
<br />
|
||||
}
|
||||
|
||||
@Html.HiddenFor(m => profileModel.MemberTypeAlias)
|
||||
|
||||
<button>Save</button>
|
||||
</fieldset>
|
||||
}
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
@using Umbraco.Web.Macros.PartialViewMacroPage
|
||||
@inherits Umbraco.Web.Macros.PartialViewMacroPage
|
||||
@@ -2,24 +2,21 @@
|
||||
|
||||
@using System.Web.Mvc.Html
|
||||
@using ClientDependency.Core.Mvc
|
||||
@using Umbraco.Web.UmbracoModels
|
||||
@using Umbraco.Web.UmbracoControllers
|
||||
@using Umbraco.Web
|
||||
@using Umbraco.Web.Models
|
||||
@using Umbraco.Web.Controllers
|
||||
|
||||
@{
|
||||
var loginModel = new LoginModel();
|
||||
|
||||
Html.EnableClientValidation();
|
||||
Html.EnableUnobtrusiveJavaScript();
|
||||
|
||||
// TODO: CDF doesn't work at the moment, Shannon is looking at it
|
||||
//Html.RequiresJs("/umbraco_client/ui/jquery.js");
|
||||
//Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.min.js");
|
||||
//Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.unobtrusive.min.js");
|
||||
|
||||
var loginModel = new LoginModel();
|
||||
Html.RequiresJs("/umbraco_client/ui/jquery.js");
|
||||
Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.min.js");
|
||||
Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.unobtrusive.min.js");
|
||||
}
|
||||
|
||||
<script src="@Url.Content("~/umbraco_client/ui/jquery.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/umbraco_client/Application/JQuery/jquery.validate.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/umbraco_client/Application/JQuery/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
|
||||
@Html.RenderJsHere()
|
||||
|
||||
@using (Html.BeginUmbracoForm<LoginController>("HandleLogin"))
|
||||
{
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
@inherits Umbraco.Web.Macros.PartialViewMacroPage
|
||||
@using ClientDependency.Core.Mvc
|
||||
@using Umbraco.Web
|
||||
@using Umbraco.Web.Models
|
||||
@using Umbraco.Web.Controllers
|
||||
|
||||
@{
|
||||
var loginStatusModel = new LoginStatusModel();
|
||||
|
||||
Html.EnableClientValidation();
|
||||
Html.EnableUnobtrusiveJavaScript();
|
||||
Html.RequiresJs("/umbraco_client/ui/jquery.js");
|
||||
Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.min.js");
|
||||
Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.unobtrusive.min.js");
|
||||
}
|
||||
|
||||
@Html.RenderJsHere()
|
||||
|
||||
@if (loginStatusModel.IsLoggedIn)
|
||||
{
|
||||
<p>You are currently logged in as @loginStatusModel.Name</p>
|
||||
|
||||
using (Html.BeginUmbracoForm<LoginStatusController>("HandleLogout"))
|
||||
{
|
||||
<fieldset>
|
||||
<legend>Logout</legend>
|
||||
<button>Logout</button>
|
||||
</fieldset>
|
||||
}
|
||||
}
|
||||
@@ -2,53 +2,32 @@
|
||||
|
||||
@using System.Web.Mvc.Html
|
||||
@using ClientDependency.Core.Mvc
|
||||
@using umbraco.cms.businesslogic.member
|
||||
@using Umbraco.Web.UmbracoModels
|
||||
@using Umbraco.Web.UmbracoControllers
|
||||
@using Umbraco.Web
|
||||
@using Umbraco.Web.Models
|
||||
@using Umbraco.Web.Controllers
|
||||
|
||||
@{
|
||||
var registerModel = new RegisterModel();
|
||||
|
||||
Html.EnableClientValidation();
|
||||
Html.EnableUnobtrusiveJavaScript();
|
||||
|
||||
// TODO: CDF doesn't work at the moment, Shannon is looking at it
|
||||
//Html.RequiresJs("/umbraco_client/ui/jquery.js");
|
||||
//Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.min.js");
|
||||
//Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.unobtrusive.min.js");
|
||||
|
||||
// TODO: Make a helper for this
|
||||
var memberTypeAlias = "UmbracoMember";
|
||||
if (Model.MacroParameters.Any() && Model.MacroParameters.ContainsKey("memberTypeAlias"))
|
||||
{
|
||||
var alias = Model.MacroParameters["memberTypeAlias"];
|
||||
if (string.IsNullOrWhiteSpace(alias.ToString()) == false)
|
||||
{
|
||||
memberTypeAlias = alias.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
var registerModel = new RegisterModel
|
||||
{
|
||||
MemberProperties = new List<UmbracoProperty>(),
|
||||
MemberTypeAlias = memberTypeAlias
|
||||
};
|
||||
|
||||
// TODO: Fill model somewhere else
|
||||
var memberType = MemberType.GetByAlias(registerModel.MemberTypeAlias);
|
||||
foreach (var prop in memberType.PropertyTypes.Where(memberType.MemberCanEdit))
|
||||
{
|
||||
registerModel.MemberProperties.Add(new UmbracoProperty {Alias = prop.Alias, Name = prop.Name, Value = string.Empty});
|
||||
}
|
||||
Html.RequiresJs("/umbraco_client/ui/jquery.js");
|
||||
Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.min.js");
|
||||
Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.unobtrusive.min.js");
|
||||
}
|
||||
|
||||
<script src="@Url.Content("~/umbraco_client/ui/jquery.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/umbraco_client/Application/JQuery/jquery.validate.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/umbraco_client/Application/JQuery/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
|
||||
@Html.RenderJsHere()
|
||||
|
||||
@using (Html.BeginUmbracoForm<RegisterController>("HandleRegisterMember"))
|
||||
{
|
||||
<fieldset>
|
||||
<legend>Register Member</legend>
|
||||
|
||||
@Html.LabelFor(m => registerModel.Name)
|
||||
@Html.TextBoxFor(m => registerModel.Name)
|
||||
@Html.ValidationMessageFor(m => registerModel.Name)
|
||||
<br />
|
||||
|
||||
@Html.LabelFor(m => registerModel.Email)
|
||||
@Html.TextBoxFor(m => registerModel.Email)
|
||||
@Html.ValidationMessageFor(m => registerModel.Email)
|
||||
@@ -59,14 +38,16 @@
|
||||
@Html.ValidationMessageFor(m => registerModel.Password)
|
||||
<br />
|
||||
|
||||
@for (var i = 0; i < registerModel.MemberProperties.Count; i++)
|
||||
{
|
||||
@Html.LabelFor(m => registerModel.MemberProperties[i].Value, registerModel.MemberProperties[i].Name)
|
||||
@Html.EditorFor(m => registerModel.MemberProperties[i].Value)
|
||||
@Html.HiddenFor(m => registerModel.MemberProperties[i].Alias)
|
||||
<br />
|
||||
@if (registerModel.MemberProperties != null) {
|
||||
for (var i = 0; i < registerModel.MemberProperties.Count; i++)
|
||||
{
|
||||
@Html.LabelFor(m => registerModel.MemberProperties[i].Value, registerModel.MemberProperties[i].Name)
|
||||
@Html.EditorFor(m => registerModel.MemberProperties[i].Value)
|
||||
@Html.HiddenFor(m => registerModel.MemberProperties[i].Alias)
|
||||
<br />
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Html.HiddenFor(m => registerModel.MemberTypeAlias)
|
||||
|
||||
<button>Register</button>
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
<notFound assembly="umbraco" type="SearchForAlias" />
|
||||
<notFound assembly="umbraco" type="SearchForTemplate"/>
|
||||
<notFound assembly="umbraco" type="SearchForProfile"/>
|
||||
<notFound assembly="umbraco" type="handle404"/>
|
||||
<notFound assembly="umbraco" type="handle404" last="true"/>
|
||||
</NotFoundHandlers>
|
||||
@@ -3,5 +3,5 @@
|
||||
<notFound assembly="umbraco" type="SearchForAlias" />
|
||||
<notFound assembly="umbraco" type="SearchForTemplate"/>
|
||||
<notFound assembly="umbraco" type="SearchForProfile"/>
|
||||
<notFound assembly="umbraco" type="handle404"/>
|
||||
<notFound assembly="umbraco" type="handle404" last="true"/>
|
||||
</NotFoundHandlers>
|
||||
Reference in New Issue
Block a user