From: Alexis Laferrière Date: Wed, 29 Oct 2014 20:10:43 +0000 (-0400) Subject: opportunity: accept meetup without date or location X-Git-Tag: v0.6.10~7^2~12 X-Git-Url: http://nitlanguage.org opportunity: accept meetup without date or location Signed-off-by: Alexis Laferrière --- diff --git a/contrib/opportunity/src/opportunity_controller.nit b/contrib/opportunity/src/opportunity_controller.nit index 42df348..73e1d2e 100644 --- a/contrib/opportunity/src/opportunity_controller.nit +++ b/contrib/opportunity/src/opportunity_controller.nit @@ -60,16 +60,16 @@ class OpportunityWelcome var mname = request.string_arg("meetup_name") var mdate = request.string_arg("meetup_date") var mplace = request.string_arg("meetup_place") - if mname == null or mdate == null or mplace == null then - if mname == null then mname = "" - if mdate == null then mdate = "" - if mplace == null then mplace = "" + if mdate == null then mdate = "" + if mplace == null then mplace = "" + if mname == null then + mname = "" var rsp = new HttpResponse(200) var meetpage = new MeetupCreationPage var meet = new Meetup(mname, mdate, mplace) meetpage.ans = ansset meetpage.meet = meet - meetpage.error = "Name, Date and Place are mandatory fields." + meetpage.error = "'Meetup name' is a mandatory fields." rsp.body = meetpage.write_to_string return rsp diff --git a/contrib/opportunity/src/templates/meetup.nit b/contrib/opportunity/src/templates/meetup.nit index 139ba93..a06a072 100644 --- a/contrib/opportunity/src/templates/meetup.nit +++ b/contrib/opportunity/src/templates/meetup.nit @@ -141,8 +141,14 @@ redef class Meetup t.add """ """