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):
|
||||
def __init__(self, durations=None, *args, **kwargs):
|
||||
if durations is None:
|
||||
durations = (3600, 7200)
|
||||
durations = (3600, 5400, 7200)
|
||||
super().__init__(
|
||||
choices=self._make_choices(durations),
|
||||
*args, **kwargs,
|
||||
|
|
|
@ -264,7 +264,7 @@ class TimeSlotCreateFormTests(TestCase):
|
|||
class DurationChoiceFieldTests(TestCase):
|
||||
def test_choices_default(self):
|
||||
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):
|
||||
f = DurationChoiceField([60, 1800, 3600, 5400, 7260, 7261])
|
||||
|
@ -343,7 +343,7 @@ class SessionDetailsFormTests(TestCase):
|
|||
self.assertTrue(self.group.features.acts_like_wg)
|
||||
self.assertEqual(
|
||||
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.save()
|
||||
|
|
|
@ -22,11 +22,6 @@ from ietf.utils import log
|
|||
NUM_SESSION_CHOICES = (('','--Please select'),('1','1'),('2','2'))
|
||||
SESSION_TIME_RELATION_CHOICES = (('', 'No preference'),) + Constraint.TIME_RELATION_CHOICES
|
||||
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
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<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] -->
|
||||
<td>{{ form.timeranges.errors }}{{ form.timeranges }}</td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in a new issue