Skip to content

Commit

Permalink
close django admin warning modal on continue (#1114)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkonie committed Feb 1, 2023
1 parent d21e3fb commit dd1be5d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Changed
- Rename ``AppSettingAPI`` methods (#539, #1040)
- Deprecate old ``AppSettingAPI`` method names (#539, #1039)
- Hide apps in ``PROJECTROLES_HIDE_APP_LINKS`` from superusers (#1042)
- Close Django admin warning modal on continue (#1114)
- **Siteinfo**
- Use project type display names in stats view (#1107)

Expand Down
3 changes: 3 additions & 0 deletions projectroles/templates/projectroles/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@
$('.modal-title').text('Warning!');
var htmlData = '{{ admin_warning|safe }}';
$('.modal-body').html(htmlData);
$('#sodar-pr-btn-admin-continue').click(function () {
$('#sodar-modal').modal('hide');
});
});
});
</script>
Expand Down
2 changes: 1 addition & 1 deletion projectroles/templatetags/projectroles_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def get_admin_warning():
)
ret += (
'<p><a class="btn btn-danger pull-right" role="button" '
'target="_blank" href="{}">'
'target="_blank" href="{}" id="sodar-pr-btn-admin-continue">'
'<i class="iconify" data-icon="mdi:cogs"></i> Continue to Django Admin'
'</a></p>'.format(reverse('admin:index'))
)
Expand Down

0 comments on commit dd1be5d

Please sign in to comment.