* LocalizedText.resx:

* LocalizedText.fr.resx:
* RssFeedsFormatter.cs:
* LocalizedText.Designer.cs: 

* Web.csproj:
* Contact.aspx:
* AOEMail.aspx:
* AssemblyInfo.aspx:
* ReferencedAssemblies.aspx: refactoring

* RssFeeds.cs: Rss feeds in progress

* HomeController.cs: - refactoring
- fixes contact page


* style.css: css for textarea and input

* Index.aspx: Contact & Assembly info in index

* YavscModel.csproj: Rss feeds
This commit is contained in:
Paul Schneider 2015-01-23 17:34:09 +01:00
commit 7694f4d8b3
13 changed files with 261 additions and 63 deletions

View file

@ -44,7 +44,7 @@ namespace Yavsc.Controllers
}
}
public ActionResult ReferencedAssemblies()
public ActionResult AssemblyInfo()
{
AssemblyName[] model = GetType ().Assembly.GetReferencedAssemblies ();
@ -76,17 +76,34 @@ namespace Yavsc.Controllers
return View ();
}
public ActionResult AOEMail (string reason, string body)
public ActionResult Contact (string email, string reason, string body)
{
if (email==null)
ModelState.AddModelError("email","Enter your email");
if (reason==null)
ModelState.AddModelError("reason","Please, fill in a reason");
if (body==null)
ModelState.AddModelError("body","Please, fill in a body");
if (!ModelState.IsValid)
return View ();
// requires valid owner and admin email?
using (System.Net.Mail.MailMessage msg = new MailMessage(owneremail,admail,"Poke : "+reason,body))
if (OwnerEmail == null)
throw new Exception ("No site owner!");
using (System.Net.Mail.MailMessage msg = new MailMessage(email,OwnerEmail,"[Contact] "+reason,body))
{
msg.CC.Add(new MailAddress(Admail));
using (System.Net.Mail.SmtpClient sc = new SmtpClient())
{
sc.Send (msg);
return View ();
ViewData ["Message"] = LocalizedText.Message_sent;
return View (new { reason="", body="" });
}
}
}
}
}