Updated notification messages

This commit is contained in:
Denis Volkov 2022-12-20 08:50:35 -08:00
parent e58ac60253
commit 1f1751c19b
7 changed files with 254 additions and 213 deletions

View File

@ -31,7 +31,6 @@ namespace Amen.Controllers
ManageUrl = controllerHelper.Absolute(this.Url, Url.Action("Index", "Manage", new { affiliatekey = prayer.Affiliate.Key })) ManageUrl = controllerHelper.Absolute(this.Url, Url.Action("Index", "Manage", new { affiliatekey = prayer.Affiliate.Key }))
}; };
ViewBag.LogoUrl = controllerHelper.Absolute(this.Url, Url.Content("~/Content/Images/amen-logo-flyin.gif")); ViewBag.LogoUrl = controllerHelper.Absolute(this.Url, Url.Content("~/Content/Images/amen-logo-flyin.gif"));
return View("~/Views/Email/Prayed.cshtml", model); return View("~/Views/Email/Prayed.cshtml", model);
} }
@ -47,7 +46,6 @@ namespace Amen.Controllers
ManageUrl = controllerHelper.Absolute(this.Url, Url.Action("Index", "Manage", new { affiliatekey = prayer.Affiliate.Key })) ManageUrl = controllerHelper.Absolute(this.Url, Url.Action("Index", "Manage", new { affiliatekey = prayer.Affiliate.Key }))
}; };
ViewBag.LogoUrl = controllerHelper.Absolute(this.Url, Url.Content("~/Content/Images/amen-logo-flyin.gif")); ViewBag.LogoUrl = controllerHelper.Absolute(this.Url, Url.Content("~/Content/Images/amen-logo-flyin.gif"));
return View("~/Views/Email/PrayerSubmitted.cshtml", model); return View("~/Views/Email/PrayerSubmitted.cshtml", model);
} }
@ -64,7 +62,6 @@ namespace Amen.Controllers
ManageUrl = controllerHelper.Absolute(this.Url, Url.Action("Index", "Manage", new { affiliatekey = prayer.Affiliate.Key })) ManageUrl = controllerHelper.Absolute(this.Url, Url.Action("Index", "Manage", new { affiliatekey = prayer.Affiliate.Key }))
}; };
ViewBag.LogoUrl = controllerHelper.Absolute(this.Url, Url.Content("~/Content/Images/amen-logo-flyin.gif")); ViewBag.LogoUrl = controllerHelper.Absolute(this.Url, Url.Content("~/Content/Images/amen-logo-flyin.gif"));
return View("~/Views/Email/NoteSent.cshtml", model); return View("~/Views/Email/NoteSent.cshtml", model);
} }
@ -82,7 +79,6 @@ namespace Amen.Controllers
NotificationTypeMessage = string.Format("A new {0} has been submitted.", prayer.IsPraise ? "Praise" : "Prayer") NotificationTypeMessage = string.Format("A new {0} has been submitted.", prayer.IsPraise ? "Praise" : "Prayer")
}; };
ViewBag.LogoUrl = controllerHelper.Absolute(this.Url, Url.Content("~/Content/Images/amen-logo-flyin.gif")); ViewBag.LogoUrl = controllerHelper.Absolute(this.Url, Url.Content("~/Content/Images/amen-logo-flyin.gif"));
return View("~/Views/Email/AdminNotification.cshtml", model); return View("~/Views/Email/AdminNotification.cshtml", model);
} }
@ -206,34 +202,21 @@ namespace Amen.Controllers
var model = new PrayerEmailViewModel(); var model = new PrayerEmailViewModel();
model.Title = prayer.Summary; model.Title = prayer.Summary;
model.Subject = "We are praying for you!"; model.Subject = "We are praying for you!";
if (appUser != null)
{
model.To = appUser.Email;
}
else
{
model.To = prayer.AnonymousEmail;
}
model.DetailUrl = controller.controllerHelper.Absolute(urlHelper, urlHelper.Action("Detail", "Prayer", new { id = prayer.Id, affiliatekey = affiliate.Key })); model.DetailUrl = controller.controllerHelper.Absolute(urlHelper, urlHelper.Action("Detail", "Prayer", new { id = prayer.Id, affiliatekey = affiliate.Key }));
model.ManageUrl = controller.controllerHelper.Absolute(urlHelper, urlHelper.Action("Index", "Manage", new { affiliatekey = affiliate.Key })); model.ManageUrl = controller.controllerHelper.Absolute(urlHelper, urlHelper.Action("Index", "Manage", new { affiliatekey = affiliate.Key }));
model.IsUserLoggedIn = !string.IsNullOrEmpty(prayer.ApplicationUserId); model.IsUserLoggedIn = !string.IsNullOrEmpty(prayer.ApplicationUserId);
model.IsPraise = prayer.IsPraise; model.IsPraise = prayer.IsPraise;
if (CanSendEmail(affiliate, ref appUser, prayer, false, true)) if (CanSendEmail(affiliate, ref appUser, prayer, false, true) && (prayer.ContactPreference == "email" || prayer.ContactPreference == "any"))
{ {
if (prayer.ContactPreference == "email" || prayer.ContactPreference == "any") var body = ControllerHelper.RenderViewToString(controller.ControllerContext, "~/Views/Email/PrayerSubmitted.cshtml", model);
{ SendEmailMessage(prayer.AnonymousEmail, model.Subject, body);
var body = ControllerHelper.RenderViewToString(controller.ControllerContext, "~/Views/Email/PrayerSubmitted.cshtml", model);
SendEmailMessage(model.To, model.Subject, body);
}
} }
if (CanSendText(affiliate, ref appUser, prayer)) if (CanSendText(affiliate, ref appUser, prayer) && (prayer.ContactPreference == "phone" || prayer.ContactPreference == "any"))
{ {
if (prayer.ContactPreference == "phone" || prayer.ContactPreference == "any") var message = string.Format("We are praying for you! {0}", model.DetailUrl);
{ SendSmsMessage(affiliate.TwilioSID, affiliate.TwilioAuthToken, affiliate.TwilioPhoneNumber, prayer.AnonymousPhone, message);
SendSmsMessage(affiliate.TwilioSID, affiliate.TwilioAuthToken, affiliate.TwilioPhoneNumber, appUser.PhoneNumber, string.Format("We are praying for you! {0}", model.DetailUrl));
}
} }
if (affiliate != null if (affiliate != null
@ -247,9 +230,7 @@ namespace Amen.Controllers
{ {
var controller2 = GetBaseController(affiliate); var controller2 = GetBaseController(affiliate);
controller2.ViewBag.LogoUrl = controller2.controllerHelper.Absolute(urlHelper, urlHelper.Content("~/Content/Images/amen-logo-flyin.gif")); controller2.ViewBag.LogoUrl = controller2.controllerHelper.Absolute(urlHelper, urlHelper.Content("~/Content/Images/amen-logo-flyin.gif"));
var adminModel = new AdminEmailViewModel(); var adminModel = new AdminEmailViewModel();
adminModel.PrayerTitle = prayer.Summary; adminModel.PrayerTitle = prayer.Summary;
adminModel.PrayerContent = prayer.Content; adminModel.PrayerContent = prayer.Content;
adminModel.Subject = string.Format("Admin Notification: {0} Requested", prayer.IsPraise ? "Praise" : "Prayer"); adminModel.Subject = string.Format("Admin Notification: {0} Requested", prayer.IsPraise ? "Praise" : "Prayer");
@ -261,9 +242,7 @@ namespace Amen.Controllers
} }
adminModel.DetailUrl = controller2.controllerHelper.Absolute(urlHelper, urlHelper.Action("Detail", "Prayer", new { id = prayer.Id, affiliatekey = affiliate.Key, isPraise = prayer.IsPraise })); adminModel.DetailUrl = controller2.controllerHelper.Absolute(urlHelper, urlHelper.Action("Detail", "Prayer", new { id = prayer.Id, affiliatekey = affiliate.Key, isPraise = prayer.IsPraise }));
adminModel.ManageUrl = controller2.controllerHelper.Absolute(urlHelper, urlHelper.Action("Index", "Group")); adminModel.ManageUrl = controller2.controllerHelper.Absolute(urlHelper, urlHelper.Action("Index", "Group"));
var body = ControllerHelper.RenderViewToString(controller2.ControllerContext, "~/Views/Email/AdminNotification.cshtml", adminModel); var body = ControllerHelper.RenderViewToString(controller2.ControllerContext, "~/Views/Email/AdminNotification.cshtml", adminModel);
SendEmailMessage(adminModel.To, adminModel.Subject, body); SendEmailMessage(adminModel.To, adminModel.Subject, body);
} }
} }
@ -274,51 +253,37 @@ namespace Amen.Controllers
var controller = GetBaseController(affiliate); var controller = GetBaseController(affiliate);
model.DetailUrl = controller.controllerHelper.Absolute(urlHelper, urlHelper.Action("Detail", "Prayer", new { id = prayer.Id, affiliatekey = affiliate.Key })); model.DetailUrl = controller.controllerHelper.Absolute(urlHelper, urlHelper.Action("Detail", "Prayer", new { id = prayer.Id, affiliatekey = affiliate.Key }));
model.ManageUrl = controller.controllerHelper.Absolute(urlHelper, urlHelper.Action("Index", "Manage", new { affiliatekey = affiliate.Key })); model.ManageUrl = controller.controllerHelper.Absolute(urlHelper, urlHelper.Action("Index", "Manage", new { affiliatekey = affiliate.Key }));
model.Title = prayer.Summary;
if (CanSendText(affiliate, ref appUser, prayer)) if (CanSendEmail(affiliate, ref appUser, prayer) && (prayer.ContactPreference == "email" || prayer.ContactPreference == "any"))
{ {
if (prayer.ContactPreference == "phone" || prayer.ContactPreference == "any") controller.ViewBag.LogoUrl = controller.controllerHelper.Absolute(urlHelper, urlHelper.Content("~/Content/Images/amen-logo-flyin.gif"));
{ var subject = !string.IsNullOrEmpty(affiliate.SendMessagePrayed) ? affiliate.SendMessagePrayed : "Someone just prayed for you!";
SendSmsMessage(affiliate.TwilioSID, affiliate.TwilioAuthToken, affiliate.TwilioPhoneNumber, appUser.PhoneNumber, string.Format("Someone just prayed for you! {0}", model.DetailUrl)); var body = ControllerHelper.RenderViewToString(controller.ControllerContext, "~/Views/Email/Prayed.cshtml", model);
} SendEmailMessage(prayer.AnonymousEmail, subject, body);
} }
if (CanSendEmail(affiliate, ref appUser, prayer)) if (CanSendText(affiliate, ref appUser, prayer) && (prayer.ContactPreference == "phone" || prayer.ContactPreference == "any"))
{ {
if (prayer.ContactPreference == "email" || prayer.ContactPreference == "any") var message = string.Format("Someone just prayed for you! {0}", model.DetailUrl);
{ SendSmsMessage(affiliate.TwilioSID, affiliate.TwilioAuthToken, affiliate.TwilioPhoneNumber, prayer.AnonymousPhone, message);
controller.ViewBag.LogoUrl = controller.controllerHelper.Absolute(urlHelper, urlHelper.Content("~/Content/Images/amen-logo-flyin.gif"));
model.Title = prayer.Summary;
model.Subject = !string.IsNullOrEmpty(affiliate.SendMessagePrayed) ? affiliate.SendMessagePrayed : "Someone just prayed for you!";
model.To = appUser.Email;
var body = ControllerHelper.RenderViewToString(controller.ControllerContext, "~/Views/Email/Prayed.cshtml", model);
SendEmailMessage(model.To, model.Subject, body);
}
} }
} }
public static void NotifyNoteSent(UrlHelper urlHelper, Affiliate affiliate, ApplicationUser appUser, Prayer prayer, PrayerNote note) public static void NotifyNoteSent(UrlHelper urlHelper, Affiliate affiliate, ApplicationUser appUser, Prayer prayer, PrayerNote note)
{ {
if (!CanSendEmail(affiliate, ref appUser, prayer, true) || !prayer.EnableEmailNote) if (!CanSendEmail(affiliate, ref appUser, prayer, true) || !prayer.EnableEmailNote) { return; }
return;
var controller = GetBaseController(affiliate); var controller = GetBaseController(affiliate);
controller.ViewBag.LogoUrl = controller.controllerHelper.Absolute(urlHelper, urlHelper.Content("~/Content/Images/amen-logo-flyin.gif")); controller.ViewBag.LogoUrl = controller.controllerHelper.Absolute(urlHelper, urlHelper.Content("~/Content/Images/amen-logo-flyin.gif"));
var model = new PrayerEmailViewModel(); var model = new PrayerEmailViewModel();
model.Title = prayer.Summary; model.Title = prayer.Summary;
model.NoteText = note.NoteText; model.NoteText = note.NoteText;
model.Subject = !string.IsNullOrEmpty(affiliate.SendMessagePrayed) ? affiliate.SendMessageNote : "A note from Amen"; model.Subject = !string.IsNullOrEmpty(affiliate.SendMessagePrayed) ? affiliate.SendMessageNote : "A note from Amen";
model.To = appUser.Email;
model.DetailUrl = controller.controllerHelper.Absolute(urlHelper, urlHelper.Action("Detail", "Prayer", new { id = prayer.Id, affiliatekey = affiliate.Key })); model.DetailUrl = controller.controllerHelper.Absolute(urlHelper, urlHelper.Action("Detail", "Prayer", new { id = prayer.Id, affiliatekey = affiliate.Key }));
model.ManageUrl = controller.controllerHelper.Absolute(urlHelper, urlHelper.Action("Index", "Manage", new { affiliatekey = affiliate.Key })); model.ManageUrl = controller.controllerHelper.Absolute(urlHelper, urlHelper.Action("Index", "Manage", new { affiliatekey = affiliate.Key }));
var body = ControllerHelper.RenderViewToString(controller.ControllerContext, "~/Views/Email/NoteSent.cshtml", model); var body = ControllerHelper.RenderViewToString(controller.ControllerContext, "~/Views/Email/NoteSent.cshtml", model);
SendEmailMessage(model.To, model.Subject, body); SendEmailMessage(prayer.AnonymousEmail, model.Subject, body);
} }
public static void NotifyPrayerFlagged(UrlHelper urlHelper, Affiliate affiliate, Prayer prayer, PrayerFlag flag) public static void NotifyPrayerFlagged(UrlHelper urlHelper, Affiliate affiliate, Prayer prayer, PrayerFlag flag)
@ -327,22 +292,16 @@ namespace Amen.Controllers
{ {
var controller = GetBaseController(affiliate); var controller = GetBaseController(affiliate);
controller.ViewBag.LogoUrl = controller.controllerHelper.Absolute(urlHelper, urlHelper.Content("~/Content/Images/amen-logo-flyin.gif")); controller.ViewBag.LogoUrl = controller.controllerHelper.Absolute(urlHelper, urlHelper.Content("~/Content/Images/amen-logo-flyin.gif"));
var adminModel = new AdminEmailViewModel();
var model = new AdminEmailViewModel(); adminModel.NotificationTypeMessage = "Prayer Flagged";
model.NotificationTypeMessage = "Prayer Flagged"; adminModel.PrayerTitle = prayer.Summary;
model.PrayerTitle = prayer.Summary; if (!string.IsNullOrEmpty(flag.Reason)) { adminModel.PrayerContent = "Has been flagged for the following reason: " + flag.Reason; }
if (!string.IsNullOrEmpty(flag.Reason)) adminModel.Subject = "An Amen Prayer Has Been Flagged";
{ adminModel.To = affiliate.EmailFlag;
model.PrayerContent = "Has been flagged for the following reason: " + flag.Reason; adminModel.DetailUrl = controller.controllerHelper.Absolute(urlHelper, urlHelper.Action("Detail", "Prayer", new { id = prayer.Id, affiliatekey = affiliate.Key }));
} adminModel.ManageUrl = controller.controllerHelper.Absolute(urlHelper, urlHelper.Action("Index", "Group", new { affiliatekey = affiliate.Key }));
model.Subject = "An Amen Prayer Has Been Flagged"; var body = ControllerHelper.RenderViewToString(controller.ControllerContext, "~/Views/Email/AdminNotification.cshtml", adminModel);
model.To = affiliate.EmailFlag; SendEmailMessage(adminModel.To, adminModel.Subject, body);
model.DetailUrl = controller.controllerHelper.Absolute(urlHelper, urlHelper.Action("Detail", "Prayer", new { id = prayer.Id, affiliatekey = affiliate.Key }));
model.ManageUrl = controller.controllerHelper.Absolute(urlHelper, urlHelper.Action("Index", "Group", new { affiliatekey = affiliate.Key }));
var body = ControllerHelper.RenderViewToString(controller.ControllerContext, "~/Views/Email/AdminNotification.cshtml", model);
SendEmailMessage(model.To, model.Subject, body);
} }
} }
} }

View File

@ -600,49 +600,49 @@ $(function () {
} }
if (name.length == 0) { if (name.length == 0) {
alert('First Name is required'); alert('First Name is required.');
return false; return false;
} }
if (content.length == 0) { if (content.length == 0) {
alert('Prayer Request is required'); alert('Prayer Request is required.');
return false; return false;
} }
if (email.length == 0) { if (email.length == 0) {
alert('Email is required'); alert('Email is required.');
return false; return false;
} }
if (contactpreference == 'phone' || contactpreference == 'any') { if (contactpreference == 'phone' || contactpreference == 'any') {
if (phone.length == 0) { if (phone.length == 0) {
alert('Phone is required'); alert('Phone number is required for text notifications.');
return false; return false;
} }
} }
if (email && email.length > 0) { if (email && email.length > 0) {
if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email))) { if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email))) {
alert("You have entered an invalid email address!"); alert("You have entered an invalid email address. Please, check and try again.");
return (false); return (false);
} }
} }
if (phone && phone.length > 0) { if (phone && phone.length > 0) {
if (!(/\(?([0-9]{3})\)?([ .-]?)([0-9]{3})\2([0-9]{4})/.test(phone))) { if (!(/\(?([0-9]{3})\)?([ .-]?)([0-9]{3})\2([0-9]{4})/.test(phone))) {
alert("You have entered an invalid phone number!"); alert("You have entered an invalid phone number. Please, check and try again.");
return (false); return (false);
} }
} }
if (UpperCasePercent(content) > 0.5) { if (UpperCasePercent(content) > 0.5) {
alert('Please do not use ALL CAPS') alert('Please do not use ALL CAPS.')
return false; return false;
} }
var containsLinkRegex = new RegExp(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)?/gi); var containsLinkRegex = new RegExp(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)?/gi);
if (content.match(containsLinkRegex)) { if (content.match(containsLinkRegex)) {
alert('Please do not include links') alert('Please do not include links.')
return false; return false;
} }

View File

@ -8,36 +8,63 @@
<head> <head>
<title>@Model.Subject</title> <title>@Model.Subject</title>
<link href="https://fonts.googleapis.com/css?family=Open+Sans|Source+Sans+Pro:300,400" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Open+Sans|Source+Sans+Pro:300,400" rel="stylesheet">
<style>
body {
font-family: 'Source Sans Pro', sans-serif;
background-color: #fff;
line-height: 22pt;
font-size: 16px;
color: #333;
}
.message {
width: 600px;
margin-left: auto;
margin-right: auto;
background-color: #fff;
color: #333;
}
.wrapper {
padding: 20px;
}
.title {
color: #1a346b;
font-size: 22px;
margin-bottom: 10px;
}
.logo {
width: 100%;
}
a {
color: rgba(150, 173,62, 1.0);
}
</style>
</head> </head>
<body style="font-family: 'Source Sans Pro', sans-serif; background-color: #fff; line-height: 22pt; font-size:17px">
<div style="width: 600px; margin-left: auto; margin-right: auto; background-color: #FFF;"> <body>
<div class="message">
<div class="wrapper">
<div style="padding: 20px;"> <h1 class="title">@Model.NotificationTypeMessage</h1>
<b style="color: #1a346b; font-size:22px">@Model.NotificationTypeMessage</b>
<div style="padding: 20px; border: solid 1px #808080;"> <div style="padding: 20px; border: solid 1px #808080;">
<b style="color: #1a346b; font-size:22px">@Model.PrayerTitle</b> <b style="color: #1a346b; font-size:22px">@Model.PrayerTitle</b>
<p style="margin-top:10px">@Model.PrayerContent</p> <p style="margin-top:10px">@Model.PrayerContent</p>
</div> </div>
<ul> <ul>
<li>You can turn on/off notifications <a style="color: rgba(150, 173 ,62, 1.0);" href="@Model.ManageUrl">here</a>.</li> <li>You can turn on/off notifications <a style="color: rgba(150, 173 ,62, 1.0);" href="@Model.ManageUrl">here</a>.</li>
<li>Details can be found <a style="color: rgba(150, 173 ,62, 1.0);" href="@Model.DetailUrl">here</a>.</li> <li>Details can be found <a style="color: rgba(150, 173 ,62, 1.0);" href="@Model.DetailUrl">here</a>.</li>
</ul> </ul>
<p> <p>May God bless you,</p>
May God bless you,
<br /> <img src="@ViewBag.LogoUrl" title="Amen, The Prayer App" style="width: 600px; height: 169px" />
<img src="@ViewBag.LogoUrl" title="Amen, The Prayer App" style="width: 600px; height: 169px" />
</p>
</div> </div>
</div> </div>
</body> </body>
</html> </html>

View File

@ -8,48 +8,63 @@
<head> <head>
<title>@Model.Subject</title> <title>@Model.Subject</title>
<link href="https://fonts.googleapis.com/css?family=Open+Sans|Source+Sans+Pro:300,400" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Open+Sans|Source+Sans+Pro:300,400" rel="stylesheet">
<style>
body {
font-family: 'Source Sans Pro', sans-serif;
background-color: #fff;
line-height: 22pt;
font-size: 16px;
color: #333;
}
.message {
width: 600px;
margin-left: auto;
margin-right: auto;
background-color: #fff;
color: #333;
}
.wrapper {
padding: 20px;
}
.title {
color: #1a346b;
font-size: 22px;
margin-bottom: 10px;
}
.logo {
width: 100%;
}
a {
color: rgba(150, 173,62, 1.0);
}
</style>
</head> </head>
<body style="font-family: 'Source Sans Pro', sans-serif; background-color: #fff; line-height: 22pt; font-size:16px">
<div style="width: 600px; margin-left: auto; margin-right: auto; background-color: #FFF;"> <body>
<div class="message">
<div class="wrapper">
<h1 class="title">You've received a note from someone who is praying for you.</h1>
<p>@Model.NoteText</p>
<div style="padding: 20px;">
<p> <p>This was in response to this prayer you posted:</p>
<b style="color: #1a346b; font-size:22px">
You've received a note from someone who is praying for you.
</b>
</p>
<p> <p><a href="@Model.DetailUrl">@Model.Title</a></p>
@Model.NoteText
</p>
<p> <p>We hope you are encouraged by knowing that others are lifting you up in prayer.</p>
This was in response to this prayer you posted:
</p>
<p> <!--<p>When it's appropriate, we'd love to hear how God is answering this request.<br> Share your story <a href="@Model.DetailUrl">here</a>.</p>-->
<a style="color: rgba(150, 173 ,62, 1.0);" href="@Model.DetailUrl">@Model.Title</a>
</p>
<p> <!--<p>You can turn on/off notifications for this prayer <a href="@Model.ManageUrl">here</a>.</p>-->
We hope you are encouraged by knowing that others are lifting you up in prayer.
</p>
<p> <p>May God bless you,</p>
When it's appropriate, we'd love to hear how God is answering this request.<br> Share your story <a style="color: rgba(150, 173 ,62, 1.0);" href="@Model.DetailUrl">here</a>.
</p>
<p> <img class="logo" src="@ViewBag.LogoUrl" title="Amen, The Prayer App" />
You can turn on/off notifications for this prayer <a style="color: rgba(150, 173 ,62, 1.0);" href="@Model.ManageUrl">here</a>.
</p>
<p>
May God bless you,
</p>
<img src="@ViewBag.LogoUrl" title="Amen, The Prayer App" style="width: 600px; height: 169px" />
</div> </div>
</div> </div>
</body> </body>

View File

@ -8,43 +8,61 @@
<head> <head>
<title>@Model.Subject</title> <title>@Model.Subject</title>
<link href="https://fonts.googleapis.com/css?family=Open+Sans|Source+Sans+Pro:300,400" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Open+Sans|Source+Sans+Pro:300,400" rel="stylesheet">
<style>
body {
font-family: 'Source Sans Pro', sans-serif;
background-color: #fff;
line-height: 22pt;
font-size: 16px;
color: #333;
}
.message {
width: 600px;
margin-left: auto;
margin-right: auto;
background-color: #fff;
color: #333;
}
.wrapper {
padding: 20px;
}
.title {
color: #1a346b;
font-size: 22px;
margin-bottom: 10px;
}
.logo {
width: 100%;
}
a {
color: rgba(150, 173,62, 1.0);
}
</style>
</head> </head>
<body style="font-family: 'Source Sans Pro', sans-serif; background-color: #fff; line-height: 22pt; font-size:16px"> <body>
<div class="message">
<div class="wrapper">
<h1 class="title">Someone just prayed for you!</h1>
<div style="width: 600px; margin-left: auto; margin-right: auto; background-color: #FFF;"> <p>You're being prayed for! Someone just prayed for the following prayer you posted:</p>
<div style="padding: 20px;"> <p><a href="@Model.DetailUrl">@Model.Title</a></p>
<p>
<b style="color: #1a346b; font-size:22px">
Someone just prayed for you!
</b>
</p>
<p>
You're being prayed for! Someone just prayed for the following prayer you posted:
</p>
<p>
<a style="color: rgba(150, 173 ,62, 1.0);" href="@Model.DetailUrl">@Model.Title</a>
</p>
<p>We hope you are encouraged by knowing that others are lifting you up in prayer.</p> <p>We hope you are encouraged by knowing that others are lifting you up in prayer.</p>
<p> <!--<p>When it's appropriate, we'd love to hear how God is answering this request.<br> Share your story <a href="@Model.DetailUrl">here</a>.</p>-->
When it's appropriate, we'd love to hear how God is answering this request.<br> Share your story <a style="color: rgba(150, 173 ,62, 1.0);" href="@Model.DetailUrl">here</a>.
</p>
<p> <!--<p>You can turn on/off notifications for this prayer <a href="@Model.ManageUrl">here</a>.</p>-->
You can turn on/off notifications for this prayer <a style="color: rgba(150, 173 ,62, 1.0);" href="@Model.ManageUrl">here</a>.
</p>
<p> <p>May God bless you,</p>
May God bless you,
</p>
<img src="@ViewBag.LogoUrl" title="Amen, The Prayer App" style="width: 600px; height: 169px" />
<img class="logo" src="@ViewBag.LogoUrl" title="Amen, The Prayer App" />
</div> </div>
</div> </div>
</body> </body>

View File

@ -8,32 +8,64 @@
<head> <head>
<title>@Model.Subject</title> <title>@Model.Subject</title>
<link href="https://fonts.googleapis.com/css?family=Open+Sans|Source+Sans+Pro:300,400" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Open+Sans|Source+Sans+Pro:300,400" rel="stylesheet">
</head> <style>
<body style="font-family: 'Source Sans Pro', sans-serif; background-color: #fff; line-height: 22pt; font-size:17px"> body {
font-family: 'Source Sans Pro', sans-serif;
background-color: #fff;
line-height: 22pt;
font-size: 16px;
color: #333;
}
<div style="width: 600px; margin-left: auto; margin-right: auto; background-color: #FFF;"> .message {
width: 600px;
<div style="padding: 20px;"> margin-left: auto;
<p><b style="color: #1a346b; font-size:22px">Thanks for posting your prayer request.</b></p> margin-right: auto;
<p style="margin-top:10px">God knows your heart and your needs, and He hears you!</p> background-color: #fff;
<p>Let others know you need prayer. You can <a style="color: rgba(150, 173 ,62, 1.0);" href="@Model.DetailUrl">share this request</a> via email or your favorite social media platform.</p> color: #333;
}
.wrapper {
padding: 20px;
}
.title {
color: #1a346b;
font-size: 22px;
margin-bottom: 10px;
}
.logo {
width: 100%;
}
a {
color: rgba(150, 173,62, 1.0);
}
</style>
</head>
<body>
<div class="message">
<div class="wrapper">
<h1 class="title">Thanks for posting your prayer request.</h1>
<p>God knows your heart and your needs, and He hears you!</p>
<p>Let others know you need prayer. You can <a href="@Model.DetailUrl">share this request</a> via email or your favorite social media platform.</p>
@if (Model.IsUserLoggedIn) @if (Model.IsUserLoggedIn)
{ {
<ul> <ul>
<li >You can turn on/off notifications of prayers being prayed <a style="color: rgba(150, 173 ,62, 1.0);" href="@Model.ManageUrl">here</a>.</li> <li>You can turn on/off notifications of prayers being prayed <a href="@Model.ManageUrl">here</a>.</li>
<li >Should you want to edit or delete your request, you can do that <a style="color: rgba(150, 173 ,62, 1.0);" href="@Model.DetailUrl">here</a>.</li> <li>Should you want to edit or delete your request, you can do that <a href="@Model.DetailUrl">here</a>.</li>
</ul> </ul>
} }
<p > <p>May God bless you,</p>
May God bless you,
<br /> <img class="logo" src="@ViewBag.LogoUrl" title="Amen, The Prayer App" />
<img src="@ViewBag.LogoUrl" title="Amen, The Prayer App" style="width: 600px; height: 169px" />
</p>
</div> </div>
</div> </div>
</body> </body>
</html> </html>

View File

@ -14,14 +14,14 @@
@if (prayer.HasUserName || prayer.HasUserLocation) @if (prayer.HasUserName || prayer.HasUserLocation)
{ {
<div> <div>
<a class="prayer-title" href="@Url.Action("Detail", "Prayer", new { id = prayer.Id, returnToUserPage = (ViewBag.HideAction == true), affiliatekey = (ViewBag.AffiliateKey ?? Amen.Controllers.ControllerHelper.DefaultAffiliateKey), isPraise = prayer.IsPraise })"> @*<a class="prayer-title" href="@Url.Action("Detail", "Prayer", new { id = prayer.Id, returnToUserPage = (ViewBag.HideAction == true), affiliatekey = (ViewBag.AffiliateKey ?? Amen.Controllers.ControllerHelper.DefaultAffiliateKey), isPraise = prayer.IsPraise })">*@
@prayer.UserName @prayer.UserName
@if (prayer.HasUserNameAndLocation) @if (prayer.HasUserNameAndLocation)
{ {
<span>- </span> <span>- </span>
} }
@prayer.UserLocation @prayer.UserLocation
</a> @*</a>*@
</div> </div>
} }
@*@prayer.Summary - title used to be displayed and linked to individual prayer, now it's the name above'*@ @*@prayer.Summary - title used to be displayed and linked to individual prayer, now it's the name above'*@
@ -31,62 +31,53 @@
@{WriteLiteral(Server.HtmlEncode(prayer.Content).Replace("\r\n", "\r").Replace("\r", "<br/>").Replace("\n", "<br/>"));} @{WriteLiteral(Server.HtmlEncode(prayer.Content).Replace("\r\n", "\r").Replace("\r", "<br/>").Replace("\n", "<br/>"));}
</div> </div>
@if (ViewBag.HideAction != true) @if (ViewBag.HideAction != true)
{ {
if (prayer.IsPraise) if (prayer.IsPraise)
{ {
<div style="height: 32px;"> <a class="btn actions-toggle-btn toggler moretoggle " data-toggle="collapse" data-target="#@prayer.Id"></a>
<!--<a class="btn actions-toggle-btn toggler moretoggle " data-toggle="collapse" data-target="#@prayer.Id">
</a>
<div class="prayer-item-actions"> <div class="prayer-item-actions">
<div id="@prayer.Id" class="actions-collapse collapse">
<div style="padding-top:20px">
<div id="@prayer.Id" class="actions-collapse collapse"> <a class="btn actions-expaned-btn prayer-item-actions-share"><i class="fa lefticon fa-share" aria-hidden="true"></i>Share this praise</a>
<div style="padding-top:20px"> <a class="btn actions-expaned-btn prayer-item-actions-flag"><i class="fa lefticon fa-flag" aria-hidden="true"></i>Flag as inappropriate</a>
<a class="btn actions-expaned-btn prayer-item-actions-prayer-link" href="@Url.Action("Detail", "Prayer", new { id = prayer.Id, returnToUserPage = (ViewBag.HideAction == true), affiliatekey = (ViewBag.AffiliateKey ?? Amen.Controllers.ControllerHelper.DefaultAffiliateKey), isPraise = prayer.IsPraise })"><i class="fa lefticon fa-info" aria-hidden="true"></i>Praise detail</a>
<a class="btn actions-expaned-btn prayer-item-actions-share"><i class="fa lefticon fa-share" aria-hidden="true"></i>Share this praise</a>
<a class="btn actions-expaned-btn prayer-item-actions-flag"><i class="fa lefticon fa-flag" aria-hidden="true"></i>Flag as inappropriate</a>
<a class="btn actions-expaned-btn prayer-item-actions-prayer-link" href="@Url.Action("Detail", "Prayer", new { id = prayer.Id, returnToUserPage = (ViewBag.HideAction == true), affiliatekey = (ViewBag.AffiliateKey ?? Amen.Controllers.ControllerHelper.DefaultAffiliateKey), isPraise = prayer.IsPraise })"><i class="fa lefticon fa-info" aria-hidden="true"></i>Praise detail</a>
@if (prayer.EnableEdit) @if (prayer.EnableEdit)
{ {
<a class="btn actions-expaned-btn prayer-item-actions-edit togglePrayerOverlay"><i class="fa lefticon fa-pencil" aria-hidden="true"></i> Edit this praise</a> <a class="btn actions-expaned-btn prayer-item-actions-edit togglePrayerOverlay"><i class="fa lefticon fa-pencil" aria-hidden="true"></i> Edit this praise</a>
<a class="btn actions-expaned-btn prayer-item-actions-delete"><i class="fa lefticon fa-trash" aria-hidden="true"></i> Delete this praise</a> <a class="btn actions-expaned-btn prayer-item-actions-delete"><i class="fa lefticon fa-trash" aria-hidden="true"></i> Delete this praise</a>
} }
<div class="hidden prayer-item-share-container"> <div class="hidden prayer-item-share-container">
<a href="@prayer.ShareFacebookUrl" class="fa btn fa-facebook-official" target="_blank" title="Share on Facebook"></a> <a href="@prayer.ShareFacebookUrl" class="fa btn fa-facebook-official" target="_blank" title="Share on Facebook"></a>
<a href="@prayer.ShareTwitterUrl" class="fa btn fa-twitter-square" target="_blank" title="Share on Twitter"></a> <a href="@prayer.ShareTwitterUrl" class="fa btn fa-twitter-square" target="_blank" title="Share on Twitter"></a>
<a href="@prayer.ShareEmailUrl" class="fa btn fa-envelope" title="Share via Email"></a> <a href="@prayer.ShareEmailUrl" class="fa btn fa-envelope" title="Share via Email"></a>
</div>
</div> </div>
</div> </div>
</div>--> </div>
</div> </div>
} }
else else
{ {
<span class="prayer-item-prayer-stats">
<span class="prayer-item-prayed-count">@prayer.CountPrayed</span>
<span>prayers</span>
</span>
<!--<a class="btn actions-toggle-btn toggler moretoggle " data-toggle="collapse" data-target="#@prayer.Id"> <a class="btn actions-toggle-btn toggler moretoggle " data-toggle="collapse" data-target="#@prayer.Id"></a>
</a>-->
<div style="height: 32px;"> <div class="prayer-item-actions">
<span class="prayer-item-prayer-stats"> <div class="prayer-item-prayed">
<span class="prayer-item-prayed-count">@prayer.CountPrayed</span> <a class="btn btn-default">
<span>prayers</span> <div class="prayer-item-prayed-action">I prayed for this</div>
</span> </a>
</div>
<div id="@prayer.Id" class="actions-collapse collapse">
<div class="prayer-item-actions">
<div class="prayer-item-prayed">
<a class="btn btn-default">
<div class="prayer-item-prayed-action">I prayed for this</div>
</a>
</div>
<!--<div id="@prayer.Id" class="actions-collapse collapse">
<div style="padding-top:20px"> <div style="padding-top:20px">
@if (prayer.EnableNotifications && prayer.EnableEmailNote && prayer.IsAffiliateNotesEnabled) @if (prayer.EnableNotifications && prayer.EnableEmailNote && prayer.IsAffiliateNotesEnabled)
{ {
@ -94,8 +85,8 @@
} }
@*@if (prayer.IsUserAuthenticated) @*@if (prayer.IsUserAuthenticated)
{*@ {*@
<a class="btn actions-expaned-btn prayer-item-actions-bookmark"><i class="fa lefticon fa-bookmark" aria-hidden="true"></i><span>@prayer.DisplayBookmarkText</span></a> <a class="btn actions-expaned-btn prayer-item-actions-bookmark"><i class="fa lefticon fa-bookmark" aria-hidden="true"></i><span>@prayer.DisplayBookmarkText</span></a>
@*<a class="btn actions-expaned-btn prayer-item-actions-subscribe"><i class="fa lefticon fa-plus" aria-hidden="true"></i><span>@prayer.DisplaySubscribeText</span></a>*@ @*<a class="btn actions-expaned-btn prayer-item-actions-subscribe"><i class="fa lefticon fa-plus" aria-hidden="true"></i><span>@prayer.DisplaySubscribeText</span></a>*@
@*}*@ @*}*@
<a class="btn actions-expaned-btn prayer-item-actions-share"><i class="fa lefticon fa-share" aria-hidden="true"></i>Share this prayer</a> <a class="btn actions-expaned-btn prayer-item-actions-share"><i class="fa lefticon fa-share" aria-hidden="true"></i>Share this prayer</a>
@*<a class="btn actions-expaned-btn prayer-item-actions-related"><i class="fa lefticon fa-link" aria-hidden="true"></i>Show related praise reports</a>*@ @*<a class="btn actions-expaned-btn prayer-item-actions-related"><i class="fa lefticon fa-link" aria-hidden="true"></i>Show related praise reports</a>*@
@ -115,7 +106,6 @@
<a href="@prayer.ShareEmailUrl" class="fa btn fa-envelope" title="Share via Email"></a> <a href="@prayer.ShareEmailUrl" class="fa btn fa-envelope" title="Share via Email"></a>
</div> </div>
</div> </div>
</div>-->
</div> </div>
</div> </div>
} }