From 716fda687b8523042723c71f5e33fd7b51af03c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Paulo=20Lemos=20Escola?= Date: Fri, 25 May 2018 09:55:06 -0300 Subject: [PATCH] limits max number of tickets --- app/views/tickets/_ticket.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/tickets/_ticket.html.haml b/app/views/tickets/_ticket.html.haml index 8f5fc82b..726d836e 100644 --- a/app/views/tickets/_ticket.html.haml +++ b/app/views/tickets/_ticket.html.haml @@ -10,7 +10,7 @@ %td.col-sm-1.col-md-2.text-center = ticket.registration_ticket? ? 'Yes' : 'No' %td.col-sm-1.col-md-1 - - options = { type: 'number', min: 0, class: "form-control quantity", 'data-id' => ticket.id } + - options = { type: 'number', min: 0, max: 99, class: "form-control quantity", 'data-id' => ticket.id } - if ticket.registration_ticket? - options[:max] = 1 - options[:disabled] = current_user.tickets.for_registration(ticket.conference).present?