Browse Source

by default /group/1

pvincent 2 years ago
parent
commit
36d5e27bfb
  1. 4
      src/App.hx
  2. 2
      src/controller/Group.hx
  3. 3
      src/controller/Main.hx
  4. 2
      src/service/WaitingListService.hx
  5. 1
      www/lang/texts_fr.po

4
src/App.hx

@ -203,7 +203,7 @@ class App extends sugoi.BaseApp {
out.set("percent", "Pourcentage"); out.set("percent", "Pourcentage");
out.set("pinned", "Mets en avant les produits"); out.set("pinned", "Mets en avant les produits");
out.set("CagetteNetwork", "Me lister dans l'annuaire des groupes Cagette.net");
out.set("CagetteNetwork", "Me lister dans l'annuaire des groupes");
out.set("unitType", "Unité"); out.set("unitType", "Unité");
out.set("qt", "Quantité"); out.set("qt", "Quantité");
out.set("Unit", "Pièce"); out.set("Unit", "Pièce");
@ -280,7 +280,7 @@ class App extends sugoi.BaseApp {
var e = new sugoi.mail.Mail(); var e = new sugoi.mail.Mail();
e.setSubject(subject); e.setSubject(subject);
e.setRecipient(to); e.setRecipient(to);
e.setSender(App.config.get("default_email"), t._("Cagette.net"));
e.setSender(App.config.get("default_email"), t._("CagettePéi"));
var html = App.current.processTemplate("mail/message.mtt", {text: html, group: group}); var html = App.current.processTemplate("mail/message.mtt", {text: html, group: group});
e.setHtmlBody(html); e.setHtmlBody(html);
App.sendMail(e); App.sendMail(e);

2
src/controller/Group.hx

@ -54,7 +54,7 @@ class Group extends controller.Controller
form.addElement(new StringInput("userLastName", t._("Your lastname") ,"",true)); form.addElement(new StringInput("userLastName", t._("Your lastname") ,"",true));
form.addElement(new StringInput("userEmail", t._("Your e-mail"), "", true)); form.addElement(new StringInput("userEmail", t._("Your e-mail"), "", true));
} }
form.addElement(new sugoi.form.elements.TextArea("msg", t._("Leave a message")));
form.addElement(new sugoi.form.elements.TextArea("msg", t._("Leave a message"),"",false));
if (form.isValid()){ if (form.isValid()){
try{ try{

3
src/controller/Main.hx

@ -29,7 +29,8 @@ class Main extends Controller {
if ( app.user!=null && group == null) { if ( app.user!=null && group == null) {
throw Redirect("/user/choose"); throw Redirect("/user/choose");
}else if (app.user == null && (group==null || group.regOption!=db.Amap.RegOption.Open) ) { }else if (app.user == null && (group==null || group.regOption!=db.Amap.RegOption.Open) ) {
throw Redirect("/user/login");
//throw Redirect("/user/login");
throw Redirect("/group/1");
} }
view.amap = group; view.amap = group;

2
src/service/WaitingListService.hx

@ -13,6 +13,8 @@ class WaitingListService{
var w = new db.WaitingList(); var w = new db.WaitingList();
w.user = user; w.user = user;
w.group = group; w.group = group;
if (message == null ) message = "";
//message = "souscription = " + message;
w.message = message; w.message = message;
w.insert(); w.insert();

1
www/lang/texts_fr.po

@ -14,6 +14,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n > 1;\n" "Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Poedit 2.0.6\n" "X-Generator: Poedit 2.0.6\n"
#: src/payment/Cash.hx:294 #: src/payment/Cash.hx:294
msgid "Cash" msgid "Cash"
msgstr "Espèces / Carte Bancaire" msgstr "Espèces / Carte Bancaire"

Loading…
Cancel
Save