Skip to content

Commit

Permalink
chore(eighth): replace text instances of 48 hour presign with 2 day
Browse files Browse the repository at this point in the history
Closes #1577
  • Loading branch information
shrysjain committed Apr 4, 2024
1 parent a7bf99a commit a3ab307
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions intranet/apps/eighth/models.py
Expand Up @@ -191,7 +191,7 @@ class EighthActivity(AbstractBaseEighthModel):
Use scheduled_activity.get_true_rooms()
default_capacity (int): The default capacity, which overrides the sum of the default rooms when
scheduling the activity. By default, this has a null value and is ignored.
presign (bool): If True, the activity can only be signed up for within 48 hours of the day that
presign (bool): If True, the activity can only be signed up for within 2 days of the day that
the activity is scheduled.
one_a_day (bool): If True, a student can only sign up for one instance of this activity per day.
both_blocks (bool): If True, a signup for an EighthScheduledActivity during an A or B block will
Expand Down Expand Up @@ -978,7 +978,7 @@ def is_overbooked(self) -> bool:
def is_too_early_to_signup(self, now: Optional[datetime.datetime] = None) -> (bool, datetime):
"""Returns whether it is too early to sign up for the activity
if it is a presign.
This contains the 48 hour presign logic.
This contains the 2 day pre-signup logic.
Args:
now: A datetime object to use for the check instead of the current time.
Returns:
Expand Down
2 changes: 1 addition & 1 deletion intranet/apps/eighth/tests/test_signup.py
Expand Up @@ -109,7 +109,7 @@ def test_add_user_method(self):
schactA.capacity = 1
schactA.save()

# Add user to an activity with 48 hour presign before 48 hours (this should fail)
# Add user to an activity with 2 day presign before 2 days (this should fail)
activity.presign = True
activity.save()

Expand Down
2 changes: 1 addition & 1 deletion intranet/templates/eighth/activity.html
Expand Up @@ -84,7 +84,7 @@ <h2 style="padding-bottom: 0">Activity: {{ activity }}</h2>
<span class="badge" title="This activity is administrative.">Administrative</span>
{% endif %}
{% if activity.presign %}
<span class="badge yellow" title="You may only sign up for this activity 48 hours in advance.">48-hr Presign</span>
<span class="badge yellow" title="You may only sign up for this activity 2 days in advance.">2 day Pre-signup</span>
{% endif %}

{% if not activity.is_active %}
Expand Down
2 changes: 1 addition & 1 deletion intranet/templates/eighth/admin/schedule_activity.html
Expand Up @@ -129,7 +129,7 @@ <h4>Select an Activity:</h4>
<span class="badge" title="This activity is administrative.">Administrative</span>
{% endif %}
{% if activity.presign %}
<span class="badge yellow" title="You may only sign up for this activity 48 hours in advance.">48-hr Presign</span>
<span class="badge yellow" title="You may only sign up for this activity 2 days in advance.">2 day Pre-signup</span>
{% endif %}

{% if not activity.is_active %}
Expand Down
4 changes: 2 additions & 2 deletions intranet/templates/eighth/multi_signup.html
Expand Up @@ -145,7 +145,7 @@
<% } %>

<% if (presign) { %>
<span class="badge yellow">48-hr</span>
<span class="badge yellow">2 day Pre-signup</span>
<% } %>

<% if (finance) { %>
Expand Down Expand Up @@ -218,7 +218,7 @@ <h3 class="activity-detail-header">
<% } %>

<% if (presign) { %>
<span class="badge yellow clickable" data-append-search="is:p" title="You may only sign up for this activity 48 hours in advance.">48-hr Presign</span>
<span class="badge yellow clickable" data-append-search="is:p" title="You may only sign up for this activity 2 days in advance.">2 day Pre-signup</span>
<% } %>

<% scheduled_activity_id = this.model.attributes.scheduled_activity.id %>
Expand Down
4 changes: 2 additions & 2 deletions intranet/templates/eighth/profile_signup.html
Expand Up @@ -145,7 +145,7 @@
<% } %>

<% if (presign) { %>
<span class="badge yellow">48-hr</span>
<span class="badge yellow">2 day Pre-signup</span>
<% } %>

<% if (finance && finance !== "") { %>
Expand Down Expand Up @@ -213,7 +213,7 @@ <h3 class="activity-detail-header">
<% } %>

<% if (presign) { %>
<span class="badge yellow clickable" data-append-search="is:p" title="You may only sign up for this activity 48 hours in advance.">48-hr Presign</span>
<span class="badge yellow clickable" data-append-search="is:p" title="You may only sign up for this activity 2 days in advance.">2 day Pre-signup</span>
<% } %>

<% scheduled_activity_id = this.model.attributes.scheduled_activity.id %>
Expand Down
4 changes: 2 additions & 2 deletions intranet/templates/signage/pages/eighth.html
Expand Up @@ -385,7 +385,7 @@
<% } %>

<% if (presign) { %>
<span class="badge yellow" title="You may only sign up for this activity 48 hours in advance.">48-hr</span>
<span class="badge yellow" title="You may only sign up for this activity 2 days in advance.">2 day Pre-signup</span>
<% } %>

<% if (finance) { %>
Expand Down Expand Up @@ -455,7 +455,7 @@ <h3>
<% } %>

<% if (presign) { %>
<span class="badge yellow clickable" data-append-search="is:p" title="You may only sign up for this activity 48 hours in advance.">48-hr Presign</span>
<span class="badge yellow clickable" data-append-search="is:p" title="You may only sign up for this activity 2 days in advance.">2 day Pre-signup</span>
<% } %>

<% scheduled_activity_id = this.model.attributes.scheduled_activity.id %>
Expand Down

0 comments on commit a3ab307

Please sign in to comment.