Compare commits
52 Commits
Add-style-
...
master
Author | SHA1 | Date | |
---|---|---|---|
09ef1ca66e | |||
20655b74f0 | |||
ff5163cea5 | |||
1ed563fc7c | |||
cd89c4bdf7 | |||
d98f7d101a | |||
81b497f02d | |||
95bae9565f | |||
|
007fe99f1b | ||
|
e9ed7d4b77 | ||
18038707d0 | |||
|
3607ce2f2b | ||
7ef186c12b | |||
0e062a57e9 | |||
2cc1af2149 | |||
c5ca2aa2dc | |||
5115b88e85 | |||
1a97cae65f | |||
4f2e75eed1 | |||
cf4cc5650e | |||
|
a0c5d4357b | ||
|
d72384efe2 | ||
|
4240f1d563 | ||
|
d9521ae99d | ||
|
fd836b41b5 | ||
|
88edf07e00 | ||
|
15830cf648 | ||
|
62eba388b4 | ||
|
aa4ae61818 | ||
|
df046dc2a0 | ||
|
3fd3fc128c | ||
3c243891d0 | |||
a6521a35ef | |||
851b633e31 | |||
|
c79fed0334 | ||
13086a7f60 | |||
|
cd309a208e | ||
|
4a8e98e21f | ||
3cef1b6f15 | |||
1ac7861508 | |||
|
79eef508b5 | ||
|
c1a6d311e0 | ||
|
70bdf02761 | ||
|
8e90b463ae | ||
|
38c20d09ec | ||
|
c577b17923 | ||
58f0566d1d | |||
8dcc5b212c | |||
98218a4d17 | |||
|
26b46b9119 | ||
|
feb7c7b746 | ||
|
04e0f15629 |
BIN
Dokumentacja/Dokumentacja API.pdf
Normal file
BIN
Dokumentacja/Dokumentacja API.pdf
Normal file
Binary file not shown.
BIN
Dokumentacja/Dokumentacja_wykonanych_prac .pdf
Normal file
BIN
Dokumentacja/Dokumentacja_wykonanych_prac .pdf
Normal file
Binary file not shown.
BIN
Dokumentacja/Dokumetnacja.pdf
Normal file
BIN
Dokumentacja/Dokumetnacja.pdf
Normal file
Binary file not shown.
BIN
Dokumentacja/Najnowszy plan forum.pdf
Normal file
BIN
Dokumentacja/Najnowszy plan forum.pdf
Normal file
Binary file not shown.
BIN
Dokumentacja/Notatka.pdf
Normal file
BIN
Dokumentacja/Notatka.pdf
Normal file
Binary file not shown.
BIN
Dokumentacja/Poprawiona-architektura.pdf
Normal file
BIN
Dokumentacja/Poprawiona-architektura.pdf
Normal file
Binary file not shown.
BIN
Dokumentacja/Scenariusz testow.pdf
Normal file
BIN
Dokumentacja/Scenariusz testow.pdf
Normal file
Binary file not shown.
BIN
Dokumentacja/WstepnaDokumetnacja.pdf
Normal file
BIN
Dokumentacja/WstepnaDokumetnacja.pdf
Normal file
Binary file not shown.
BIN
Dokumentacja/instrukcja obsługi.pdf
Normal file
BIN
Dokumentacja/instrukcja obsługi.pdf
Normal file
Binary file not shown.
@ -1,5 +1,7 @@
|
|||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNet.Identity;
|
||||||
|
using Microsoft.AspNet.Identity.EntityFramework;
|
||||||
|
|
||||||
namespace Forum.DataAccessLayer.Models
|
namespace Forum.DataAccessLayer.Models
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
using Forum.DataAccessLayer.Models;
|
using System.Data.Entity;
|
||||||
|
using Forum.DataAccessLayer.Models;
|
||||||
|
using Microsoft.AspNet.Identity.EntityFramework;
|
||||||
|
|
||||||
namespace Forum.DataAccessLayer
|
namespace Forum.DataAccessLayer
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Forum.DataAccessLayer.Models;
|
using Forum.DataAccessLayer.Models;
|
||||||
|
using Microsoft.AspNet.Identity.Owin;
|
||||||
|
using Microsoft.Owin;
|
||||||
|
using Microsoft.Owin.Security;
|
||||||
|
|
||||||
namespace Forum.DataAccessLayer.Managers
|
namespace Forum.DataAccessLayer.Managers
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
using Forum.DataAccessLayer.Models;
|
using Forum.DataAccessLayer.Models;
|
||||||
using Forum.DataAccessLayer.Services;
|
using Forum.DataAccessLayer.Services;
|
||||||
|
using Microsoft.AspNet.Identity;
|
||||||
|
using Microsoft.AspNet.Identity.EntityFramework;
|
||||||
|
using Microsoft.AspNet.Identity.Owin;
|
||||||
|
using Microsoft.Owin;
|
||||||
|
|
||||||
namespace Forum.DataAccessLayer.Managers
|
namespace Forum.DataAccessLayer.Managers
|
||||||
{
|
{
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
using System.Data.Entity.Migrations;
|
||||||
|
|
||||||
namespace Forum.DataAccessLayer.Migrations
|
namespace Forum.DataAccessLayer.Migrations
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
using System.Data.Entity.Migrations;
|
||||||
|
|
||||||
namespace Forum.DataAccessLayer.Migrations
|
namespace Forum.DataAccessLayer.Migrations
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
using System.Data.Entity.Migrations;
|
||||||
|
|
||||||
namespace Forum.DataAccessLayer.Migrations
|
namespace Forum.DataAccessLayer.Migrations
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
using System.Data.Entity.Migrations;
|
||||||
|
|
||||||
namespace Forum.DataAccessLayer.Migrations
|
namespace Forum.DataAccessLayer.Migrations
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
using System.Data.Entity.Migrations;
|
||||||
|
|
||||||
namespace Forum.DataAccessLayer.Migrations
|
namespace Forum.DataAccessLayer.Migrations
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Data.Entity.Migrations;
|
||||||
using Forum.DataAccessLayer.Models;
|
using Forum.DataAccessLayer.Models;
|
||||||
|
|
||||||
namespace Forum.DataAccessLayer.Migrations
|
namespace Forum.DataAccessLayer.Migrations
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNet.Identity;
|
||||||
|
|
||||||
namespace Forum.DataAccessLayer.Services
|
namespace Forum.DataAccessLayer.Services
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNet.Identity;
|
||||||
|
|
||||||
namespace Forum.DataAccessLayer.Services
|
namespace Forum.DataAccessLayer.Services
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio 15
|
# Visual Studio 15
|
||||||
VisualStudioVersion = 15.0.28307.136
|
VisualStudioVersion = 15.0.26730.15
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Forum", "Forum\Forum.csproj", "{E3C0D1F3-C4CC-4D3D-9960-F20179C60269}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Forum", "Forum\Forum.csproj", "{E3C0D1F3-C4CC-4D3D-9960-F20179C60269}"
|
||||||
EndProject
|
EndProject
|
||||||
@ -13,6 +13,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Forum.DataAccessLayer", "Fo
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MailSender", "MailSender\MailSender.csproj", "{24F3A3E9-F8B9-43A5-A5AB-FA627683750C}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MailSender", "MailSender\MailSender.csproj", "{24F3A3E9-F8B9-43A5-A5AB-FA627683750C}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MailDTO", "MailDTO\MailDTO.csproj", "{07B5BD11-726F-4506-9FD8-783880AAE0EF}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@ -35,6 +37,10 @@ Global
|
|||||||
{24F3A3E9-F8B9-43A5-A5AB-FA627683750C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{24F3A3E9-F8B9-43A5-A5AB-FA627683750C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{24F3A3E9-F8B9-43A5-A5AB-FA627683750C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{24F3A3E9-F8B9-43A5-A5AB-FA627683750C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{24F3A3E9-F8B9-43A5-A5AB-FA627683750C}.Release|Any CPU.Build.0 = Release|Any CPU
|
{24F3A3E9-F8B9-43A5-A5AB-FA627683750C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{07B5BD11-726F-4506-9FD8-783880AAE0EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{07B5BD11-726F-4506-9FD8-783880AAE0EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{07B5BD11-726F-4506-9FD8-783880AAE0EF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{07B5BD11-726F-4506-9FD8-783880AAE0EF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
@ -18,7 +18,8 @@
|
|||||||
|
|
||||||
/* Set width on the form input elements since they're 100% wide by default */
|
/* Set width on the form input elements since they're 100% wide by default */
|
||||||
input,
|
input,
|
||||||
select {
|
select
|
||||||
|
{
|
||||||
max-width: 280px;
|
max-width: 280px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,11 +28,11 @@ select {
|
|||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar a {
|
.navbar a {
|
||||||
color: #fafafa;
|
color: #fafafa;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 {
|
h2{
|
||||||
margin: 1rem 0;
|
margin: 1rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,38 +44,40 @@ h2 {
|
|||||||
width: 28px;
|
width: 28px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-brand {
|
.navbar-brand{
|
||||||
font-size: 2.5rem;
|
font-size:2.5rem;
|
||||||
font-weight: 700;
|
font-weight:700;
|
||||||
height: 70px;
|
height:70px;
|
||||||
line-height: 4rem;
|
line-height:4rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-toggle {
|
.navbar-toggle{
|
||||||
margin-top: 18px;
|
margin-top:18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar > .container {
|
.navbar > .container {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav > li > a:hover, .nav > li > a:focus {
|
.nav > li > a:hover, .nav > li > a:focus{
|
||||||
background-color: #5a5aa7;
|
|
||||||
|
background-color:#5a5aa7 ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.category-list-wrapper {
|
.category-list-wrapper{
|
||||||
width: 80%;
|
width:80%;
|
||||||
margin: 0 auto;
|
margin:0 auto;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.category-wrapper > ul {
|
.category-wrapper > ul {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.category-list {
|
.category-list{
|
||||||
display: grid;
|
display: grid;
|
||||||
padding: 0;
|
padding:0;
|
||||||
grid-row-gap: 2rem;
|
grid-row-gap: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,12 +86,12 @@ h2 {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: #bbbbc5;
|
background-color:#bbbbc5;
|
||||||
border-radius: 1rem;
|
border-radius: 1rem;
|
||||||
position: relative;
|
position:relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.category-list > li > a {
|
.category-list > li > a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #fafafa;
|
color: #fafafa;
|
||||||
font-size: 3rem;
|
font-size: 3rem;
|
||||||
@ -98,34 +101,35 @@ h2 {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 9rem;
|
line-height: 9rem;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.single-category-wrapper {
|
.single-category-wrapper{
|
||||||
padding: 3rem;
|
padding: 3rem;
|
||||||
background-color: #f2f2f2;
|
background-color: #f2f2f2;
|
||||||
border-radius: 1rem;
|
border-radius: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.single-category-wrapper > h2 {
|
.single-category-wrapper > h2 {
|
||||||
margin: 1rem 0;
|
margin:1rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.single-category-wrapper > ul {
|
.single-category-wrapper > ul {
|
||||||
padding: 0;
|
padding:0;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.single-category-wrapper > ul li {
|
.single-category-wrapper > ul li {
|
||||||
padding: 1.5rem 0;
|
padding: 1.5rem 0;
|
||||||
font-size: 1.5rem;
|
font-size:1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.single-category-wrapper > ul li a {
|
.single-category-wrapper > ul li a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #3b3b3b;
|
color: #3b3b3b;
|
||||||
}
|
|
||||||
|
}
|
||||||
|
|
||||||
.add-topic {
|
.add-topic {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -138,13 +142,13 @@ h2 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.add-topic > a {
|
.add-topic > a{
|
||||||
color: #fafafa;
|
color: #fafafa;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
display: block;
|
display:block;
|
||||||
width: 100%;
|
width:100%;
|
||||||
height: 100%;
|
height:100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.form-AddQuestion {
|
.form-AddQuestion {
|
||||||
@ -153,20 +157,21 @@ h2 {
|
|||||||
border-radius: 1rem;
|
border-radius: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-AddQuestion input {
|
.form-AddQuestion input {
|
||||||
max-width: none;
|
max-width: none;
|
||||||
}
|
|
||||||
|
|
||||||
.form-personal-data {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
width: 100%;
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-personal-data .form-group {
|
.form-personal-data{
|
||||||
width: 100%;
|
display: flex;
|
||||||
}
|
flex-direction: column;
|
||||||
|
width:100%;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-personal-data .form-group {
|
||||||
|
width:100%;
|
||||||
|
}
|
||||||
|
|
||||||
.form-AddQuestion input[type=submit], .add-answer input[type=submit] {
|
.form-AddQuestion input[type=submit], .add-answer input[type=submit] {
|
||||||
border: none;
|
border: none;
|
||||||
@ -175,18 +180,20 @@ h2 {
|
|||||||
border-radius: 1rem;
|
border-radius: 1rem;
|
||||||
font-size: 1.8rem;
|
font-size: 1.8rem;
|
||||||
color: #fafafa;
|
color: #fafafa;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-AddQuestion input[type=submit] {
|
.form-AddQuestion input[type=submit]{
|
||||||
margin-top: 1.7rem;
|
margin-top: 1.7rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-AddQuestion__btn {
|
.form-AddQuestion__btn{
|
||||||
width: 100%;
|
width:100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.textarea-wrapper {
|
.textarea-wrapper {
|
||||||
@ -210,20 +217,20 @@ textarea {
|
|||||||
margin-bottom: 5rem;
|
margin-bottom: 5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.answer-list__question h2 {
|
.answer-list__question h2 {
|
||||||
margin: 0;
|
margin:0;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.answer-list__info {
|
.answer-list__info {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items:center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.answer-list__answer {
|
.answer-list__answer {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding: 0;
|
padding:0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.username {
|
.username {
|
||||||
@ -268,9 +275,10 @@ textarea {
|
|||||||
color: #fafafa;
|
color: #fafafa;
|
||||||
width: 20rem;
|
width: 20rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content:center;
|
||||||
align-items: center;
|
align-items:center;
|
||||||
height: 5rem;
|
height: 5rem;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.answer-list__add-btn a {
|
.answer-list__add-btn a {
|
||||||
@ -289,13 +297,25 @@ textarea {
|
|||||||
border-radius: 1rem;
|
border-radius: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wrapper {
|
||||||
|
padding: 3rem;
|
||||||
|
background-color: #f2f2f2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.delete-category__span{
|
||||||
|
font-size:2rem;
|
||||||
|
font-weight:400;
|
||||||
|
margin-bottom:10rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.delete-category__dl {
|
||||||
|
height: 3rem;
|
||||||
|
margin-bottom: 3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
|
||||||
|
|
||||||
@media (min-width: 768px) {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -335,7 +355,7 @@ textarea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.category-list {
|
.category-list {
|
||||||
/*grid-template-columns: 1fr 1fr;*/
|
grid-template-columns: 1fr 1fr;
|
||||||
grid-column-gap: 2rem;
|
grid-column-gap: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -360,4 +380,7 @@ textarea {
|
|||||||
.form-AddQuestion input[type=submit] {
|
.form-AddQuestion input[type=submit] {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,9 +20,7 @@ namespace Forum.Controllers
|
|||||||
private ApplicationSignInManager _signInManager;
|
private ApplicationSignInManager _signInManager;
|
||||||
private ApplicationUserManager _userManager;
|
private ApplicationUserManager _userManager;
|
||||||
|
|
||||||
public AccountController()
|
public AccountController(){}
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public AccountController(ApplicationUserManager userManager, ApplicationSignInManager signInManager )
|
public AccountController(ApplicationUserManager userManager, ApplicationSignInManager signInManager )
|
||||||
{
|
{
|
||||||
@ -88,7 +86,7 @@ namespace Forum.Controllers
|
|||||||
return RedirectToAction("SendCode", new { ReturnUrl = returnUrl, RememberMe = model.RememberMe });
|
return RedirectToAction("SendCode", new { ReturnUrl = returnUrl, RememberMe = model.RememberMe });
|
||||||
case SignInStatus.Failure:
|
case SignInStatus.Failure:
|
||||||
default:
|
default:
|
||||||
ModelState.AddModelError("", "Invalid login attempt.");
|
ModelState.AddModelError("", "Niepoprawny login lub hasło");
|
||||||
return View(model);
|
return View(model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -138,7 +136,7 @@ namespace Forum.Controllers
|
|||||||
|
|
||||||
//
|
//
|
||||||
// GET: /Account/Register
|
// GET: /Account/Register
|
||||||
[AllowAnonymous]
|
[Authorize]
|
||||||
public ActionResult Register()
|
public ActionResult Register()
|
||||||
{
|
{
|
||||||
return View();
|
return View();
|
||||||
@ -147,13 +145,13 @@ namespace Forum.Controllers
|
|||||||
//
|
//
|
||||||
// POST: /Account/Register
|
// POST: /Account/Register
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[AllowAnonymous]
|
[Authorize]
|
||||||
[ValidateAntiForgeryToken]
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<ActionResult> Register(RegisterViewModel model)
|
public async Task<ActionResult> Register(RegisterViewModel model)
|
||||||
{
|
{
|
||||||
if (ModelState.IsValid)
|
if (ModelState.IsValid)
|
||||||
{
|
{
|
||||||
var user = new ProfessionalUser() { UserName = model.Email, Email = model.Email };
|
var user = new ProfessionalUser() { UserName = model.Email, Email = model.Email,FullName = model.FullName};
|
||||||
var result = await UserManager.CreateAsync(user, model.Password);
|
var result = await UserManager.CreateAsync(user, model.Password);
|
||||||
if (result.Succeeded)
|
if (result.Succeeded)
|
||||||
{
|
{
|
||||||
|
114
Trunk/Server/Forum/Forum/Controllers/CategoriesController.cs
Normal file
114
Trunk/Server/Forum/Forum/Controllers/CategoriesController.cs
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Entity;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Net;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.Mvc;
|
||||||
|
using Forum.DataAccessLayer;
|
||||||
|
using Forum.DataAccessLayer.Models;
|
||||||
|
|
||||||
|
namespace Forum.Controllers
|
||||||
|
{
|
||||||
|
[Authorize]
|
||||||
|
public class CategoriesController : Controller
|
||||||
|
{
|
||||||
|
private ApplicationDbContext db = new ApplicationDbContext();
|
||||||
|
|
||||||
|
// GET: Categories
|
||||||
|
public ActionResult Index()
|
||||||
|
{
|
||||||
|
return View(db.Categories.ToList());
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET: Categories/Create
|
||||||
|
public ActionResult Create()
|
||||||
|
{
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
|
// POST: Categories/Create
|
||||||
|
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
||||||
|
// more details see https://go.microsoft.com/fwlink/?LinkId=317598.
|
||||||
|
[HttpPost]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
|
public ActionResult Create([Bind(Include = "Id,CategoryName")] Category category)
|
||||||
|
{
|
||||||
|
if (ModelState.IsValid)
|
||||||
|
{
|
||||||
|
db.Categories.Add(category);
|
||||||
|
db.SaveChanges();
|
||||||
|
return RedirectToAction("Index");
|
||||||
|
}
|
||||||
|
|
||||||
|
return View(category);
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET: Categories/Edit/5
|
||||||
|
public ActionResult Edit(int? id)
|
||||||
|
{
|
||||||
|
if (id == null)
|
||||||
|
{
|
||||||
|
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
|
||||||
|
}
|
||||||
|
Category category = db.Categories.Find(id);
|
||||||
|
if (category == null)
|
||||||
|
{
|
||||||
|
return HttpNotFound();
|
||||||
|
}
|
||||||
|
return View(category);
|
||||||
|
}
|
||||||
|
|
||||||
|
// POST: Categories/Edit/5
|
||||||
|
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
||||||
|
// more details see https://go.microsoft.com/fwlink/?LinkId=317598.
|
||||||
|
[HttpPost]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
|
public ActionResult Edit([Bind(Include = "Id,CategoryName")] Category category)
|
||||||
|
{
|
||||||
|
if (ModelState.IsValid)
|
||||||
|
{
|
||||||
|
db.Entry(category).State = EntityState.Modified;
|
||||||
|
db.SaveChanges();
|
||||||
|
return RedirectToAction("Index");
|
||||||
|
}
|
||||||
|
return View(category);
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET: Categories/Delete/5
|
||||||
|
public ActionResult Delete(int? id)
|
||||||
|
{
|
||||||
|
if (id == null)
|
||||||
|
{
|
||||||
|
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
|
||||||
|
}
|
||||||
|
Category category = db.Categories.Find(id);
|
||||||
|
if (category == null)
|
||||||
|
{
|
||||||
|
return HttpNotFound();
|
||||||
|
}
|
||||||
|
return View(category);
|
||||||
|
}
|
||||||
|
|
||||||
|
// POST: Categories/Delete/5
|
||||||
|
[HttpPost, ActionName("Delete")]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
|
public ActionResult DeleteConfirmed(int id)
|
||||||
|
{
|
||||||
|
Category category = db.Categories.Find(id);
|
||||||
|
db.Categories.Remove(category);
|
||||||
|
db.SaveChanges();
|
||||||
|
return RedirectToAction("Index");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing)
|
||||||
|
{
|
||||||
|
db.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,11 +1,16 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Configuration;
|
||||||
using System.Data.Entity;
|
using System.Data.Entity;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Security.Principal;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
|
using Fluentx.Mvc;
|
||||||
using Forum.DataAccessLayer;
|
using Forum.DataAccessLayer;
|
||||||
using Forum.DataAccessLayer.Models;
|
using Forum.DataAccessLayer.Models;
|
||||||
using Forum.ViewModels;
|
using Forum.ViewModels;
|
||||||
|
using Microsoft.AspNet.Identity;
|
||||||
|
|
||||||
namespace Forum.Controllers
|
namespace Forum.Controllers
|
||||||
{
|
{
|
||||||
@ -99,19 +104,54 @@ namespace Forum.Controllers
|
|||||||
if (question == null)
|
if (question == null)
|
||||||
return HttpNotFound();
|
return HttpNotFound();
|
||||||
|
|
||||||
|
var user = _dbContext.Users.Find(User.Identity.GetUserId());
|
||||||
|
|
||||||
var answer = new Answer()
|
var answer = new Answer()
|
||||||
{
|
{
|
||||||
Content = model.Content,
|
Content = model.Content,
|
||||||
Nick = model.Nick,
|
Nick = model.Nick,
|
||||||
Date = DateTime.Now
|
Date = DateTime.Now,
|
||||||
|
Professional = user
|
||||||
};
|
};
|
||||||
|
|
||||||
question.Answers.Add(answer);
|
question.Answers.Add(answer);
|
||||||
_dbContext.SaveChanges();
|
_dbContext.SaveChanges();
|
||||||
|
|
||||||
|
//Logika wysylania maili
|
||||||
|
if (User.Identity.IsAuthenticated && !string.IsNullOrEmpty(question.ReportersEmail))
|
||||||
|
{
|
||||||
|
var dataToPost = new Dictionary<string, object>();
|
||||||
|
dataToPost.Add("Subject",question.Title);
|
||||||
|
dataToPost.Add("EMailTo",question.ReportersEmail);
|
||||||
|
dataToPost.Add("Content",model.Content);
|
||||||
|
|
||||||
|
return this.RedirectAndPost(ConfigurationManager.AppSettings["MailSenderAddress"], dataToPost);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return RedirectToAction("Question", new {id = model.QuestionId});
|
return RedirectToAction("Question", new {id = model.QuestionId});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Authorize]
|
||||||
|
[System.Web.Mvc.Route("Home/DeleteAnswer/{id}")]
|
||||||
|
public ActionResult DeleteAnswer(int? id)
|
||||||
|
{
|
||||||
|
var answer = _dbContext.Answers.Find(id);
|
||||||
|
var question = _dbContext.Questions.FirstOrDefault(x => x.Answers.Any(y => y.Id == id));
|
||||||
|
|
||||||
|
if (answer != null)
|
||||||
|
{
|
||||||
|
_dbContext.Answers.Remove(answer);
|
||||||
|
_dbContext.SaveChanges();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (question != null)
|
||||||
|
return RedirectToAction("Question", new {id = question.Id});
|
||||||
|
|
||||||
|
return HttpNotFound();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -47,6 +47,12 @@
|
|||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Reference Include="Fluentx, Version=2.0.4.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Fluentx.2.0.4\lib\Fluentx.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Fluentx.Mvc, Version=1.0.4.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Fluentx.Mvc.1.0.4\lib\Fluentx.Mvc.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNet.TelemetryCorrelation, Version=1.0.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNet.TelemetryCorrelation, Version=1.0.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.TelemetryCorrelation.1.0.4\lib\net45\Microsoft.AspNet.TelemetryCorrelation.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.TelemetryCorrelation.1.0.4\lib\net45\Microsoft.AspNet.TelemetryCorrelation.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
@ -176,6 +182,7 @@
|
|||||||
<Compile Include="App_Start\RouteConfig.cs" />
|
<Compile Include="App_Start\RouteConfig.cs" />
|
||||||
<Compile Include="App_Start\Startup.Auth.cs" />
|
<Compile Include="App_Start\Startup.Auth.cs" />
|
||||||
<Compile Include="Controllers\AccountController.cs" />
|
<Compile Include="Controllers\AccountController.cs" />
|
||||||
|
<Compile Include="Controllers\CategoriesController.cs" />
|
||||||
<Compile Include="Controllers\HomeController.cs" />
|
<Compile Include="Controllers\HomeController.cs" />
|
||||||
<Compile Include="Controllers\ManageController.cs" />
|
<Compile Include="Controllers\ManageController.cs" />
|
||||||
<Compile Include="Global.asax.cs">
|
<Compile Include="Global.asax.cs">
|
||||||
@ -215,6 +222,8 @@
|
|||||||
<Content Include="Content\bootstrap.css.map" />
|
<Content Include="Content\bootstrap.css.map" />
|
||||||
<Content Include="Content\bootstrap-theme.min.css.map" />
|
<Content Include="Content\bootstrap-theme.min.css.map" />
|
||||||
<Content Include="Content\bootstrap-theme.css.map" />
|
<Content Include="Content\bootstrap-theme.css.map" />
|
||||||
|
<None Include="Properties\PublishProfiles\forum-inzynieria1 - FTP.pubxml" />
|
||||||
|
<None Include="Properties\PublishProfiles\forum-inzynieria1 - Web Deploy.pubxml" />
|
||||||
<None Include="Scripts\jquery-3.3.1.intellisense.js" />
|
<None Include="Scripts\jquery-3.3.1.intellisense.js" />
|
||||||
<Content Include="Scripts\jquery-3.3.1.js" />
|
<Content Include="Scripts\jquery-3.3.1.js" />
|
||||||
<Content Include="Scripts\jquery-3.3.1.min.js" />
|
<Content Include="Scripts\jquery-3.3.1.min.js" />
|
||||||
@ -281,9 +290,14 @@
|
|||||||
<Content Include="Scripts\popper-utils.js.map" />
|
<Content Include="Scripts\popper-utils.js.map" />
|
||||||
<Content Include="Views\Home\AddQuestion.cshtml" />
|
<Content Include="Views\Home\AddQuestion.cshtml" />
|
||||||
<Content Include="Views\Home\AddAnswer.cshtml" />
|
<Content Include="Views\Home\AddAnswer.cshtml" />
|
||||||
|
<Content Include="Views\Categories\Create.cshtml" />
|
||||||
|
<Content Include="Views\Categories\Delete.cshtml" />
|
||||||
|
<Content Include="Views\Categories\Edit.cshtml" />
|
||||||
|
<Content Include="Views\Categories\Index.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="App_Data\" />
|
<Folder Include="App_Data\" />
|
||||||
|
<Folder Include="Views\Professional\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
|
@ -55,10 +55,10 @@ namespace Forum.Models
|
|||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[DataType(DataType.Password)]
|
[DataType(DataType.Password)]
|
||||||
[Display(Name = "Password")]
|
[Display(Name = "Hasło")]
|
||||||
public string Password { get; set; }
|
public string Password { get; set; }
|
||||||
|
|
||||||
[Display(Name = "Remember me?")]
|
[Display(Name = "Zapamiętaj mnie")]
|
||||||
public bool RememberMe { get; set; }
|
public bool RememberMe { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,13 +72,17 @@ namespace Forum.Models
|
|||||||
[Required]
|
[Required]
|
||||||
[StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
|
[StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
|
||||||
[DataType(DataType.Password)]
|
[DataType(DataType.Password)]
|
||||||
[Display(Name = "Password")]
|
[Display(Name = "Hasło")]
|
||||||
public string Password { get; set; }
|
public string Password { get; set; }
|
||||||
|
|
||||||
[DataType(DataType.Password)]
|
[DataType(DataType.Password)]
|
||||||
[Display(Name = "Confirm password")]
|
[Display(Name = "Potwierdź hasło")]
|
||||||
[Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
|
[Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
|
||||||
public string ConfirmPassword { get; set; }
|
public string ConfirmPassword { get; set; }
|
||||||
|
|
||||||
|
[Display(Name = "Imię i nazwisko")]
|
||||||
|
[Required]
|
||||||
|
public string FullName { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ResetPasswordViewModel
|
public class ResetPasswordViewModel
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
@using Forum.Models
|
@using Forum.Models
|
||||||
@model LoginViewModel
|
@model LoginViewModel
|
||||||
@{
|
@{
|
||||||
ViewBag.Title = "Log in";
|
ViewBag.Title = "Zaloguj się";
|
||||||
}
|
}
|
||||||
|
|
||||||
<h2>@ViewBag.Title.</h2>
|
<h2>@ViewBag.Title.</h2>
|
||||||
@ -11,7 +11,6 @@
|
|||||||
@using (Html.BeginForm("Login", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
|
@using (Html.BeginForm("Login", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
|
||||||
{
|
{
|
||||||
@Html.AntiForgeryToken()
|
@Html.AntiForgeryToken()
|
||||||
<h4>Use a local account to log in.</h4>
|
|
||||||
<hr />
|
<hr />
|
||||||
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
|
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -38,11 +37,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-md-offset-2 col-md-10">
|
<div class="col-md-offset-2 col-md-10">
|
||||||
<input type="submit" value="Log in" class="btn btn-default" />
|
<input type="submit" value="Zaloguj się" class="btn btn-default" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<p>
|
||||||
@Html.ActionLink("Register as a new user", "Register")
|
@*@Html.ActionLink("Utwórz nowego użytkownika", "Register")*@
|
||||||
</p>
|
</p>
|
||||||
@* Enable this once you have account confirmation enabled for password reset functionality
|
@* Enable this once you have account confirmation enabled for password reset functionality
|
||||||
<p>
|
<p>
|
||||||
@ -51,11 +50,7 @@
|
|||||||
}
|
}
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
|
||||||
<section id="socialLoginForm">
|
|
||||||
@Html.Partial("_ExternalLoginsListPartial", new ExternalLoginListViewModel { ReturnUrl = ViewBag.ReturnUrl })
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@section Scripts {
|
@section Scripts {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
@model Forum.Models.RegisterViewModel
|
@model Forum.Models.RegisterViewModel
|
||||||
@{
|
@{
|
||||||
ViewBag.Title = "Register";
|
ViewBag.Title = "Zarejestruj się";
|
||||||
}
|
}
|
||||||
|
|
||||||
<h2>@ViewBag.Title.</h2>
|
<h2>@ViewBag.Title.</h2>
|
||||||
@ -8,7 +8,6 @@
|
|||||||
@using (Html.BeginForm("Register", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
|
@using (Html.BeginForm("Register", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
|
||||||
{
|
{
|
||||||
@Html.AntiForgeryToken()
|
@Html.AntiForgeryToken()
|
||||||
<h4>Create a new account.</h4>
|
|
||||||
<hr />
|
<hr />
|
||||||
@Html.ValidationSummary("", new { @class = "text-danger" })
|
@Html.ValidationSummary("", new { @class = "text-danger" })
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -17,6 +16,12 @@
|
|||||||
@Html.TextBoxFor(m => m.Email, new { @class = "form-control" })
|
@Html.TextBoxFor(m => m.Email, new { @class = "form-control" })
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
@Html.LabelFor(m => m.FullName, new { @class = "col-md-2 control-label" })
|
||||||
|
<div class="col-md-10">
|
||||||
|
@Html.TextBoxFor(m => m.FullName, new { @class = "form-control" })
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" })
|
@Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" })
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
@ -31,7 +36,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-md-offset-2 col-md-10">
|
<div class="col-md-offset-2 col-md-10">
|
||||||
<input type="submit" class="btn btn-default" value="Register" />
|
<input type="submit" class="btn btn-default" value="Zarejestruj" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
44
Trunk/Server/Forum/Forum/Views/Categories/Create.cshtml
Normal file
44
Trunk/Server/Forum/Forum/Views/Categories/Create.cshtml
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
@model Forum.DataAccessLayer.Models.Category
|
||||||
|
|
||||||
|
@{
|
||||||
|
ViewBag.Title = "Create";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
<div class="single-category-wrapper">
|
||||||
|
<h2>Utwórz kategorie</h2>
|
||||||
|
<hr style="border-top: 1px solid #d3d3d3; margin-bottom: 3rem;" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@using (Html.BeginForm())
|
||||||
|
{
|
||||||
|
@Html.AntiForgeryToken()
|
||||||
|
|
||||||
|
<div class="form-horizontal">
|
||||||
|
<hr />
|
||||||
|
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
|
||||||
|
<div class="form-group">
|
||||||
|
@Html.LabelFor(model => model.CategoryName, htmlAttributes: new { @class = "control-label col-md-2" })
|
||||||
|
<div class="col-md-10">
|
||||||
|
@Html.EditorFor(model => model.CategoryName, new { htmlAttributes = new { @class = "form-control" } })
|
||||||
|
@Html.ValidationMessageFor(model => model.CategoryName, "", new { @class = "text-danger" })
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-md-offset-2 col-md-10">
|
||||||
|
<input type="submit" value="Utwórz kategorie" class="answer-list__add-btn" style="height:4rem; width:17rem" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
<div>
|
||||||
|
@Html.ActionLink("Powrót", "Index")
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
@section Scripts {
|
||||||
|
@Scripts.Render("~/bundles/jqueryval")
|
||||||
|
}
|
34
Trunk/Server/Forum/Forum/Views/Categories/Delete.cshtml
Normal file
34
Trunk/Server/Forum/Forum/Views/Categories/Delete.cshtml
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
@model Forum.DataAccessLayer.Models.Category
|
||||||
|
|
||||||
|
@{
|
||||||
|
ViewBag.Title = "Delete";
|
||||||
|
}
|
||||||
|
|
||||||
|
<div class="single-category-wrapper">
|
||||||
|
<h2>Usuwanie ketegorii</h2>
|
||||||
|
<hr style="border-top: 1px solid #d3d3d3;" />
|
||||||
|
|
||||||
|
<span class="delete-category__span">Jesteś pewien, że chcesz usunąć kategorię?</span>
|
||||||
|
<div style="margin-top: 3rem;">
|
||||||
|
|
||||||
|
<dl class="dl-horizontal delete-category__dl">
|
||||||
|
<dt style="text-align:left">
|
||||||
|
@Html.DisplayNameFor(model => model.CategoryName)
|
||||||
|
</dt>
|
||||||
|
<dd style="margin-left:0;">
|
||||||
|
@Html.DisplayFor(model => model.CategoryName)
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
@using (Html.BeginForm())
|
||||||
|
{
|
||||||
|
@Html.AntiForgeryToken()
|
||||||
|
|
||||||
|
<div class="form-actions no-color">
|
||||||
|
<input type="submit" value="Usuń" class="answer-list__add-btn" style="height:4rem; width:17rem; background-color:#af4f4f; margin-bottom: 3rem;" />
|
||||||
|
</div>
|
||||||
|
<div>@Html.ActionLink("Powrót do listy kategorii", "Index")
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</div>
|
42
Trunk/Server/Forum/Forum/Views/Categories/Edit.cshtml
Normal file
42
Trunk/Server/Forum/Forum/Views/Categories/Edit.cshtml
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
@model Forum.DataAccessLayer.Models.Category
|
||||||
|
|
||||||
|
@{
|
||||||
|
ViewBag.Title = "Edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
<div class="single-category-wrapper">
|
||||||
|
|
||||||
|
<h2>Edytuj nazwię kategorii</h2>
|
||||||
|
<hr style="border-top: 1px solid #d3d3d3; margin-bottom: 3rem;" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@using (Html.BeginForm())
|
||||||
|
{
|
||||||
|
@Html.AntiForgeryToken()
|
||||||
|
|
||||||
|
<div class="form-horizontal">
|
||||||
|
|
||||||
|
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
|
||||||
|
@Html.HiddenFor(model => model.Id)
|
||||||
|
<div class="form-group">
|
||||||
|
@Html.LabelFor(model => model.CategoryName, htmlAttributes: new { @class = "control-label col-md-2" })
|
||||||
|
<div class="col-md-10">
|
||||||
|
@Html.EditorFor(model => model.CategoryName, new { htmlAttributes = new { @class = "form-control" } })
|
||||||
|
@Html.ValidationMessageFor(model => model.CategoryName, "", new { @class = "text-danger" })
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-md-offset-2 col-md-10">
|
||||||
|
<input type="submit" value="Zapisz" class="answer-list__add-btn" style="height:4rem; width:17rem" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
<div>
|
||||||
|
@Html.ActionLink("Powrót do listy kategorii", "Index")
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@section Scripts {
|
||||||
|
@Scripts.Render("~/bundles/jqueryval")
|
||||||
|
}
|
35
Trunk/Server/Forum/Forum/Views/Categories/Index.cshtml
Normal file
35
Trunk/Server/Forum/Forum/Views/Categories/Index.cshtml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
@model IEnumerable<Forum.DataAccessLayer.Models.Category>
|
||||||
|
|
||||||
|
@{
|
||||||
|
ViewBag.Title = "Index";
|
||||||
|
}
|
||||||
|
|
||||||
|
<div class="single-category-wrapper">
|
||||||
|
|
||||||
|
<h2 style="margin-bottom:3rem;">Kategorie</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<table class="table">
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
Nazwa kategorii
|
||||||
|
</th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
@foreach (var item in Model)
|
||||||
|
{
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.CategoryName)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.ActionLink("Edytuj", "Edit", new { id = item.Id }) |
|
||||||
|
@Html.ActionLink("Usuń", "Delete", new { id = item.Id })
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
</table>
|
||||||
|
<p class="answer-list__add-btn">
|
||||||
|
@Html.ActionLink("Utwórz kategorie", "Create")
|
||||||
|
</p>
|
||||||
|
</div>
|
@ -3,24 +3,43 @@
|
|||||||
ViewBag.Title = "AddAnswer";
|
ViewBag.Title = "AddAnswer";
|
||||||
}
|
}
|
||||||
|
|
||||||
<h2>AddAnswer</h2>
|
|
||||||
|
<div class="add-answer">
|
||||||
|
|
||||||
|
<h2>Dodaj odpowiedź</h2>
|
||||||
|
|
||||||
|
<hr style="border-top: 1px solid #d3d3d3; margin-bottom: 3rem;" />
|
||||||
|
|
||||||
|
|
||||||
@using (Html.BeginForm("AddAnswer", "Home", FormMethod.Post))
|
@using (Html.BeginForm("AddAnswer", "Home", FormMethod.Post))
|
||||||
{
|
{
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@Html.LabelFor(model => model.Nick, new { @class = "label-form" })
|
@{
|
||||||
@Html.EditorFor(model => model.Nick, new { htmlAttributes = new { @class = "form-control" } })
|
if (User.Identity.IsAuthenticated)
|
||||||
|
{
|
||||||
|
<label>Odpowiedz jako @User.Identity.Name</label>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
@Html.EditorFor(model => model.Nick, new { htmlAttributes = new { @class = "form-control", placeholder = "Nick" } })
|
||||||
|
}
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@Html.LabelFor(model => model.Content, new { @class = "label-form" })
|
|
||||||
@Html.EditorFor(model => model.Content, new { htmlAttributes = new { @class = "form-control" } })
|
@Html.TextAreaFor(model => model.Content, new { @class = "form-control", @id = "exampleFormControlTextarea3", rows = 7, placeholder = "Odpowiedź" })<br />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Html.HiddenFor(model=>model.QuestionId)
|
@Html.HiddenFor(model=>model.QuestionId)
|
||||||
|
|
||||||
<input type="submit" value="Zgłoś" />
|
<input type="submit" value="Zgłoś odpowiedź" />
|
||||||
}
|
}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
@ -3,36 +3,47 @@
|
|||||||
ViewBag.Title = "AddQuestion";
|
ViewBag.Title = "AddQuestion";
|
||||||
}
|
}
|
||||||
|
|
||||||
<h2>AddQuestion</h2>
|
|
||||||
|
|
||||||
|
|
||||||
@using (Html.BeginForm("AddQuestion", "Home", FormMethod.Post))
|
@using (Html.BeginForm("AddQuestion", "Home", FormMethod.Post))
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-AddQuestion">
|
||||||
|
<h2>Dodaj zapytanie</h2>
|
||||||
|
<hr style="border-top: 1px solid #d3d3d3; margin-bottom:3rem;" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@Html.LabelFor(model => model.Title, new { @class = "label-form" })
|
@Html.EditorFor(model => model.Title, new { htmlAttributes = new { @class = "form-control", placeholder="Temat" } })
|
||||||
@Html.EditorFor(model => model.Title, new { htmlAttributes = new { @class = "form-control" } })
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@Html.LabelFor(model => model.Content, new { @class = "label-form" })
|
|
||||||
@Html.EditorFor(model => model.Content, new { htmlAttributes = new { @class = "form-control" } })
|
|
||||||
|
@Html.TextAreaFor(model => model.Content, new { @class="form-control", @id = "exampleFormControlTextarea3", rows=7, placeholder="Treść zapytania" })<br />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-personal-data">
|
||||||
|
<div class="form-group">
|
||||||
|
@Html.EditorFor(model => model.Nick, new { htmlAttributes = new { @class = "form-control", placeholder="Nick" } })
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@Html.LabelFor(model => model.Nick, new { @class = "label-form" })
|
@Html.EditorFor(model => model.Email, new { htmlAttributes = new { @class = "form-control", placeholder="Adres email" } })
|
||||||
@Html.EditorFor(model => model.Nick, new { htmlAttributes = new { @class = "form-control" } })
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-AddQuestion__btn">
|
||||||
@Html.LabelFor(model => model.Email, new { @class = "label-form" })
|
|
||||||
@Html.EditorFor(model => model.Email, new { htmlAttributes = new { @class = "form-control" } })
|
|
||||||
|
@Html.DropDownListFor(x=>x.CategoryId,new SelectList(Model.Categories,"Id", "CategoryName"), new { @class = "form-control" })
|
||||||
|
|
||||||
|
<input type="submit" value="Dodaj zapytanie"/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@Html.DropDownListFor(x=>x.CategoryId,new SelectList(Model.Categories,"Id", "CategoryName"))
|
|
||||||
|
|
||||||
<input type="submit" value="Zgłoś"/>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,15 +4,33 @@
|
|||||||
ViewBag.Title = Model.CategoryName;
|
ViewBag.Title = Model.CategoryName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
<div class="single-category-wrapper">
|
||||||
|
|
||||||
<h2>@Model.CategoryName</h2>
|
<h2>@Model.CategoryName</h2>
|
||||||
|
|
||||||
@Html.ActionLink("Dodaj pytanie", "AddQuestion", "Home",new {category=Model.CategoryName},null)
|
<hr style="border-top: 1px solid #d3d3d3" />
|
||||||
|
|
||||||
<ul>
|
<ul class="single-category__topic">
|
||||||
@{
|
@{
|
||||||
foreach (var question in Model.Questions)
|
foreach (var question in Model.Questions)
|
||||||
{
|
{
|
||||||
<li>@Html.ActionLink(question.Title,"Question","Home",new{id=question.Id},null)</li>
|
string title = question.Title;
|
||||||
|
if (String.IsNullOrEmpty(title))
|
||||||
|
{
|
||||||
|
title = "Brak tytułu pytania";
|
||||||
|
}
|
||||||
|
|
||||||
|
<li>@Html.ActionLink(title, "Question", "Home", new { id = question.Id }, null)</li>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<button class="add-topic">
|
||||||
|
|
||||||
|
@Html.ActionLink("Dodaj zapytanie", "AddQuestion", "Home", new { category = Model.CategoryName }, null)
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,16 +3,17 @@
|
|||||||
@{
|
@{
|
||||||
ViewBag.Title = "Strona Główna";
|
ViewBag.Title = "Strona Główna";
|
||||||
}
|
}
|
||||||
|
<div class="category-list-wrapper">
|
||||||
<ul>
|
<ul class="category-list">
|
||||||
|
|
||||||
@{
|
@{
|
||||||
foreach (var category in Model)
|
foreach (var category in Model)
|
||||||
{
|
{
|
||||||
<li>
|
<li>
|
||||||
@Html.ActionLink(category.CategoryName,"Category","Home",new{name=category.CategoryName},null)
|
@Html.ActionLink(category.CategoryName, "Category", "Home", new { name = category.CategoryName }, null)
|
||||||
</li>
|
</li>
|
||||||
}
|
|
||||||
}
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
@ -1,28 +1,65 @@
|
|||||||
@model Forum.DataAccessLayer.Models.Question
|
@using WebGrease.Css.Extensions
|
||||||
|
@model Forum.DataAccessLayer.Models.Question
|
||||||
|
|
||||||
@{
|
@{
|
||||||
ViewBag.Title = @Model.Title;
|
ViewBag.Title = @Model.Title;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
<div class="answer-list__question">
|
||||||
|
|
||||||
|
|
||||||
|
<div class="answer-list__info">
|
||||||
|
<h2>@Model.Title</h2>
|
||||||
@Model.PostDate
|
@Model.PostDate
|
||||||
|
|
||||||
<h2>@Model.Title</h2>
|
</div>
|
||||||
|
<hr style="border-top: 1px solid #d3d3d3" />
|
||||||
|
|
||||||
<div>
|
|
||||||
|
<div class="answer-list__question__content">
|
||||||
@Model.Content
|
@Model.Content
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr/>
|
</div>
|
||||||
@Html.ActionLink("Dodaj odpowiedź","AddAnswer",new{id=@Model.Id})
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
<b>Odpowiedzi</b>
|
|
||||||
<ul>
|
<h3 class="answer-list__heading">Odpowiedzi</h3>
|
||||||
|
<ul class="answer-list__answer">
|
||||||
@{
|
@{
|
||||||
foreach (var answer in Model.Answers)
|
foreach (var answer in Model.Answers)
|
||||||
{
|
{
|
||||||
<li>@answer.Nick @answer.Date @answer.Content </li>
|
<li class="answer-list__single-answer">
|
||||||
|
<div class="answer-list__answer__info" @{if (answer.Professional != null) { <text> style="background-color: #7ecc2a" </text> }}>
|
||||||
|
@{
|
||||||
|
if (answer.Professional != null)
|
||||||
|
{
|
||||||
|
<span class="username">@answer.Professional.FullName napisał(a)</span>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<span class="username">@answer.Nick napisał(a)</span>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@{
|
||||||
|
if (User.Identity.IsAuthenticated)
|
||||||
|
{
|
||||||
|
@Html.ActionLink("Usuń odpowiedź", "DeleteAnswer", new {id = answer.Id},new{@style="color:#fff;"});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@answer.Date
|
||||||
|
</div>
|
||||||
|
<div class="answer-list__content">
|
||||||
|
@answer.Content
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<div class="answer-list__add-btn">
|
||||||
|
|
||||||
|
@Html.ActionLink("Dodaj odpowiedź", "AddAnswer", new { id = @Model.Id })
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-fixed-top">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||||
@ -17,13 +17,14 @@
|
|||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
</button>
|
</button>
|
||||||
@Html.ActionLink("Application name", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
|
@Html.ActionLink("FORUM", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
|
||||||
</div>
|
</div>
|
||||||
<div class="navbar-collapse collapse">
|
<div class="navbar-collapse collapse">
|
||||||
<ul class="nav navbar-nav">
|
<ul class="nav navbar-nav">
|
||||||
<li>@Html.ActionLink("Home", "Index", "Home")</li>
|
@if (User.Identity.IsAuthenticated)
|
||||||
<li>@Html.ActionLink("About", "About", "Home")</li>
|
{
|
||||||
<li>@Html.ActionLink("Contact", "Contact", "Home")</li>
|
<li>@Html.ActionLink("Zarządzaj kategoriami", "Index", "Categories")</li>
|
||||||
|
}
|
||||||
</ul>
|
</ul>
|
||||||
@Html.Partial("_LoginPartial")
|
@Html.Partial("_LoginPartial")
|
||||||
</div>
|
</div>
|
||||||
@ -33,7 +34,7 @@
|
|||||||
@RenderBody()
|
@RenderBody()
|
||||||
<hr />
|
<hr />
|
||||||
<footer>
|
<footer>
|
||||||
<p>© @DateTime.Now.Year - My ASP.NET Application</p>
|
<p>© @DateTime.Now.Year - Grupa 1CF Inżynieria oprogramowania</p>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -7,16 +7,16 @@
|
|||||||
|
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
<li>
|
<li>
|
||||||
@Html.ActionLink("Hello " + User.Identity.GetUserName() + "!", "Index", "Manage", routeValues: null, htmlAttributes: new { title = "Manage" })
|
@Html.ActionLink("Witaj " + User.Identity.GetUserName() + "!", "Index", "Manage", routeValues: null, htmlAttributes: new { title = "Manage" })
|
||||||
</li>
|
</li>
|
||||||
<li><a href="javascript:document.getElementById('logoutForm').submit()">Log off</a></li>
|
<li>@Html.ActionLink("Dodaj profesjonalistę", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })</li>
|
||||||
|
<li><a href="javascript:document.getElementById('logoutForm').submit()">Wyloguj się</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
<li>@Html.ActionLink("Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })</li>
|
<li>@Html.ActionLink("Zaloguj się", "Login", "Account", routeValues: null, htmlAttributes: new {id = "loginLink"})</li>
|
||||||
<li>@Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\ForumInzyneria1.mdf;Initial Catalog=ForumInzyneria1;Integrated Security=True" providerName="System.Data.SqlClient" />
|
<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\ForumInzyneria1.mdf;Initial Catalog=ForumInzyneria1;Integrated Security=True" providerName="System.Data.SqlClient" />
|
||||||
</connectionStrings>
|
</connectionStrings>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
|
<add key="MailSenderAddress" value="http://mailsender-inzynieria1.azurewebsites.net/Home/Index" />
|
||||||
<add key="webpages:Version" value="3.0.0.0" />
|
<add key="webpages:Version" value="3.0.0.0" />
|
||||||
<add key="webpages:Enabled" value="false" />
|
<add key="webpages:Enabled" value="false" />
|
||||||
<add key="ClientValidationEnabled" value="true" />
|
<add key="ClientValidationEnabled" value="true" />
|
||||||
@ -86,7 +87,7 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
||||||
<bindingRedirect oldVersion="1.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
<package id="Antlr" version="3.5.0.2" targetFramework="net461" />
|
<package id="Antlr" version="3.5.0.2" targetFramework="net461" />
|
||||||
<package id="bootstrap" version="3.3.7" targetFramework="net461" />
|
<package id="bootstrap" version="3.3.7" targetFramework="net461" />
|
||||||
<package id="EntityFramework" version="6.2.0" targetFramework="net461" />
|
<package id="EntityFramework" version="6.2.0" targetFramework="net461" />
|
||||||
|
<package id="Fluentx" version="2.0.4" targetFramework="net461" />
|
||||||
|
<package id="Fluentx.Mvc" version="1.0.4" targetFramework="net461" />
|
||||||
<package id="jQuery" version="3.3.1" targetFramework="net461" />
|
<package id="jQuery" version="3.3.1" targetFramework="net461" />
|
||||||
<package id="jQuery.Validation" version="1.17.0" targetFramework="net461" />
|
<package id="jQuery.Validation" version="1.17.0" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNet.Identity.Core" version="2.2.2" targetFramework="net461" />
|
<package id="Microsoft.AspNet.Identity.Core" version="2.2.2" targetFramework="net461" />
|
||||||
|
15
Trunk/Server/Forum/MailDTO/MailDTO.cs
Normal file
15
Trunk/Server/Forum/MailDTO/MailDTO.cs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace MailDTO
|
||||||
|
{
|
||||||
|
public class MailDTO
|
||||||
|
{
|
||||||
|
public string Subject { get; set; }
|
||||||
|
public string EMailTo { get; set; }
|
||||||
|
public string Content { get; set; }
|
||||||
|
}
|
||||||
|
}
|
47
Trunk/Server/Forum/MailDTO/MailDTO.csproj
Normal file
47
Trunk/Server/Forum/MailDTO/MailDTO.csproj
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{07B5BD11-726F-4506-9FD8-783880AAE0EF}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>MailDTO</RootNamespace>
|
||||||
|
<AssemblyName>MailDTO</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="MailDTO.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
36
Trunk/Server/Forum/MailDTO/Properties/AssemblyInfo.cs
Normal file
36
Trunk/Server/Forum/MailDTO/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// General Information about an assembly is controlled through the following
|
||||||
|
// set of attributes. Change these attribute values to modify the information
|
||||||
|
// associated with an assembly.
|
||||||
|
[assembly: AssemblyTitle("MailDTO")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("MailDTO")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
|
// to COM components. If you need to access a type in this assembly from
|
||||||
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
|
[assembly: Guid("07b5bd11-726f-4506-9fd8-783880aae0ef")]
|
||||||
|
|
||||||
|
// Version information for an assembly consists of the following four values:
|
||||||
|
//
|
||||||
|
// Major Version
|
||||||
|
// Minor Version
|
||||||
|
// Build Number
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
|
// by using the '*' as shown below:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
@ -301,6 +301,11 @@ textarea {
|
|||||||
height: 200px;
|
height: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.w100 {
|
||||||
|
width: 100% !important;
|
||||||
|
max-width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
.form-emailsend
|
.form-emailsend
|
||||||
{
|
{
|
||||||
color: black;
|
color: black;
|
||||||
|
@ -13,8 +13,8 @@ namespace MailSender.Controllers
|
|||||||
[HttpGet]
|
[HttpGet]
|
||||||
public ActionResult Index()
|
public ActionResult Index()
|
||||||
{
|
{
|
||||||
var model = JsonConvert.SerializeObject(new Models.MailModel() { Content = "DDD", EMailTo = "ddd@o2.pl", Subject = "LLLLLL" });
|
//var model = JsonConvert.SerializeObject(new Models.MailModel() { Content = "DDD", EMailTo = "ddd@o2.pl", Subject = "LLLLLL" });
|
||||||
TempData.Add("mailModel", model);
|
//TempData.Add("mailModel", model);
|
||||||
return RedirectToAction("Index", "Home");
|
return RedirectToAction("Index", "Home");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,49 +1,59 @@
|
|||||||
using System.Net.Mail;
|
using System.Net.Mail;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
using System.Net.Http;
|
|
||||||
using System.Web.ModelBinding;
|
using System.Web.ModelBinding;
|
||||||
using System;
|
using System;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System.Configuration;
|
||||||
|
|
||||||
namespace MailSender.Controllers
|
namespace MailSender.Controllers
|
||||||
{
|
{
|
||||||
|
[RoutePrefix("")]
|
||||||
public class HomeController : Controller
|
public class HomeController : Controller
|
||||||
{
|
{
|
||||||
[HttpGet]
|
[HttpPost]
|
||||||
public ActionResult Index()
|
public ActionResult Index([System.Web.Http.FromBody]MailDTO.MailDTO mail)
|
||||||
{
|
{
|
||||||
string jsonString = TempData["mailModel"] as string;
|
var model = new Models.MailModel(mail);
|
||||||
Models.MailModel model = null;
|
TempData.Add("mailMod", model);
|
||||||
if (!String.IsNullOrEmpty(jsonString))
|
|
||||||
model = JsonConvert.DeserializeObject<Models.MailModel>(jsonString);
|
|
||||||
if (model == null)
|
|
||||||
model = new Models.MailModel();
|
|
||||||
return View(model);
|
return View(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public ActionResult Error(string errMsg)
|
public ActionResult Index()
|
||||||
{
|
{
|
||||||
ViewData.Add("errMsg", errMsg);
|
if(TempData["mailMod"] != null)
|
||||||
return View();
|
{
|
||||||
|
return View(TempData["mailMod"]);
|
||||||
|
}
|
||||||
|
return View(new Models.MailModel());
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[System.Web.Http.HttpGet]
|
||||||
|
public ActionResult Error(string errMsg)
|
||||||
|
{
|
||||||
|
TempData.Add("errMsg", errMsg);
|
||||||
|
return RedirectToAction("Index");
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.Web.Mvc.HttpPost]
|
||||||
public ActionResult Send(MailSender.Models.MailModel model)
|
public ActionResult Send(MailSender.Models.MailModel model)
|
||||||
{
|
{
|
||||||
if (ModelState.IsValid)
|
if (ModelState.IsValid)
|
||||||
{
|
{
|
||||||
var smtpClient = new SmtpClient(Settings.smtpServer, Settings.smtpPort)
|
var smtpClient = new SmtpClient(ConfigurationManager.AppSettings["smtp-server"],
|
||||||
|
Int32.Parse(ConfigurationManager.AppSettings["smtp-port"]))
|
||||||
{
|
{
|
||||||
Credentials = new NetworkCredential(Settings.user, Settings.pass),
|
Credentials = new NetworkCredential(
|
||||||
|
ConfigurationManager.AppSettings["user-mail"],
|
||||||
|
ConfigurationManager.AppSettings["pass-mail"]),
|
||||||
EnableSsl = true
|
EnableSsl = true
|
||||||
};
|
};
|
||||||
smtpClient.Send(Settings.user, model.EMailTo, model.Subject, model.Content);
|
smtpClient.Send(ConfigurationManager.AppSettings["user-mail"], model.EMailTo, model.Subject, model.Content);
|
||||||
return RedirectToAction("Index");
|
return Redirect(ConfigurationManager.AppSettings["forum-address"]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return RedirectToAction("Error", new { errMsg = "Error nie umiesz pisac maila menelu" });
|
return RedirectToAction("Error", new { errMsg = "Błąd wysyłania wiadomości e-mail." });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -64,12 +64,21 @@
|
|||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System.Web.DynamicData" />
|
<Reference Include="System.Web.DynamicData" />
|
||||||
<Reference Include="System.Web.Entity" />
|
<Reference Include="System.Web.Entity" />
|
||||||
<Reference Include="System.Web.ApplicationServices" />
|
<Reference Include="System.Web.ApplicationServices" />
|
||||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Web.Http.Common, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Web.Http.Common.4.0.20126.16343\lib\net40\System.Web.Http.Common.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="System.Web" />
|
<Reference Include="System.Web" />
|
||||||
<Reference Include="System.Web.Extensions" />
|
<Reference Include="System.Web.Extensions" />
|
||||||
@ -166,7 +175,6 @@
|
|||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Models\MailModel.cs" />
|
<Compile Include="Models\MailModel.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Settings.cs" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Content\bootstrap-theme.css" />
|
<Content Include="Content\bootstrap-theme.css" />
|
||||||
@ -182,6 +190,8 @@
|
|||||||
<Content Include="ApplicationInsights.config">
|
<Content Include="ApplicationInsights.config">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
<None Include="Properties\PublishProfiles\mailsender-inzynieria1 - FTP.pubxml" />
|
||||||
|
<None Include="Properties\PublishProfiles\mailsender-inzynieria1 - Web Deploy.pubxml" />
|
||||||
<None Include="Scripts\jquery-3.3.1.intellisense.js" />
|
<None Include="Scripts\jquery-3.3.1.intellisense.js" />
|
||||||
<Content Include="Scripts\jquery-3.3.1.js" />
|
<Content Include="Scripts\jquery-3.3.1.js" />
|
||||||
<Content Include="Scripts\jquery-3.3.1.min.js" />
|
<Content Include="Scripts\jquery-3.3.1.min.js" />
|
||||||
@ -223,6 +233,12 @@
|
|||||||
<Content Include="Scripts\jquery-3.3.1.slim.min.map" />
|
<Content Include="Scripts\jquery-3.3.1.slim.min.map" />
|
||||||
<Content Include="Scripts\jquery-3.3.1.min.map" />
|
<Content Include="Scripts\jquery-3.3.1.min.map" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\MailDTO\MailDTO.csproj">
|
||||||
|
<Project>{07b5bd11-726f-4506-9fd8-783880aae0ef}</Project>
|
||||||
|
<Name>MailDTO</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using MailDTO;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace MailSender.Models
|
namespace MailSender.Models
|
||||||
@ -17,7 +18,7 @@ namespace MailSender.Models
|
|||||||
public string Subject { get; set; }
|
public string Subject { get; set; }
|
||||||
|
|
||||||
[DataType(DataType.EmailAddress)]
|
[DataType(DataType.EmailAddress)]
|
||||||
[Required(AllowEmptyStrings = false, ErrorMessage = "Musisz wprowadzić adres e-mail")]
|
[Required(AllowEmptyStrings = false, ErrorMessage = "Musisz wprowadzić adres e-mail odbiorcy")]
|
||||||
[RegularExpression(".*@.*\\..*", ErrorMessage = "Zły format")]
|
[RegularExpression(".*@.*\\..*", ErrorMessage = "Zły format")]
|
||||||
[Display(Name = "Adres odbiorcy")]
|
[Display(Name = "Adres odbiorcy")]
|
||||||
[EmailAddress(ErrorMessage ="Zły format")]
|
[EmailAddress(ErrorMessage ="Zły format")]
|
||||||
@ -29,5 +30,16 @@ namespace MailSender.Models
|
|||||||
[StringLength(500, ErrorMessage = "Message has to have between 1 and 500 chars", MinimumLength = 1)]
|
[StringLength(500, ErrorMessage = "Message has to have between 1 and 500 chars", MinimumLength = 1)]
|
||||||
public string Content { get; set; }
|
public string Content { get; set; }
|
||||||
|
|
||||||
|
public MailModel()
|
||||||
|
{
|
||||||
|
Content = EMailTo = Subject = string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MailModel(MailDTO.MailDTO DTO)
|
||||||
|
{
|
||||||
|
this.Content = DTO.Content;
|
||||||
|
this.EMailTo = DTO.EMailTo;
|
||||||
|
this.Subject = DTO.Subject;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,10 +0,0 @@
|
|||||||
namespace MailSender
|
|
||||||
{
|
|
||||||
public class Settings
|
|
||||||
{
|
|
||||||
public static string smtpServer = "smtp.gmail.com";
|
|
||||||
public static int smtpPort = 587;
|
|
||||||
public static string user = "ttestowy504@gmail.com";
|
|
||||||
public static string pass = "ChyzySoftware";
|
|
||||||
}
|
|
||||||
}
|
|
@ -4,28 +4,30 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@if (ViewData.ContainsKey("mailErr"))
|
@if (TempData["mailErr"] != null)
|
||||||
{
|
{
|
||||||
<h3>Error: @ViewData["mailErr"]</h3>
|
string errStr = TempData["mailErr"] as string;
|
||||||
|
<h3>Error: @TempData["mailErr"]</h3>
|
||||||
|
TempData["mailErr"] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@using (Html.BeginForm("Send", "Home", FormMethod.Post))
|
@using (Html.BeginForm("Send", "Home", FormMethod.Post))
|
||||||
{
|
{
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@Html.LabelFor(i => i.Subject, new { @class = "label-form" })
|
@Html.LabelFor(i => i.Subject, new { @class = "label-form" })
|
||||||
@Html.EditorFor(i => i.Subject, new { htmlAttributes = new { @value = Model.Subject, @class = "form-control form-emailsend", @placeholder = "Temat" } })
|
@Html.EditorFor(i => i.Subject, new { htmlAttributes = new { @value = Model.Subject, @class = "form-control form-emailsend w100", @placeholder = "Temat" } })
|
||||||
@Html.ValidationMessageFor(i => i.Subject)
|
@Html.ValidationMessageFor(i => i.Subject)
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@Html.LabelFor(i => i.EMailTo, new { @class = "label-form" })
|
@Html.LabelFor(i => i.EMailTo, new { @class = "label-form" })
|
||||||
@Html.EditorFor(i => i.EMailTo, new { htmlAttributes = new { @value = Model.EMailTo, @class = "form-control form-emailsend", @placeholder = "Do" } })
|
@Html.EditorFor(i => i.EMailTo, new { htmlAttributes = new { @value = Model.EMailTo, @class = "form-control form-emailsend w100", @placeholder = "Do" } })
|
||||||
@Html.ValidationMessageFor(i => i.EMailTo)
|
@Html.ValidationMessageFor(i => i.EMailTo)
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group" >
|
<div class="form-group" >
|
||||||
@Html.LabelFor(i => i.Content, new { @class = "label-form" })
|
@Html.LabelFor(i => i.Content, new { @class = "label-form" })
|
||||||
@Html.EditorFor(i => i.Content, new { htmlAttributes = new { @value = Model.Content, @class = "form-control", @id = "exampleFormControlTextarea3", @rows=9, @placeholder = "Odpowiedź" } })
|
@Html.EditorFor(i => i.Content, new { htmlAttributes = new { @value = Model.Content, @class = "form-control w100", @id = "exampleFormControlTextarea3", @rows=9, @placeholder = "Odpowiedź" } })
|
||||||
@Html.ValidationMessageFor(i => i.Content)
|
@Html.ValidationMessageFor(i => i.Content)
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -20,10 +20,8 @@
|
|||||||
@Html.ActionLink("E-mail", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
|
@Html.ActionLink("E-mail", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
|
||||||
</div>
|
</div>
|
||||||
<div class="navbar-collapse collapse">
|
<div class="navbar-collapse collapse">
|
||||||
<ul class="nav navbar-nav">
|
<ul class="nav navbar-nar">
|
||||||
<li>@Html.ActionLink("Strona Główna", "Index", "Home")</li>
|
|
||||||
<li>@Html.ActionLink("O mnie", "About", "Home")</li>
|
|
||||||
<li>@Html.ActionLink("Kontakt", "Contact", "Home")</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -10,6 +10,11 @@
|
|||||||
</configSections>
|
</configSections>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<add key="webpages:Version" value="3.0.0.0" />
|
<add key="webpages:Version" value="3.0.0.0" />
|
||||||
|
<add key="user-mail" value="ttestowy504@gmail.com" />
|
||||||
|
<add key="pass-mail" value="ChyzySoftware" />
|
||||||
|
<add key="smtp-port" value="587" />
|
||||||
|
<add key="smtp-server" value="smtp.gmail.com" />
|
||||||
|
<add key="forum-address" value="http://forum-inzynieria1.azurewebsites.net/home/index"/>
|
||||||
<add key="webpages:Enabled" value="false" />
|
<add key="webpages:Enabled" value="false" />
|
||||||
<add key="ClientValidationEnabled" value="true" />
|
<add key="ClientValidationEnabled" value="true" />
|
||||||
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
|
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
|
||||||
@ -65,7 +70,12 @@
|
|||||||
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" preCondition="managedHandler" />
|
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" preCondition="managedHandler" />
|
||||||
</modules>
|
</modules>
|
||||||
<validation validateIntegratedModeConfiguration="false" />
|
<validation validateIntegratedModeConfiguration="false" />
|
||||||
</system.webServer>
|
<handlers>
|
||||||
|
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
|
||||||
|
<remove name="OPTIONSVerbHandler" />
|
||||||
|
<remove name="TRACEVerbHandler" />
|
||||||
|
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||||
|
</handlers></system.webServer>
|
||||||
<entityFramework>
|
<entityFramework>
|
||||||
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
|
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
|
||||||
<parameters>
|
<parameters>
|
||||||
|
@ -19,6 +19,8 @@
|
|||||||
<package id="Microsoft.AspNet.TelemetryCorrelation" version="1.0.0" targetFramework="net461" />
|
<package id="Microsoft.AspNet.TelemetryCorrelation" version="1.0.0" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net461" />
|
<package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNet.Web.Optimization.pl" version="1.1.3" targetFramework="net461" />
|
<package id="Microsoft.AspNet.Web.Optimization.pl" version="1.1.3" targetFramework="net461" />
|
||||||
|
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net461" />
|
||||||
|
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNet.WebPages" version="3.2.4" targetFramework="net461" />
|
<package id="Microsoft.AspNet.WebPages" version="3.2.4" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNet.WebPages.pl" version="3.2.4" targetFramework="net461" />
|
<package id="Microsoft.AspNet.WebPages.pl" version="3.2.4" targetFramework="net461" />
|
||||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.0" targetFramework="net461" />
|
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.0" targetFramework="net461" />
|
||||||
@ -29,5 +31,6 @@
|
|||||||
<package id="Newtonsoft.Json" version="11.0.1" targetFramework="net461" />
|
<package id="Newtonsoft.Json" version="11.0.1" targetFramework="net461" />
|
||||||
<package id="Owin" version="1.0" targetFramework="net461" />
|
<package id="Owin" version="1.0" targetFramework="net461" />
|
||||||
<package id="System.Diagnostics.DiagnosticSource" version="4.4.1" targetFramework="net461" />
|
<package id="System.Diagnostics.DiagnosticSource" version="4.4.1" targetFramework="net461" />
|
||||||
|
<package id="System.Web.Http.Common" version="4.0.20126.16343" targetFramework="net461" />
|
||||||
<package id="WebGrease" version="1.6.0" targetFramework="net461" />
|
<package id="WebGrease" version="1.6.0" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
Loading…
Reference in New Issue
Block a user