Repository: carpentries/amy

Issue:
Add "Titanium" membership variant
Add a new membership variant: Titanium.
No benefits are associated with this membership.
This would require updating the [membership choices](https://github.com/carpentries/amy/blob/develop/amy/workshops/models.py#L180) and running the migration.

Is there anything else we would need to do?  @pbanaszkiewicz  @elichad  
Remove auto-fill of membership benefits
Right now, membership benefits (number of workshops and number of instructor training seats) gets automatically filled in based on membership level.  Because these benefits will change and may get customized, we would like to remove this feature and have these fields manually entered in. 


Discussion:
@maneesha I checked and it looks like you listed all required changes:

1. update model `Membership.variant` choices
2. generate and run the migration

In addition to that I found out there's a JavaScript code run when membership is created or rolled over: https://github.com/carpentries/amy/blob/develop/amy/static/membership_create.js#L15
It seems this generates some predefined values for bronze, silver and gold membership variants. Not sure if this is still in use.
We are looking to remove the feature to generate predefined values for membership benefits:
https://github.com/carpentries/amy/issues/2100
We can combine this together then. Do you need this for v4.1 or later, @maneesha? 
This should be fairly simple, as the required data to be entered is stored in `amy/static/membership_create.js`. I just want to make sure @maneesha this feature will not be needed again in future?
Tagging @elletjies  and @ErinBecker  to confirm -- they recommended removing this feature entirely.

Resolving patch:
diff --git a/amy/fiscal/forms.py b/amy/fiscal/forms.py
--- a/amy/fiscal/forms.py
+++ b/amy/fiscal/forms.py
@@ -236,25 +236,6 @@ def __init__(self, *args, **kwargs):
             "membership."
         ).format(reverse("organization_add"))
 
-        # add warning alert for dates falling within next 2-3 months
-        STANDARD_PACKAGES_PREPOPULATION_WARNING = (
-            "<b>Workshops without admin fee per agreement</b> and "
-            "<b>Public instructor training seats</b> were adjusted according to "
-            "standard membership packages."
-        )
-        pos_index = self.helper.layout.fields.index("variant")
-        self.helper.layout.insert(
-            pos_index + 1,
-            Div(
-                Div(
-                    HTML(STANDARD_PACKAGES_PREPOPULATION_WARNING),
-                    css_class="alert alert-warning offset-lg-2 col-lg-8 col-12",
-                ),
-                id="standard_packages_prepopulation_warning",
-                css_class="form-group row d-none",
-            ),
-        )
-
     def save(self, *args, **kwargs):
         res = super().save(*args, **kwargs)
 
diff --git a/amy/workshops/migrations/0257_alter_membership_variant.py b/amy/workshops/migrations/0257_alter_membership_variant.py
new file mode 100644
--- /dev/null
+++ b/amy/workshops/migrations/0257_alter_membership_variant.py
@@ -0,0 +1,18 @@
+# Generated by Django 3.2.18 on 2023-04-14 09:22
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('workshops', '0256_auto_20230220_2051'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='membership',
+            name='variant',
+            field=models.CharField(choices=[('partner', 'Partner'), ('affiliate', 'Affiliate'), ('sponsor', 'Sponsor'), ('bronze', 'Bronze'), ('silver', 'Silver'), ('gold', 'Gold'), ('platinum', 'Platinum'), ('titanium', 'Titanium'), ('alacarte', 'A la carte')], max_length=40),
+        ),
+    ]
diff --git a/amy/workshops/models.py b/amy/workshops/models.py
--- a/amy/workshops/models.py
+++ b/amy/workshops/models.py
@@ -185,6 +185,7 @@ class Membership(models.Model):
         ("silver", "Silver"),
         ("gold", "Gold"),
         ("platinum", "Platinum"),
+        ("titanium", "Titanium"),
         ("alacarte", "A la carte"),
     )
     variant = models.CharField(


Test patch: