-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feedback form working, update Navbar
- Loading branch information
1 parent
693b346
commit 7651504
Showing
6 changed files
with
47 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from django import forms | ||
|
||
from .models import Feedback | ||
|
||
|
||
class FeedbackForm(forms.ModelForm): | ||
class Meta: | ||
model = Feedback | ||
fields = ["name", "email_address", "feedback_type", "feedback"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
<form hx-post="{{ request.path }}" class="modal-content"> | ||
{% csrf_token %} | ||
<form hx-post="{{ request.path }}" | ||
hx-headers='{"X-CSRFToken":"{{ csrf_token }}"}' | ||
class="modal-content"> | ||
<div class="modal-header"> | ||
<h5 class="modal-title">New Feedback</h5> | ||
</div> | ||
<div class="modal-body">{{ form.as_p }}</div> | ||
<div class="modal-footer"> | ||
<button type="button" data-bs-dismiss="modal">Cancel</button> | ||
<button type="submit">Save</button> | ||
<button class="btn btn-primary" type="submit">Save</button> | ||
<button class="btn btn-outline-danger" type="button" data-bs-dismiss="modal">Cancel</button> | ||
</div> | ||
</form> |