Skip to content

Commit

Permalink
Update Superstar form for admins
Browse files Browse the repository at this point in the history
There's no need for the extra buttons on the admin form, so we now override them.
  • Loading branch information
kitsuta committed Oct 26, 2023
1 parent 364aa47 commit 7257a71
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion magprime/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def PREREG_BADGE_TYPES(self):
types.append(badge_type)
return types


@property
def DEALER_REG_OPEN(self):
return self.AFTER_DEALER_REG_START and self.BEFORE_DEALER_REG_SHUTDOWN and not self.DEALER_REG_SOFT_CLOSED
6 changes: 6 additions & 0 deletions magprime/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,9 @@ class BadgeExtras:

def extra_donation_label(self):
return Markup("Superstar Donation ({})".format(popup_link("../static_views/givingExtra.html", "Learn more")))

@MagForm.form_mixin
class AdminBadgeExtras:
extra_donation = IntegerField('Superstar Donation', validators=[
validators.NumberRange(min=0, message="Superstar donation must be a number that is 0 or higher.")
], widget=NumberInputGroup())

0 comments on commit 7257a71

Please sign in to comment.