Browse Source

Change Password + Forget Password done

master
Milad Karbasizadeh 11 years ago
parent
commit
8994a44430
19 changed files with 403 additions and 35 deletions
  1. +23
    -0
      Sevomin.Models/ChangePasswordViewModel.cs
  2. +11
    -0
      Sevomin.Models/ForgotPasswordViewModel.cs
  3. +60
    -8
      Sevomin.Models/Helpers/SevominEmailer.cs
  4. +2
    -8
      Sevomin.Models/Repositories/UserRepository.cs
  5. +18
    -0
      Sevomin.Models/ResetPasswordViewModel.cs
  6. +3
    -0
      Sevomin.Models/Sevomin.Models.csproj
  7. +94
    -2
      Sevomin.WebFrontend.Controllers/AccountController.cs
  8. +15
    -0
      Sevomin.WebFrontend/App_Start/RouteConfig.cs
  9. +8
    -1
      Sevomin.WebFrontend/Content/intro.css
  10. +6
    -0
      Sevomin.WebFrontend/Sevomin.WebFrontend.csproj
  11. +51
    -0
      Sevomin.WebFrontend/Views/Account/ChangePassword.cshtml
  12. +34
    -0
      Sevomin.WebFrontend/Views/Account/Forgot.cshtml
  13. +12
    -8
      Sevomin.WebFrontend/Views/Account/Login.cshtml
  14. +42
    -0
      Sevomin.WebFrontend/Views/Account/ResetPassword.cshtml
  15. +8
    -6
      Sevomin.WebFrontend/Views/Shared/Intro.cshtml
  16. +2
    -0
      Sevomin.WebFrontend/Views/Shared/IntroSignup.cshtml
  17. +6
    -1
      Sevomin.WebFrontend/Views/Shared/Navbar.cshtml
  18. +1
    -1
      Sevomin.WebFrontend/Views/Shared/PostResult.cshtml
  19. +7
    -0
      Sevomin.WebFrontend/Web.config

+ 23
- 0
Sevomin.Models/ChangePasswordViewModel.cs View File

@ -0,0 +1,23 @@
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
namespace Sevomin.Models
{
public class ChangePasswordViewModel
{
[DisplayName("رمز عبور فعلی")]
[Required(ErrorMessage = "ورود {0} الزامی است.")]
[DataType(DataType.Password)]
public string Password { get; set; }
[DisplayName("رمز عبور جدید")]
[Required(ErrorMessage = "ورود {0} الزامی است.")]
[DataType(DataType.Password)]
public string NewPassword { get; set; }
[DisplayName("تایید رمز عبور")]
[Required(ErrorMessage = "ورود {0} الزامی است.")]
[DataType(DataType.Password)]
[Compare("NewPassword", ErrorMessage = "تایید رمز عبور با رمز عبور جدید مطابقت ندارد.")]
public string ConfirmPassword { get; set; }
}
}

+ 11
- 0
Sevomin.Models/ForgotPasswordViewModel.cs View File

@ -0,0 +1,11 @@
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
namespace Sevomin.Models
{
public class ForgotPasswordViewModel
{
[DisplayName("ایمیل")]
[Required(ErrorMessage = "ورود {0} الزامی است.")]
public string Email { get; set; }
}
}

+ 60
- 8
Sevomin.Models/Helpers/SevominEmailer.cs View File

@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO;
using System.Linq; using System.Linq;
using System.Net.Mail; using System.Net.Mail;
using System.Text; using System.Text;
@ -7,18 +8,67 @@ using System.Threading.Tasks;
namespace Sevomin.Models.Helpers namespace Sevomin.Models.Helpers
{ {
public enum EmailType
{
EmailConfirmation,
PasswordReset,
NewPassword
}
public class SevominEmailer public class SevominEmailer
{ {
public Dictionary<string, string> Parameters { get; set; } public Dictionary<string, string> Parameters { get; set; }
public EmailType EmailType { get; set; }
private string EmailFolderPath;
private string EmailConfirmationFilePath;
private string NewPasswordFilePath;
private string PasswordResetFilePath;
public SevominEmailer() public SevominEmailer()
{ {
EmailFolderPath = Path.Combine(System.Web.HttpContext.Current.Server.MapPath("~/app_data"), "emails");
if (!Directory.Exists(EmailFolderPath))
throw new ApplicationException("Emails folder does not exist in the right address.");
EmailConfirmationFilePath = Path.Combine(EmailFolderPath, "email-confirmation.html");
NewPasswordFilePath = Path.Combine(EmailFolderPath, "new-password.html");
PasswordResetFilePath = Path.Combine(EmailFolderPath, "password-reset.html");
if(!File.Exists(EmailConfirmationFilePath))
throw new ApplicationException("Email confirmation template does not exist in the right address.");
if (!File.Exists(NewPasswordFilePath))
throw new ApplicationException("New password template does not exist in the right address.");
if (!File.Exists(PasswordResetFilePath))
throw new ApplicationException("Password reset template does not exist in the right address.");
Parameters = new Dictionary<string, string>();
}
public SevominEmailer(Dictionary<string, string> parameters, EmailType emailType) : this()
{
Parameters = parameters;
EmailType = emailType;
} }
public async void Send(string to, string subject, string template, bool isHtml)
public async Task SendAsync(string to, string subject, bool isHtml)
{ {
SmtpClient client = new SmtpClient(); SmtpClient client = new SmtpClient();
MailMessage msg = new MailMessage(); MailMessage msg = new MailMessage();
string template;
switch (EmailType)
{
case EmailType.EmailConfirmation:
template =
File.ReadAllText(EmailConfirmationFilePath, Encoding.UTF8);
break;
case EmailType.PasswordReset:
template =
File.ReadAllText(PasswordResetFilePath, Encoding.UTF8);
break;
case EmailType.NewPassword:
template =
File.ReadAllText(NewPasswordFilePath, Encoding.UTF8);
break;
default:
template = string.Empty;
break;
}
foreach (var address in to.Split(',')) foreach (var address in to.Split(','))
msg.To.Add(address); msg.To.Add(address);
msg.From = new MailAddress("[email protected]", "سومین - مرکز کاریابی کنترل پروژه"); msg.From = new MailAddress("[email protected]", "سومین - مرکز کاریابی کنترل پروژه");
@ -28,14 +78,16 @@ namespace Sevomin.Models.Helpers
msg.IsBodyHtml = isHtml; msg.IsBodyHtml = isHtml;
Func<string> getBody = () => Func<string> getBody = () =>
{ {
foreach (var param in Parameters)
template = template.Replace(param.Key, param.Value);
foreach (var param in Parameters)
template = template.Replace(string.Format("[{0}]", param.Key), param.Value);
return template; return template;
}; };
msg.Body = getBody();
client.SendAsync(msg, null);
msg.Body = getBody();
await Task.Run(() =>
{
client.Send(msg);
});
} }
} }
}
}

+ 2
- 8
Sevomin.Models/Repositories/UserRepository.cs View File

@ -45,7 +45,7 @@ namespace Sevomin.Models.Repositories
public User Find(string identifier) public User Find(string identifier)
{ {
throw new NotImplementedException();
return SevominDbContext.Current.Users.FirstOrDefault(u => u.UserName.ToLower() == identifier.ToLower());
} }
public void Delete(User entity) public void Delete(User entity)
@ -55,13 +55,7 @@ namespace Sevomin.Models.Repositories
public void Save() public void Save()
{ {
throw new NotImplementedException();
}
public User Find(long identifier)
{
throw new NotImplementedException();
SevominDbContext.Current.SaveChanges();
} }
} }
} }

+ 18
- 0
Sevomin.Models/ResetPasswordViewModel.cs View File

@ -0,0 +1,18 @@
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
namespace Sevomin.Models
{
public class ResetPasswordViewModel
{
[DisplayName("رمز عبور")]
[Required(ErrorMessage = "ورود {0} الزامی است.")]
[DataType(DataType.Password)]
public string Password { get; set; }
[DisplayName("تایید رمز عبور")]
[Required(ErrorMessage = "ورود {0} الزامی است.")]
[DataType(DataType.Password)]
[Compare("Password", ErrorMessage = "تایید رمز عبور با رمز عبور اصلی مطابقت ندارد.")]
public string ConfirmPassword { get; set; }
}
}

+ 3
- 0
Sevomin.Models/Sevomin.Models.csproj View File

@ -72,6 +72,9 @@
<ItemGroup> <ItemGroup>
<Compile Include="Avalin.cs" /> <Compile Include="Avalin.cs" />
<Compile Include="AvalinViewModel.cs" /> <Compile Include="AvalinViewModel.cs" />
<Compile Include="ChangePasswordViewModel.cs" />
<Compile Include="ResetPasswordViewModel.cs" />
<Compile Include="ForgotPasswordViewModel.cs" />
<Compile Include="DovominJob.cs" /> <Compile Include="DovominJob.cs" />
<Compile Include="DovominJobViewModel.cs" /> <Compile Include="DovominJobViewModel.cs" />
<Compile Include="DovominParameterViewModel.cs" /> <Compile Include="DovominParameterViewModel.cs" />


+ 94
- 2
Sevomin.WebFrontend.Controllers/AccountController.cs View File

@ -70,6 +70,14 @@ namespace Sevomin.WebFrontend.Controllers
else if(user is Dovomin) else if(user is Dovomin)
await UserManager.AddToRoleAsync(user.Id, "Dovomin"); await UserManager.AddToRoleAsync(user.Id, "Dovomin");
#if !DEBUG
SevominEmailer emailer = new SevominEmailer();
emailer.EmailType = EmailType.EmailConfirmation;
emailer.Parameters.Add("display-name", user.DisplayName);
emailer.Parameters.Add("confirmation-code", user.ConfirmationCode);
await emailer.SendAsync(user.Email, "تایید عضویت در سومین", true);
#endif
await SignInAsync(user, isPersistent: false); await SignInAsync(user, isPersistent: false);
return RedirectToAction("MyProfile", "Account"); return RedirectToAction("MyProfile", "Account");
} }
@ -96,7 +104,7 @@ namespace Sevomin.WebFrontend.Controllers
if (user == null) if (user == null)
return HttpNotFound(); return HttpNotFound();
if (Request.IsAuthenticated)
if (Request.IsAuthenticated && User.Identity.Name.ToLower() != user.UserName.ToLower())
{ {
ViewBag.Result = new PostResultViewModel(false, ViewBag.Result = new PostResultViewModel(false,
string.Format("شما با نام کاربری {0} در سایت وارد شده اید. نمی توانید حساب کاربری {1} را تایید نمایید.", string.Format("شما با نام کاربری {0} در سایت وارد شده اید. نمی توانید حساب کاربری {1} را تایید نمایید.",
@ -146,12 +154,96 @@ namespace Sevomin.WebFrontend.Controllers
return View(model); return View(model);
} }
public ActionResult Logout() public ActionResult Logout()
{ {
AuthenticationManager.SignOut(); AuthenticationManager.SignOut();
return RedirectToAction("Index", "Home"); return RedirectToAction("Index", "Home");
} }
public ActionResult Forgot()
{
return View();
}
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Forgot(ForgotPasswordViewModel model)
{
var user = UserRepository.Current.Find(model.Email);
if (user == null)
{
ViewBag.Result = new PostResultViewModel(false, "کاربری با این آدرس ایمیل یافت نشد. لطفا دوباره تلاش کنید.");
return View();
}
user.ConfirmationCode = Sevomin.Models.User.GetConfirmationCode();
UserRepository.Current.Save();
#if !DEBUG
SevominEmailer emailer = new SevominEmailer();
emailer.EmailType = EmailType.PasswordReset;
emailer.Parameters.Add("display-name", user.DisplayName);
emailer.Parameters.Add("reset-code", user.ConfirmationCode);
await emailer.SendAsync(user.Email, "بازنشانی رمز عبور در سومین", true);
#endif
ViewBag.Result = new PostResultViewModel(true, "آدرس بازنشانی رمز عبور برای شما ارسال شد.");
return View();
}
public ActionResult ResetPassword(string code)
{
var user = UserRepository.Current.FindWithConfirmationCode(code);
if (user == null)
return HttpNotFound();
return View();
}
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<ActionResult> ResetPassword(string code, ResetPasswordViewModel model)
{
var user = UserRepository.Current.FindWithConfirmationCode(code);
if (user == null)
return HttpNotFound();
await UserManager.RemovePasswordAsync(user.Id);
await UserManager.AddPasswordAsync(user.Id, model.Password);
user.ConfirmationCode = string.Empty;
UserRepository.Current.Save();
ViewBag.Result = new PostResultViewModel(true, "رمز عبور شما با موفقیت بازنشانی شد.");
return View();
}
[Authorize]
public ActionResult ChangePassword()
{
return View();
}
[Authorize]
[HttpPost]
public async Task<ActionResult> ChangePassword(ChangePasswordViewModel model)
{
var user = await UserManager.FindAsync(User.Identity.Name, model.Password);
if (user != null)
{
await UserManager.RemovePasswordAsync(user.Id);
await UserManager.AddPasswordAsync(user.Id, model.NewPassword);
UserRepository.Current.Save();
ViewBag.Result = new PostResultViewModel(true, "رمز عبور شما با موفقیت به روز شد.");
return View();
}
else
{
ViewBag.Result = new PostResultViewModel(false, "رمز عبور فعلی وارد شده با اطلاعات ما مطابقت ندارد. لطفا دوباره تلاش کنید.");
return View();
}
}
[Authorize] [Authorize]
public async Task<ActionResult> MyProfile(bool? success) public async Task<ActionResult> MyProfile(bool? success)


+ 15
- 0
Sevomin.WebFrontend/App_Start/RouteConfig.cs View File

@ -64,6 +64,21 @@ namespace Sevomin.WebFrontend
url: "dovomin/id-{userId}", url: "dovomin/id-{userId}",
defaults: new { controller = "Account", action = "Dovomin" } defaults: new { controller = "Account", action = "Dovomin" }
); );
routes.MapRoute(
name: "ForgotPassword",
url: "forgot-password",
defaults: new { controller = "Account", action = "Forgot" }
);
routes.MapRoute(
name: "ResetPassword",
url: "reset-password/{code}",
defaults: new { controller = "Account", action = "ResetPassword" }
);
routes.MapRoute(
name: "ChangePassword",
url: "change-password",
defaults: new { controller = "Account", action = "ChangePassword" }
);
#endregion #endregion
#region For Jobs #region For Jobs


+ 8
- 1
Sevomin.WebFrontend/Content/intro.css View File

@ -1,5 +1,5 @@
.introduction{ .introduction{
height: 270px;
min-height: 270px;
} }
.intro-icon, #sevomin-intro-logo{ .intro-icon, #sevomin-intro-logo{
text-align: center; text-align: center;
@ -20,6 +20,13 @@
#sevomin-intro-logo img{ #sevomin-intro-logo img{
width: 150px; width: 150px;
} }
ul#intro-parts{
margin: 0;
padding: 0;
}
ul#intro-parts li{
list-style: none;
}
#s1, #s2, #s3 { #s1, #s2, #s3 {
font-size: 0.95em; font-size: 0.95em;
color: #444444; color: #444444;


+ 6
- 0
Sevomin.WebFrontend/Sevomin.WebFrontend.csproj View File

@ -122,6 +122,9 @@
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="App_Data\emails\password-reset.html" />
<Content Include="App_Data\emails\new-password.html" />
<Content Include="App_Data\emails\email-confirmation.html" />
<Content Include="Content\bootstrap-theme.css" /> <Content Include="Content\bootstrap-theme.css" />
<Content Include="Content\bootstrap-theme.min.css" /> <Content Include="Content\bootstrap-theme.min.css" />
<Content Include="Content\bootstrap.css" /> <Content Include="Content\bootstrap.css" />
@ -318,6 +321,9 @@
<Content Include="Views\Job\JobRequests.cshtml" /> <Content Include="Views\Job\JobRequests.cshtml" />
<Content Include="Views\Shared\GA.cshtml" /> <Content Include="Views\Shared\GA.cshtml" />
<Content Include="Views\Account\ConfirmEmail.cshtml" /> <Content Include="Views\Account\ConfirmEmail.cshtml" />
<Content Include="Views\Account\Forgot.cshtml" />
<Content Include="Views\Account\ResetPassword.cshtml" />
<Content Include="Views\Account\ChangePassword.cshtml" />
<None Include="Web.Debug.config"> <None Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon> <DependentUpon>Web.config</DependentUpon>
</None> </None>


+ 51
- 0
Sevomin.WebFrontend/Views/Account/ChangePassword.cshtml View File

@ -0,0 +1,51 @@
@model Sevomin.Models.ChangePasswordViewModel
@{
ViewBag.Title = "تغییر کلمه عبور";
}
@Html.Partial("PostResult", ViewBag.Result as Sevomin.Models.PostResultViewModel)
<div class="page-header rtl">
<h1>تغییر کلمه عبور</h1>
</div>
<div class="row rtl">
<div class="col-md-12">
@using (Html.BeginForm("ChangePassword", "Account", FormMethod.Post, new { role = "form" }))
{
@Html.AntiForgeryToken()
<div class="form-horizontal">
<div class="form-group">
<div class="col-md-3 pull-right">
@Html.LabelFor(model => model.Password, new { @class = "control-label" })
</div>
<div class="col-md-9">
@Html.PasswordFor(model => model.Password, new { @class = "form-control ltr" })
@Html.ValidationMessageFor(model => model.Password)
</div>
</div>
<div class="form-group">
<div class="col-md-3 pull-right">
@Html.LabelFor(model => model.NewPassword, new { @class = "control-label" })
</div>
<div class="col-md-9">
@Html.PasswordFor(model => model.NewPassword, new { @class = "form-control ltr" })
@Html.ValidationMessageFor(model => model.NewPassword)
</div>
</div>
<div class="form-group">
<div class="col-md-3 pull-right">
@Html.LabelFor(model => model.ConfirmPassword, new { @class = "control-label" })
</div>
<div class="col-md-9">
@Html.PasswordFor(model => model.ConfirmPassword, new { @class = "form-control ltr" })
@Html.ValidationMessageFor(model => model.ConfirmPassword)
</div>
</div>
<div class="form-group">
<div class="col-md-12">
<button type="submit" class="btn btn-default">ارسال رمز عبور</button>
</div>
</div>
</div>
}
</div>
</div>

+ 34
- 0
Sevomin.WebFrontend/Views/Account/Forgot.cshtml View File

@ -0,0 +1,34 @@
@model Sevomin.Models.ForgotPasswordViewModel
@{
ViewBag.Title = "بازنشانی رمز عبور";
}
@Html.Partial("PostResult", ViewBag.Result as Sevomin.Models.PostResultViewModel)
<div class="page-header rtl">
<h1>بازنشانی رمز عبور <small>برای بازنشانی رمز عبور خود، ایمیل خود را وارد کنید.</small></h1>
</div>
<div class="row rtl">
<div class="col-md-12">
@using (Html.BeginForm("Forgot", "Account", FormMethod.Post, new { role = "form" }))
{
@Html.AntiForgeryToken()
<div class="form-horizontal">
<div class="form-group">
<div class="col-md-3 pull-right">
@Html.LabelFor(model => model.Email, new { @class = "control-label" })
</div>
<div class="col-md-9">
@Html.TextBoxFor(model => model.Email, new { @class = "form-control ltr" })
@Html.ValidationMessageFor(model => model.Email)
</div>
</div>
<div class="form-group">
<div class="col-md-12">
<button type="submit" class="btn btn-default">ارسال رمز عبور</button>
</div>
</div>
</div>
}
</div>
</div>

+ 12
- 8
Sevomin.WebFrontend/Views/Account/Login.cshtml View File

@ -11,7 +11,7 @@
<p id="login-intro-text"> <p id="login-intro-text">
اگر قبلا در سایت ثبت‌نام کرده‌اید می‌توانید با وارد کردن کد کاربری و کلمه عبور وارد سایت شوید. اگر قبلا در سایت ثبت‌نام کرده‌اید می‌توانید با وارد کردن کد کاربری و کلمه عبور وارد سایت شوید.
اگر قبلا در سایت ثبت‌نام نکرده‌اید می‌توانید هم‌اکنون به هر بخشی که مایل هستید بروید و اطلاعات موجود در سایت را مرور کنید (به جز مواردی که از سوی اشخاص محرمانه معرفی شده‌اند). می‌توانید با مراجعه به <a href="@Url.Action("Index", "Home")">صفحه اول سایت</a> ثبت‌نام نیز بکنید تا بتوانید برای آگهی‌های استخدام اعلام آمادگی کنید، آگهی استخدام ثبت کنید و ... اگر قبلا در سایت ثبت‌نام نکرده‌اید می‌توانید هم‌اکنون به هر بخشی که مایل هستید بروید و اطلاعات موجود در سایت را مرور کنید (به جز مواردی که از سوی اشخاص محرمانه معرفی شده‌اند). می‌توانید با مراجعه به <a href="@Url.Action("Index", "Home")">صفحه اول سایت</a> ثبت‌نام نیز بکنید تا بتوانید برای آگهی‌های استخدام اعلام آمادگی کنید، آگهی استخدام ثبت کنید و ...
</p>
</p>
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
@ -24,24 +24,28 @@
<div class="form-horizontal"> <div class="form-horizontal">
<div class="form-group"> <div class="form-group">
@Html.LabelFor(model => model.Username, new { @class = "control-label" })
<div class="col-md-10">
<div class="col-md-3 pull-right">
@Html.LabelFor(model => model.Username, new { @class = "control-label" })
</div>
<div class="col-md-9">
@Html.TextBoxFor(model => model.Username, new { @class = "form-control ltr" }) @Html.TextBoxFor(model => model.Username, new { @class = "form-control ltr" })
@Html.ValidationMessageFor(model => model.Username) @Html.ValidationMessageFor(model => model.Username)
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@Html.LabelFor(model => model.Password, new { @class = "control-label" })
<div class="col-md-10">
<div class="col-md-3 pull-right">
@Html.LabelFor(model => model.Password, new { @class = "control-label" })
</div>
<div class="col-md-9">
@Html.PasswordFor(model => model.Password, new { @class = "form-control ltr" }) @Html.PasswordFor(model => model.Password, new { @class = "form-control ltr" })
@Html.ValidationMessageFor(model => model.Password) @Html.ValidationMessageFor(model => model.Password)
</div> </div>
</div>
</div>
<div class="form-group"> <div class="form-group">
<div class="col-md-offset-2 col-md-10">
<div class="col-md-12">
<button type="submit" class="btn btn-default">ورود</button> <button type="submit" class="btn btn-default">ورود</button>
<span class="pull-left"><em>@Html.ActionLink("کلمه عبور خود را فراموش کرده اید؟", "Forgot")</em></span>
</div> </div>
</div> </div>
</div> </div>


+ 42
- 0
Sevomin.WebFrontend/Views/Account/ResetPassword.cshtml View File

@ -0,0 +1,42 @@
@model Sevomin.Models.ResetPasswordViewModel
@{
ViewBag.Title = "بازنشانی رمز عبور";
}
@Html.Partial("PostResult", ViewBag.Result as Sevomin.Models.PostResultViewModel)
<div class="page-header rtl">
<h1>بازنشانی رمز عبور <small>رمز عبور جدید خود را وارد نمایید.</small></h1>
</div>
<div class="row rtl">
<div class="col-md-12">
@using (Html.BeginForm("ResetPassword", "Account", FormMethod.Post, new { role = "form" }))
{
@Html.AntiForgeryToken()
<div class="form-horizontal">
<div class="form-group">
<div class="col-md-3 pull-right">
@Html.LabelFor(model => model.Password, new { @class = "control-label" })
</div>
<div class="col-md-9">
@Html.PasswordFor(model => model.Password, new { @class = "form-control ltr" })
@Html.ValidationMessageFor(model => model.Password)
</div>
</div>
<div class="form-group">
<div class="col-md-3 pull-right">
@Html.LabelFor(model => model.ConfirmPassword, new { @class = "control-label" })
</div>
<div class="col-md-9">
@Html.PasswordFor(model => model.ConfirmPassword, new { @class = "form-control ltr" })
@Html.ValidationMessageFor(model => model.ConfirmPassword)
</div>
</div>
<div class="form-group">
<div class="col-md-12">
<button type="submit" class="btn btn-default">ارسال رمز عبور</button>
</div>
</div>
</div>
}
</div>
</div>

+ 8
- 6
Sevomin.WebFrontend/Views/Shared/Intro.cshtml View File

@ -20,12 +20,14 @@
<div class="col-md-offset-3 col-md-6"> <div class="col-md-offset-3 col-md-6">
<div id="sevomin-intro-logo"> <div id="sevomin-intro-logo">
<img src="@Url.Content("~/content/images/logo.png")" alt="سومین: مرکز کاریابی برنامه‌ریزی و کنترل پروژه" /> <img src="@Url.Content("~/content/images/logo.png")" alt="سومین: مرکز کاریابی برنامه‌ریزی و کنترل پروژه" />
</div>
<div class="center-block">
<div id="s1">کارفرمای جویای متخصص</div>
<div id="s2">متخصص جویای کار</div>
<div id="s3">ما، که ارتباطی موثر بین شما برقرار می&zwnj;کنیم</div>
</div>
</div>
</div>
<div class="col-md-6 col-md-offset-3 rtl">
<ul id="intro-parts">
<li id="s1">کارفرمای جویای متخصص</li>
<li id="s2">متخصص جویای کار</li>
<li id="s3">ما، که ارتباطی موثر بین شما برقرار می&zwnj;کنیم</li>
</ul>
</div> </div>
</div> </div>
@Html.Partial("IntroSignup") @Html.Partial("IntroSignup")


+ 2
- 0
Sevomin.WebFrontend/Views/Shared/IntroSignup.cshtml View File

@ -17,6 +17,7 @@
<p>ما به شما کمک می&zwnj;کنیم که نیرویی مطابق با نیازهای خود بیابید.</p> <p>ما به شما کمک می&zwnj;کنیم که نیرویی مطابق با نیازهای خود بیابید.</p>
<p>تمام این خدمات رایگان ارائه می&zwnj;شوند.</p> <p>تمام این خدمات رایگان ارائه می&zwnj;شوند.</p>
</div> </div>
<div class="clearfix"></div>
@using (Html.BeginForm("Signup", "Account", FormMethod.Post, new { role = "form" })) @using (Html.BeginForm("Signup", "Account", FormMethod.Post, new { role = "form" }))
{ {
@Html.AntiForgeryToken() @Html.AntiForgeryToken()
@ -48,6 +49,7 @@
<p>حتی می&zwnj;توانید رزومه و مشخصات خود را در اختیار ما قرار دهید تا خودمان کارهای متناسب را برایتان بیابیم و از طرف شما اعلام آمادگی کنیم.</p> <p>حتی می&zwnj;توانید رزومه و مشخصات خود را در اختیار ما قرار دهید تا خودمان کارهای متناسب را برایتان بیابیم و از طرف شما اعلام آمادگی کنیم.</p>
<p>تمام این خدمات رایگان ارائه می&zwnj;شوند.</p> <p>تمام این خدمات رایگان ارائه می&zwnj;شوند.</p>
</div> </div>
<div class="clearfix"></div>
@using (Html.BeginForm("Signup", "Account", FormMethod.Post, new { role = "form" })) @using (Html.BeginForm("Signup", "Account", FormMethod.Post, new { role = "form" }))
{ {
@Html.AntiForgeryToken() @Html.AntiForgeryToken()


+ 6
- 1
Sevomin.WebFrontend/Views/Shared/Navbar.cshtml View File

@ -22,7 +22,12 @@
} }
else else
{ {
<li class="rtl"><a href="@Url.Action("MyProfile", "Account")"><span class="glyphicon glyphicon-user"></span>ویرایش پروفایل</a></li>
<li class="dropdown rtl"><a href="#" class="dropdown-toggle" data-toggle="dropdown">پروفایل <b class="caret"></b></a>
<ul class="dropdown-menu">
<li class="rtl"><a href="@Url.Action("MyProfile", "Account")"><span class="glyphicon glyphicon-user"></span> ویرایش پروفایل</a></li>
<li class="rtl"><a href="@Url.Action("ChangePassword", "Account")"><span class="glyphicon glyphicon-refresh"></span> تغییر کلمه عبور</a></li>
</ul>
</li>
<li class="rtl"><a href="@Url.Action("Logout", "Account")">خروج از سایت</a></li> <li class="rtl"><a href="@Url.Action("Logout", "Account")">خروج از سایت</a></li>
} }
</ul> </ul>


+ 1
- 1
Sevomin.WebFrontend/Views/Shared/PostResult.cshtml View File

@ -1,3 +1,3 @@
@if (Model != null && Model is Sevomin.Models.PostResultViewModel) { @if (Model != null && Model is Sevomin.Models.PostResultViewModel) {
<div class="alert @(Model.Success ? "alert-success" : "alert-danger") rtl">@Model.Message</div>
<div class="alert @(Model.Success ? "alert-success" : "alert-danger") rtl">@MvcHtmlString.Create(Model.Message)</div>
} }

+ 7
- 0
Sevomin.WebFrontend/Web.config View File

@ -32,6 +32,13 @@
<security allowRemoteAccess="true" /> <security allowRemoteAccess="true" />
<errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/app_data/errors" /> <errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/app_data/errors" />
</elmah> </elmah>
<system.net>
<mailSettings>
<smtp>
<network host="ml01.anaxanet.com" port="25" enableSsl="false"/>
</smtp>
</mailSettings>
</system.net>
<system.web> <system.web>
<compilation debug="true" targetFramework="4.5.1" /> <compilation debug="true" targetFramework="4.5.1" />
<httpRuntime targetFramework="4.5.1" /> <httpRuntime targetFramework="4.5.1" />


Loading…
Cancel
Save