From 57b54662ec46a82989ec06257428597b2e18363c Mon Sep 17 00:00:00 2001 From: Arkadiusz Jurga Date: Sun, 16 Dec 2018 13:35:41 +0100 Subject: [PATCH] Wystylizowany Email-sender --- .../Server/Forum/MailSender/Content/Site.css | 20 +++++++++++++++++-- .../Forum/MailSender/Models/MailModel.cs | 11 +++++----- .../Forum/MailSender/Views/Home/Index.cshtml | 10 +++++----- 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/Trunk/Server/Forum/MailSender/Content/Site.css b/Trunk/Server/Forum/MailSender/Content/Site.css index ba2f80f..e516194 100644 --- a/Trunk/Server/Forum/MailSender/Content/Site.css +++ b/Trunk/Server/Forum/MailSender/Content/Site.css @@ -295,10 +295,26 @@ textarea { } - .form-control--input { - width: 30%; + width: 280px; + height: 200px; +} + +.form-emailsend +{ + color: black; + width: 500px; +} +.answer-list__add-btn--sendButton +{ + /*margin-left: 18%;*/ + width:7%; + +} +#exampleFormControlTextarea3 +{ + width: 280px; } diff --git a/Trunk/Server/Forum/MailSender/Models/MailModel.cs b/Trunk/Server/Forum/MailSender/Models/MailModel.cs index b414ad6..8e2f4ed 100644 --- a/Trunk/Server/Forum/MailSender/Models/MailModel.cs +++ b/Trunk/Server/Forum/MailSender/Models/MailModel.cs @@ -16,19 +16,20 @@ namespace MailSender.Models //[ForeignKey] //public int UserId //id usera ktory wyslal maila - + [Display(Name = "Temat")] [Required(AllowEmptyStrings = false)] public string Subject { get; set; } - + [DataType(DataType.EmailAddress)] - [Required(AllowEmptyStrings = false, ErrorMessage = "You need to type in an e-mail")] - [RegularExpression(".*@.*\\..*", ErrorMessage = "You typed in e-mail in wrong format")] + [Required(AllowEmptyStrings = false, ErrorMessage = "Musisz wprowadzić adres e-mail")] + [RegularExpression(".*@.*\\..*", ErrorMessage = "Zły format")] [Display(Name = "Adres odbiorcy")] + [EmailAddress(ErrorMessage ="Zły format")] public string EMailTo { get; set; } [Display(Name ="Odpowiedź")] - [Required(AllowEmptyStrings = false, ErrorMessage = "You need to type in a message to send")] + [Required(AllowEmptyStrings = false, ErrorMessage = "Proszę wprowadzić odpowiedź")] [DataType(DataType.MultilineText)] [StringLength(500, ErrorMessage = "Message has to have between 1 and 500 chars", MinimumLength = 1)] public string Content { get; set; } diff --git a/Trunk/Server/Forum/MailSender/Views/Home/Index.cshtml b/Trunk/Server/Forum/MailSender/Views/Home/Index.cshtml index 6111fe0..8d382a9 100644 --- a/Trunk/Server/Forum/MailSender/Views/Home/Index.cshtml +++ b/Trunk/Server/Forum/MailSender/Views/Home/Index.cshtml @@ -1,5 +1,5 @@ @model MailSender.Models.MailModel -@{ + @{ //ViewBag.Title = "Mail Sender"; } @@ -13,23 +13,23 @@ {
@Html.LabelFor(i => i.Subject, new { @class = "label-form" }) - @Html.EditorFor(i => i.Subject, new { htmlAttributes = new { @class = "form-control form-control--input", @placeholder = "Temat" } }) + @Html.EditorFor(i => i.Subject, new { htmlAttributes = new { @class = "form-control form-emailsend", @placeholder = "Temat" } }) @Html.ValidationMessageFor(i => i.Subject)
@Html.LabelFor(i => i.EMailTo, new { @class = "label-form" }) - @Html.EditorFor(i => i.EMailTo, new { htmlAttributes = new { @class = "form-control form-control--input", @placeholder = "Do" } }) + @Html.EditorFor(i => i.EMailTo, new { htmlAttributes = new { @class = "form-control form-emailsend", @placeholder = "Do" } }) @Html.ValidationMessageFor(i => i.EMailTo)
@Html.LabelFor(i => i.Content, new { @class = "label-form" }) - @Html.EditorFor(i => i.Content, new { htmlAttributes = new { @class = "form-control form-control--input", @placeholder = "Odpowiedź" } }) + @Html.EditorFor(i => i.Content, new { htmlAttributes = new { @class = "form-control", @id = "exampleFormControlTextarea3", @rows=9, @placeholder = "Odpowiedź" } }) @Html.ValidationMessageFor(i => i.Content)
- + } @section Scripts {