From 31c3ea3c8b0038fc4c44f17c3eca44a7d107e06a Mon Sep 17 00:00:00 2001 From: German Correa Date: Tue, 30 Oct 2018 13:08:53 -0300 Subject: [PATCH] fix trim from roomtype and roompref fields on reg form --- public/js/registerform.js | 4 ++-- templates/inscriptos.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/js/registerform.js b/public/js/registerform.js index a800c26..5af60d6 100644 --- a/public/js/registerform.js +++ b/public/js/registerform.js @@ -91,8 +91,8 @@ function select2Focus() { submitHandler: function(form){ var formdata = $(form).serializeArray(); - formdata.find(item => item.name === "pais").value = $("#pais").select2("data")[0].text; - formdata.find(item => item.name === "roomtype").value = $("#roomtype").select2("data")[0].text; + formdata.find(item => item.name === "pais").value = $("#pais").select2("data")[0].text.trim(); + formdata.find(item => item.name === "roomtype").value = $("#roomtype").select2("data")[0].text.trim(); var parameters = $.param(formdata); /*$.ajax({ url: 'api/register', diff --git a/templates/inscriptos.html b/templates/inscriptos.html index 5c752a5..4e5c7d9 100644 --- a/templates/inscriptos.html +++ b/templates/inscriptos.html @@ -143,7 +143,7 @@ only screen and (max-width: 760px), {{ reg.fechaLlegada | default("No especificado") }} {{ reg.fechaPartida | default("No especificado") }} {{ reg.cartaInvitacion ? 'Si' : 'No' }} - {{ reg.roomingPref }} + {{ reg.roomingPref|default("No hotel") }} {{ reg.roomate|default("No especificado") }} {{ reg.fechaRegistro }}