diff --git a/app/stores/templates/stores/chain_detail.html b/app/stores/templates/stores/chain_detail.html index 4463059..6ee646a 100644 --- a/app/stores/templates/stores/chain_detail.html +++ b/app/stores/templates/stores/chain_detail.html @@ -1,6 +1,7 @@ {% extends "base.html" %} {% load markdown_deux_tags %} {% load staticfiles %} +{% load waffle_tags %} {% block title %} {{ chain.name }} @@ -35,7 +36,7 @@
- {% if not chain.editor %}Claim Chain{% endif %} + {% switch claim_support %}{% if not chain.editor %}Claim Chain{% endif %}{% switchflag %} {% if is_editor %}Edit Chain{% endif %} {% if user.is_superuser %}Edit in Admin{% endif %}
diff --git a/app/stores/templates/stores/store_detail.html b/app/stores/templates/stores/store_detail.html index 5fb7712..c15c906 100644 --- a/app/stores/templates/stores/store_detail.html +++ b/app/stores/templates/stores/store_detail.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% load markdown_deux_tags %} +{% load waffle_tags %} {% block title %} {{ store.name }} @@ -63,7 +64,7 @@ $(document).ready(function(){initialize_map_store()});- {% if not store.editor %}Claim Store{% endif %} + {% switch claim_support %}{% if not store.editor %}Claim Store{% endif %}{% endswitch %} {% if is_editor %}Edit Store{% endif %} {% if user.is_superuser %}Edit in Admin{% endif %}
diff --git a/app/stores/views/claims.py b/app/stores/views/claims.py index 0616bae..b2f65c6 100644 --- a/app/stores/views/claims.py +++ b/app/stores/views/claims.py @@ -4,13 +4,15 @@ from django.contrib.contenttypes.models import ContentType from django.contrib import messages from ..forms import ClaimRequestForm from ..models import ClaimRequest +from .mixins import WaffleSwitchMixin -class ClaimCreateView(CreateView): +class ClaimCreateView(WaffleSwitchMixin, CreateView): model = ClaimRequest target_model = None form_class = ClaimRequestForm template_name = 'stores/claim_form.html' + waffle_switch = 'claim_support' def get(self, request, *args, **kwargs): self.target_obj = self.get_target_object()