Skip to content

Commit

Permalink
Added alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
sab-LC committed Sep 18, 2024
1 parent 3a61991 commit dc61913
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
23 changes: 23 additions & 0 deletions accounts/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,17 @@ def subscription(request, pk, account_type, related=None):
}
BundleType.objects.create(institution=institution, bundle_type=bundle)
create_bundle_call(request, bundle_data, access_token)
messages.add_message(
request,
messages.INFO,
(
"Thank you for your submission, "
"our team will review and be in "
"contact with the bundle contract. "
"You will be notified once your "
"request has been processed."
),
)
return redirect("subscription", institution.id, 'institution')
except Exception:
messages.add_message(
Expand Down Expand Up @@ -992,6 +1003,18 @@ def subscription(request, pk, account_type, related=None):
}
BundleType.objects.create(researcher=researcher, bundle_type=bundle)
create_bundle_call(request, bundle_data, access_token)
messages.add_message(
request,
messages.INFO,
(
"Thank you for your submission, "
"our team will review and be in "
"contact with the bundle contract. "
"You will be notified once your "
"request has been processed."
),
)
return redirect("subscription", researcher.id, 'researcher')
except Exception:
messages.add_message(
request,
Expand Down
1 change: 1 addition & 0 deletions templates/account_settings_pages/_subscription.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<div><h4 class="mb-0">Edit Subscription</h4></div>
</div>
<p class="mt-0"><small>Manage and edit your subscription plan</small></p>
{% include 'partials/_alerts.html' %}
<div class="flex-this">
<div>
<button type="submit" class="primary-btn action-btn" name="generatebtn" onclick="openAddModalView()">Update Subscription</button>
Expand Down

0 comments on commit dc61913

Please sign in to comment.