fix: allow 90m session requests. Prompt for cannot meet at time reasoning. (#4345)
* fix: allow 90m session requests. Prompt for cannot meet at time reasoning. * test: adjust tests to match new acts_like_wg default.
This commit is contained in:
parent
822a572589
commit
17786527d4
|
@ -666,7 +666,7 @@ class TimeSlotCreateForm(forms.Form):
|
||||||
class DurationChoiceField(forms.ChoiceField):
|
class DurationChoiceField(forms.ChoiceField):
|
||||||
def __init__(self, durations=None, *args, **kwargs):
|
def __init__(self, durations=None, *args, **kwargs):
|
||||||
if durations is None:
|
if durations is None:
|
||||||
durations = (3600, 7200)
|
durations = (3600, 5400, 7200)
|
||||||
super().__init__(
|
super().__init__(
|
||||||
choices=self._make_choices(durations),
|
choices=self._make_choices(durations),
|
||||||
*args, **kwargs,
|
*args, **kwargs,
|
||||||
|
|
|
@ -264,7 +264,7 @@ class TimeSlotCreateFormTests(TestCase):
|
||||||
class DurationChoiceFieldTests(TestCase):
|
class DurationChoiceFieldTests(TestCase):
|
||||||
def test_choices_default(self):
|
def test_choices_default(self):
|
||||||
f = DurationChoiceField()
|
f = DurationChoiceField()
|
||||||
self.assertEqual(f.choices, [('', '--Please select'), ('3600', '1 hour'), ('7200', '2 hours')])
|
self.assertEqual(f.choices, [('', '--Please select'), ('3600', '1 hour'), ('5400', '1 hour 30 minutes'), ('7200', '2 hours')])
|
||||||
|
|
||||||
def test_choices(self):
|
def test_choices(self):
|
||||||
f = DurationChoiceField([60, 1800, 3600, 5400, 7260, 7261])
|
f = DurationChoiceField([60, 1800, 3600, 5400, 7260, 7261])
|
||||||
|
@ -343,7 +343,7 @@ class SessionDetailsFormTests(TestCase):
|
||||||
self.assertTrue(self.group.features.acts_like_wg)
|
self.assertTrue(self.group.features.acts_like_wg)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
SessionDetailsForm(group=self.group).fields['requested_duration'].choices,
|
SessionDetailsForm(group=self.group).fields['requested_duration'].choices,
|
||||||
[('', '--Please select'), ('3600', '1 hour'), ('7200', '2 hours')],
|
[('', '--Please select'), ('3600', '1 hour'), ('5400', '1 hour 30 minutes'), ('7200', '2 hours')],
|
||||||
)
|
)
|
||||||
self.group.features.acts_like_wg = False
|
self.group.features.acts_like_wg = False
|
||||||
self.group.features.save()
|
self.group.features.save()
|
||||||
|
|
|
@ -22,11 +22,6 @@ from ietf.utils import log
|
||||||
NUM_SESSION_CHOICES = (('','--Please select'),('1','1'),('2','2'))
|
NUM_SESSION_CHOICES = (('','--Please select'),('1','1'),('2','2'))
|
||||||
SESSION_TIME_RELATION_CHOICES = (('', 'No preference'),) + Constraint.TIME_RELATION_CHOICES
|
SESSION_TIME_RELATION_CHOICES = (('', 'No preference'),) + Constraint.TIME_RELATION_CHOICES
|
||||||
JOINT_FOR_SESSION_CHOICES = (('1', 'First session'), ('2', 'Second session'), ('3', 'Third session'), )
|
JOINT_FOR_SESSION_CHOICES = (('1', 'First session'), ('2', 'Second session'), ('3', 'Third session'), )
|
||||||
# Used for traditional face-to-face meetings:
|
|
||||||
# LENGTH_SESSION_CHOICES = (('','--Please select'),('1800','30 minutes'),('3600','1 hour'),('5400','1.5 hours'), ('7200','2 hours'),('9000','2.5 hours'))
|
|
||||||
# Used for totally virtual meetings during COVID-19:
|
|
||||||
# LENGTH_SESSION_CHOICES = (('','--Please select'),('3000','50 minutes'),('6000','100 minutes'))
|
|
||||||
LENGTH_SESSION_CHOICES = (('','--Please select'),('3600','60 minutes'),('7200','120 minutes'))
|
|
||||||
|
|
||||||
# -------------------------------------------------
|
# -------------------------------------------------
|
||||||
# Helper Functions
|
# Helper Functions
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="bg1">
|
<tr class="bg1">
|
||||||
<td>Times during which this WG can <strong>not</strong> meet:</td>
|
<td>Times during which this WG can <strong>not</strong> meet:<br>Please explain any selections in Special Requests below.</td>
|
||||||
<!-- [html-validate-disable-block no-redundant-for -- FIXME: form renders with redundant for attributes] -->
|
<!-- [html-validate-disable-block no-redundant-for -- FIXME: form renders with redundant for attributes] -->
|
||||||
<td>{{ form.timeranges.errors }}{{ form.timeranges }}</td>
|
<td>{{ form.timeranges.errors }}{{ form.timeranges }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
Loading…
Reference in a new issue