Extending Choices for Questions in hrapplications to Allow Multiselect (#911)

An additional field at the question level defines whether the choices for the question are multi-select or not. The template will render the choices with radio buttons or checkboxes depending on multi-select. Multiple selected choices are saved with a line break between them.
This commit is contained in:
phaynu
2017-10-24 23:35:19 -05:00
committed by Adarnof
parent c63464c4c9
commit f961db3130
5 changed files with 25 additions and 4 deletions

View File

@@ -9,6 +9,7 @@ from allianceauth.eveonline.models import EveCorporationInfo
class ApplicationQuestion(models.Model):
title = models.CharField(max_length=254, verbose_name='Question')
help_text = models.CharField(max_length=254, blank=True, null=True)
multi_select = models.BooleanField(default=False)
def __str__(self):
return "Question: " + self.title