Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the registration/sign-in process in line with Jeff's latest feedback #1660

Merged
merged 1 commit into from
Oct 22, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/NuGetGallery/Controllers/UsersController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,13 @@ public virtual ActionResult Profiles(string username)
[Authorize]
public virtual ActionResult ChangeEmail()
{
return View();
User user = UserService.FindByUsername(Identity.Name);
var model = new ChangeEmailRequestModel
{
NewEmail = String.IsNullOrEmpty(user.UnconfirmedEmailAddress) ?
user.EmailAddress : user.UnconfirmedEmailAddress;
};
return View(model);
}

[HttpPost]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class ChangeEmailRequestModel

[Required]
[DataType(DataType.Password)]
[Display(Name = "Password")]
[Display(Name = "Current Password (for verification)")]
[StringLength(64)]
public string Password { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</div>

<div class="form-field">
@Html.LabelFor(m => m.EmailAddress)
<label for="EmailAddress">Email (<a href="http://www.gravatar.com">Gravatar</a>, notifications, and password recovery)</label>
@Html.EditorFor(m => m.EmailAddress)
@Html.ValidationMessageFor(m => m.EmailAddress)
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/NuGetGallery/Views/Shared/UserDisplay.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
string returnUrl = ViewData.ContainsKey(Constants.ReturnUrlViewDataKey) ? (string)ViewData[Constants.ReturnUrlViewDataKey] : Request.RawUrl;
<span class="welcome">
<a href="@Url.LogOn(returnUrl)">Sign in</a>
<a href="@Url.LogOn(returnUrl)" title="Register for an account or sign in with an existing account">Register / Sign in</a>
</span>
}
else
Expand Down
2 changes: 1 addition & 1 deletion src/NuGetGallery/Views/Users/Edit.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
current email address. </text>
}
We use your verified email address and <a href="http://www.gravatar.com" target="_blank">gravatar.com</a>
to get your profile picture. <a href="https://en.gravatar.com/emails" target="_blank">Go to gravatar.com</a>
to get your profile picture. <a href="http://gravatar.com" target="_blank">Go to gravatar.com</a>
to change your profile picture.
</p>
</div>
Expand Down
20 changes: 5 additions & 15 deletions src/NuGetGallery/Views/Users/Thanks.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,23 @@
}

<h1 class="page-heading">
Thanks for registering!
Thank you for registering!
</h1>

<h2><a href="@Url.Action("Account", "Users")">View Profile</a></h2>

<h2>Now that you have an account you might like to...</h2>

<ul>
<li>
<p>
Set up your <a href="@Url.Action(MVC.Users.Edit())">user profile</a>.
</p>
</li>

<li>
<p>
Click on <em>Upload Package</em> in the menu to start uploading packages.
</p>
</li>

<li>
<p>
Contact the owners of a package with a question. You can do this from the package page.
<a href="@Url.ConfirmationRequired()">Confirm your account</a> so that you can upload packages or contact package owners.
</p>
</li>

<li>
<p>
<a href="@Url.ConfirmationRequired()">Confirm your account</a> so that you can use an <a href="@Url.Action(MVC.Users.Account())">API Key</a> to push nuget packages from scripts.<br />
<a href="@Url.UploadPackage()">Upload a package</a>.
</p>
</li>
</ul>