GetClientValidationRules(ModelMetadata metadata, ControllerContext context)
- {
- return new[]{
- new ModelClientValidationStringLengthRule(FormatErrorMessage(metadata.GetDisplayName()), _minCharacters, int.MaxValue)
- };
- }
- }
- #endregion
-}
diff -r a5ff4de4a1d3 -r 62dc9fb3a03e Agendas/trunk/src/Agendas.Web/Services/AccountMembershipService.cs
--- a/Agendas/trunk/src/Agendas.Web/Services/AccountMembershipService.cs Mon Aug 01 00:10:20 2011 -0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-using System;
-using System.Web.Security;
-
-namespace AltNetHispano.Agendas.Web.Services
-{
- public class AccountMembershipService : IMembershipService
- {
- private readonly MembershipProvider _provider;
-
- public AccountMembershipService()
- : this(null)
- {
- }
-
- public AccountMembershipService(MembershipProvider provider)
- {
- _provider = provider ?? Membership.Provider;
- }
-
- public int MinPasswordLength
- {
- get
- {
- return _provider.MinRequiredPasswordLength;
- }
- }
-
- public bool ValidateUser(string userName, string password)
- {
- if (String.IsNullOrEmpty(userName)) throw new ArgumentException("Value cannot be null or empty.", "userName");
- if (String.IsNullOrEmpty(password)) throw new ArgumentException("Value cannot be null or empty.", "password");
-
- return _provider.ValidateUser(userName, password);
- }
-
- public MembershipCreateStatus CreateUser(string userName, string password, string email)
- {
- if (String.IsNullOrEmpty(userName)) throw new ArgumentException("Value cannot be null or empty.", "userName");
- if (String.IsNullOrEmpty(password)) throw new ArgumentException("Value cannot be null or empty.", "password");
- if (String.IsNullOrEmpty(email)) throw new ArgumentException("Value cannot be null or empty.", "email");
-
- MembershipCreateStatus status;
- _provider.CreateUser(userName, password, email, null, null, true, null, out status);
- return status;
- }
-
- public bool ChangePassword(string userName, string oldPassword, string newPassword)
- {
- if (String.IsNullOrEmpty(userName)) throw new ArgumentException("Value cannot be null or empty.", "userName");
- if (String.IsNullOrEmpty(oldPassword)) throw new ArgumentException("Value cannot be null or empty.", "oldPassword");
- if (String.IsNullOrEmpty(newPassword)) throw new ArgumentException("Value cannot be null or empty.", "newPassword");
-
- // The underlying ChangePassword() will throw an exception rather
- // than return false in certain failure scenarios.
- try
- {
- MembershipUser currentUser = _provider.GetUser(userName, true /* userIsOnline */);
- return currentUser.ChangePassword(oldPassword, newPassword);
- }
- catch (ArgumentException)
- {
- return false;
- }
- catch (MembershipPasswordException)
- {
- return false;
- }
- }
- }
-}
\ No newline at end of file
diff -r a5ff4de4a1d3 -r 62dc9fb3a03e Agendas/trunk/src/Agendas.Web/Services/IMembershipService.cs
--- a/Agendas/trunk/src/Agendas.Web/Services/IMembershipService.cs Mon Aug 01 00:10:20 2011 -0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-using System.Web.Security;
-
-namespace AltNetHispano.Agendas.Web.Services
-{
- public interface IMembershipService
- {
- int MinPasswordLength { get; }
-
- bool ValidateUser(string userName, string password);
- MembershipCreateStatus CreateUser(string userName, string password, string email);
- bool ChangePassword(string userName, string oldPassword, string newPassword);
- }
-}
\ No newline at end of file
diff -r a5ff4de4a1d3 -r 62dc9fb3a03e Agendas/trunk/src/Agendas.Web/Views/Account/ChangePassword.cshtml
--- a/Agendas/trunk/src/Agendas.Web/Views/Account/ChangePassword.cshtml Mon Aug 01 00:10:20 2011 -0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-@model AltNetHispano.Agendas.Web.Models.ChangePasswordModel
-Change Password
-
- Use the form below to change your password.
-
-
- New passwords are required to be a minimum of @ViewBag.PasswordLength characters in length.
-
-
-
-
-
-@using (Html.BeginForm()) {
- @Html.ValidationSummary(true, "Password change was unsuccessful. Please correct the errors and try again.")
-
-
- Account Information
-
-
- @Html.LabelFor(m => m.OldPassword)
-
-
- @Html.PasswordFor(m => m.OldPassword)
- @Html.ValidationMessageFor(m => m.OldPassword)
-
-
-
- @Html.LabelFor(m => m.NewPassword)
-
-
- @Html.PasswordFor(m => m.NewPassword)
- @Html.ValidationMessageFor(m => m.NewPassword)
-
-
-
- @Html.LabelFor(m => m.ConfirmPassword)
-
-
- @Html.PasswordFor(m => m.ConfirmPassword)
- @Html.ValidationMessageFor(m => m.ConfirmPassword)
-
-
-
-
-
-
-
-}
diff -r a5ff4de4a1d3 -r 62dc9fb3a03e Agendas/trunk/src/Agendas.Web/Views/Account/ChangePasswordSuccess.cshtml
--- a/Agendas/trunk/src/Agendas.Web/Views/Account/ChangePasswordSuccess.cshtml Mon Aug 01 00:10:20 2011 -0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-Change Password
-
- Your password has been changed successfully.
-
diff -r a5ff4de4a1d3 -r 62dc9fb3a03e Agendas/trunk/src/Agendas.Web/Views/Account/LogOn.cshtml
--- a/Agendas/trunk/src/Agendas.Web/Views/Account/LogOn.cshtml Mon Aug 01 00:10:20 2011 -0300
+++ b/Agendas/trunk/src/Agendas.Web/Views/Account/LogOn.cshtml Mon Aug 01 00:28:04 2011 -0300
@@ -1,44 +1,20 @@
-@model AltNetHispano.Agendas.Web.Models.LogOnModel
-Log On
+Log On
- Please enter your username and password. @Html.ActionLink("Register", "Register") if you don't have an account.
+ Seleccione el proveedor con que quiere demostrar su identidad
-@Html.ValidationSummary(true, "Login was unsuccessful. Please correct the errors and try again.")
-
-@using (Html.BeginForm()) {
-
-
- Account Information
-
-
- @Html.LabelFor(m => m.UserName)
-
-
- @Html.TextBoxFor(m => m.UserName)
- @Html.ValidationMessageFor(m => m.UserName)
-
-
-
- @Html.LabelFor(m => m.Password)
-
-
- @Html.PasswordFor(m => m.Password)
- @Html.ValidationMessageFor(m => m.Password)
-
-
-
- @Html.CheckBoxFor(m => m.RememberMe)
- @Html.LabelFor(m => m.RememberMe)
-
-
-
-
-
-
-
-}
-
+
+
+ Proveedores de identidad habilitados
+
+
+
+
+ Identifíquese utilizando su cuenta de twitter
+
+
+
+
\ No newline at end of file
diff -r a5ff4de4a1d3 -r 62dc9fb3a03e Agendas/trunk/src/Agendas.Web/Views/Account/Register.cshtml
--- a/Agendas/trunk/src/Agendas.Web/Views/Account/Register.cshtml Mon Aug 01 00:10:20 2011 -0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-@model AltNetHispano.Agendas.Web.Models.RegisterModel
-Create a New Account
-
- Use the form below to create a new account.
-
-
- Passwords are required to be a minimum of @ViewBag.PasswordLength characters in length.
-
-
-
-
-
-@using (Html.BeginForm()) {
- @Html.ValidationSummary(true, "Account creation was unsuccessful. Please correct the errors and try again.")
- @Html.EditorForModel()
-
-
-
-}
diff -r a5ff4de4a1d3 -r 62dc9fb3a03e Agendas/trunk/src/Agendas.Web/Views/Perfil/AddBuiltInAccount.cshtml
--- a/Agendas/trunk/src/Agendas.Web/Views/Perfil/AddBuiltInAccount.cshtml Mon Aug 01 00:10:20 2011 -0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-@model AltNetHispano.Agendas.Web.Models.LogOnModel
-Perfil
-
- Hola estas son tus cuentas registradas
-
-@Html.ValidationSummary(true, "La validación no fue exitosa, por favor intente de nuevo")
-
-@using (Html.BeginForm()) {
-
-
- Información de la cuenta interna
-
-
- @Html.LabelFor(m => m.UserName)
-
-
- @Html.TextBoxFor(m => m.UserName)
- @Html.ValidationMessageFor(m => m.UserName)
-
-
-
- @Html.LabelFor(m => m.Password)
-
-
- @Html.PasswordFor(m => m.Password)
- @Html.ValidationMessageFor(m => m.Password)
-
-
-
-
-
-
-
-}
-
-
-@Html.ActionLink("Volver", "Index")
-
diff -r a5ff4de4a1d3 -r 62dc9fb3a03e Agendas/trunk/src/Agendas.Web/Views/Perfil/Index.cshtml
--- a/Agendas/trunk/src/Agendas.Web/Views/Perfil/Index.cshtml Mon Aug 01 00:10:20 2011 -0300
+++ b/Agendas/trunk/src/Agendas.Web/Views/Perfil/Index.cshtml Mon Aug 01 00:28:04 2011 -0300
@@ -27,8 +27,8 @@
@Html.ActionLink("Asociar cuenta de Twitter", "AddTwitterAccount")
-
-@Html.ActionLink("Asociar cuenta de interna", "AddBuiltInAccount")
+
+
diff -r a5ff4de4a1d3 -r 62dc9fb3a03e Agendas/trunk/src/Agendas.Web/Web.config
--- a/Agendas/trunk/src/Agendas.Web/Web.config Mon Aug 01 00:10:20 2011 -0300
+++ b/Agendas/trunk/src/Agendas.Web/Web.config Mon Aug 01 00:28:04 2011 -0300
@@ -6,7 +6,6 @@
-