Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#385 fix document error response to redirect to main page "project" or "contract" #442

Merged
merged 5 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions core/models/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,18 @@ class Meta:
object_id = models.PositiveIntegerField()
content_object = GenericForeignKey('content_type', 'object_id')

content = models.FileField(upload_to=get_file_name)
content = models.FileField(upload_to=get_file_name,
blank=False)
content_url = models.URLField(verbose_name='Document Url', null=True, blank=True)
content_notes = models.TextField(verbose_name='Document Notes',
blank=True,
null=True)
domain_type = models.TextField(verbose_name='Domain Type', choices=type, default=type.not_specified)

expiry_date = models.DateField(verbose_name='Expiry date',
blank=True,
help_text='If the document has a validity period, please specify the expiry date here.',
null=True)
blank=True,
help_text='If the document has a validity period, please specify the expiry date here.',
null=True)

def __str__(self):
return f"{self.content.name} ({self.content_object})"
Expand Down
2 changes: 1 addition & 1 deletion docker/node/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:11.10.1-alpine
FROM node:16
COPY web/static/css /static/css
COPY web/static/js /static/js
COPY web/static/vendor/bootstrap-material-datetimepicker /static/vendor/bootstrap-material-datetimepicker
Expand Down
5 changes: 4 additions & 1 deletion web/static/js/daisy.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,10 @@ $(document).ready(function () {
url: url,
type: 'post',
dataType: 'json',
data: modalForm.serialize(),
data: new FormData(modalForm[0]),
contentType: false,
processData: false,
cache: false,
success: function (results) {
if (redirectURI !== undefined) {
window.location.replace(redirectURI);
Expand Down
Loading
Loading