diff --git a/src/View.hx b/src/View.hx index 381adfb..3938e4d 100755 --- a/src/View.hx +++ b/src/View.hx @@ -181,9 +181,10 @@ class View extends sugoi.BaseView { /** * human readable date + time + * Note: no optional param — Templo cannot call functions with optional parameters */ - public function hDate(date:Date, ?year:Bool = false):String { - return Formatting.hDate(date, year); + public function hDate(date:Date):String { + return Formatting.hDate(date); } /** diff --git a/src/controller/Cron.hx b/src/controller/Cron.hx index 9d0c2e5..5fd63b8 100755 --- a/src/controller/Cron.hx +++ b/src/controller/Cron.hx @@ -135,7 +135,7 @@ class Cron extends Controller { } volunteersList += ""; - mail.setSubject(t._("Instructions for the volunteers of the ::date:: distribution", {date: view.hDate(multidistrib.distribStartDate, true)})); + mail.setSubject(t._("Instructions for the volunteers of the ::date:: distribution", {date: Formatting.hDate(multidistrib.distribStartDate, true)})); // Let's replace all the tokens var ddate = t._("::date:: from ::startHour:: to ::endHour::", { @@ -194,7 +194,7 @@ class Cron extends Controller { var vacantVolunteerRolesList = ""; - mail.setSubject("Besoin de volontaires pour la distribution du " + view.hDate(multidistrib.distribStartDate, true)); + mail.setSubject("Besoin de volontaires pour la distribution du " + Formatting.hDate(multidistrib.distribStartDate, true)); // Let's replace all the tokens var ddate = view.dDate(multidistrib.distribStartDate) + " de " + view.hHour(multidistrib.distribStartDate) + " à " @@ -595,7 +595,7 @@ class Cron extends Controller { m.addRecipient(u.user.email, u.user.getName()); if (u.user.email2 != null) m.addRecipient(u.user.email2); - m.setSubject(t._("Distribution on ::date::", {date: app.view.hDate(u.distrib.distribStartDate, true)})); + m.setSubject(t._("Distribution on ::date::", {date: Formatting.hDate(u.distrib.distribStartDate, true)})); m.setHtmlBody(app.processTemplate("mail/orderNotif.mtt", { text: text, group: group, @@ -686,7 +686,7 @@ class Cron extends Controller { m.addRecipient(user.email, user.getName()); if (user.email2 != null) m.addRecipient(user.email2); - m.setSubject(t._("Distribution on ::date::", {date: app.view.hDate(md.distribStartDate, true)})); + m.setSubject(t._("Distribution on ::date::", {date: Formatting.hDate(md.distribStartDate, true)})); m.setHtmlBody(app.processTemplate("mail/orderNotif.mtt", { text: text, diff --git a/src/service/VolunteerService.hx b/src/service/VolunteerService.hx index 8957edb..340261e 100644 --- a/src/service/VolunteerService.hx +++ b/src/service/VolunteerService.hx @@ -180,7 +180,7 @@ class VolunteerService } } } - var date = App.current.view.hDate(multidistrib.distribStartDate, true); + var date = Formatting.hDate(multidistrib.distribStartDate, true); var subject = t._( "A role has been left for ::date:: distribution",{date:date}); mail.setSubject( subject ); var html = App.current.processTemplate("mail/volunteerUnsuscribed.mtt", { fullname : user.getName(), role : role.name, reason : reason, group: multidistrib.group } );