Skip to content

Addressed issues list and went over requirements for initial development #7

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions TakeHome/Controllers/FeedbackController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class FeedbackController : Controller

public ActionResult Index()
{
return View();
return View("Feedback");
}

[ValidateInput(true)]
Expand All @@ -29,4 +29,4 @@ public ActionResult Feedback(FeedbackForm form)
}

}
}
}
9 changes: 8 additions & 1 deletion TakeHome/Controllers/HomeController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,12 @@ public ActionResult Contact()

return View();
}

public ActionResult Error()
{
ViewBag.Message = "Your error page.";

return View();
}
}
}
}
6 changes: 3 additions & 3 deletions TakeHome/Models/FeedbackForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ public String FirstName
set;
}
[Required(AllowEmptyStrings = false, ErrorMessage = "Please Provide Last Name")]
[StringLength(25, MinimumLength = 1, ErrorMessage = "First Name Should be min 1 and max 25 length")]
[StringLength(25, MinimumLength = 1, ErrorMessage = "Last Name Should be min 1 and max 25 length")]
public String LastName
{
get;
set;
}
[Required(AllowEmptyStrings = false, ErrorMessage = "Please Provide Eamil")]
[RegularExpression("^[a-zA-Z0-9_\\.-]+@([a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}$", ErrorMessage = "Please Provide Valid Email")]
[StringLength(200, MinimumLength = 0, ErrorMessage = "First Name Should be min 1 and max 25 length")]
[StringLength(25, MinimumLength = 1, ErrorMessage = "Email Should be min 1 and max 25 length")]
public String Email
{
get;
Expand All @@ -38,4 +38,4 @@ public String Email


}
}
}
5 changes: 2 additions & 3 deletions TakeHome/Views/Feedback/Feedback.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
<h3>@ViewBag.Message</h3>

<div class="form">
@*@using (Html.BeginForm("Submit", "Feedback"))*@
@using (Html.BeginForm())
@using (Html.BeginForm("Feedback", "Feedback"))
{
/* form here */
<fieldset>
Expand Down Expand Up @@ -47,4 +46,4 @@
</div>
</fieldset>
}
</div>
</div>
3 changes: 1 addition & 2 deletions TakeHome/Views/Feedback/ThankYou.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@model object

@model TakeHome.Models.FeedbackForm
@{
ViewBag.Title = "ThankYou";
}
Expand Down
3 changes: 2 additions & 1 deletion TakeHome/Views/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
<ul class="nav navbar-nav">
<li>@Html.ActionLink("Home", "Index", "Home")</li>
<li>@Html.ActionLink("About", "About", "Home")</li>
<li>@Html.ActionLink("Feedback", "Index", "Feedback")</li>
<li>@Html.ActionLink("Feedback", "Index", "Feedback")</li>
<li>@Html.ActionLink("Contact", "Contact", "Home")</li>
</ul>
</div>
</div>
Expand Down