54 lines
1.8 KiB
Plaintext
54 lines
1.8 KiB
Plaintext
@inherits Umbraco.Web.Macros.PartialViewMacroPage
|
|
|
|
@using System.Web.Mvc.Html
|
|
@using ClientDependency.Core.Mvc
|
|
@using Umbraco.Web
|
|
@using Umbraco.Web.Models
|
|
@using Umbraco.Web.Controllers
|
|
|
|
@{
|
|
var profileModel = Members.CreateProfileModel();
|
|
|
|
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");
|
|
}
|
|
|
|
@*NOTE: This RenderJsHere code should be put on your main template page where the rest of your script tags are placed*@
|
|
@Html.RenderJsHere()
|
|
|
|
@if (Members.IsLoggedIn())
|
|
{
|
|
using (Html.BeginUmbracoForm<UmbProfileController>("HandleUpdateProfile"))
|
|
{
|
|
<fieldset>
|
|
<legend>Edit profile</legend>
|
|
|
|
@Html.ValidationSummary(true)
|
|
|
|
@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>
|
|
}
|
|
} |