diff --git a/InvenTree/InvenTree/static/css/inventree.css b/InvenTree/InvenTree/static/css/inventree.css index 00041f0fae..eda15bb820 100644 --- a/InvenTree/InvenTree/static/css/inventree.css +++ b/InvenTree/InvenTree/static/css/inventree.css @@ -34,8 +34,7 @@ } .login-header { - padding-right: 30px; - margin-right: 30px; + margin-right: 5px; } .login-container input { diff --git a/InvenTree/templates/about.html b/InvenTree/templates/about.html index 34d4bf25e4..34884da9d1 100644 --- a/InvenTree/templates/about.html +++ b/InvenTree/templates/about.html @@ -22,12 +22,12 @@ {% inventree_version %}{% include "clip.html" %} {% inventree_is_development as dev %} {% if dev %} - {% trans "Development Version" %} + {% trans "Development Version" %} {% else %} {% if up_to_date %} - {% trans "Up to Date" %} + {% trans "Up to Date" %} {% else %} - {% trans "Update Available" %} + {% trans "Update Available" %} {% endif %} {% endif %} diff --git a/InvenTree/templates/account/base.html b/InvenTree/templates/account/base.html index 7f2486bfcc..ea3795e87c 100644 --- a/InvenTree/templates/account/base.html +++ b/InvenTree/templates/account/base.html @@ -71,9 +71,12 @@ {% include "spacer.html" %}

{% inventree_title %}

-
-
{% block content %}{% endblock %}
+
+
+ {% block content %} + {% endblock %} +
diff --git a/InvenTree/templates/account/login.html b/InvenTree/templates/account/login.html index 73c49e46c0..fbe48224b4 100644 --- a/InvenTree/templates/account/login.html +++ b/InvenTree/templates/account/login.html @@ -32,6 +32,7 @@ for a account and sign in below:{% endblocktrans %}

{% endif %} +
diff --git a/InvenTree/templates/account/logout.html b/InvenTree/templates/account/logout.html index 7268599bb2..df37c76be4 100644 --- a/InvenTree/templates/account/logout.html +++ b/InvenTree/templates/account/logout.html @@ -14,6 +14,7 @@ {% if redirect_field_value %} {% endif %} +
{% trans "Back to Site" %} diff --git a/InvenTree/templates/base.html b/InvenTree/templates/base.html index 6378b6b2ee..e64f1c11d0 100644 --- a/InvenTree/templates/base.html +++ b/InvenTree/templates/base.html @@ -190,6 +190,18 @@ $(document).ready(function () { {% endif %} moment.locale('{{ request.LANGUAGE_CODE }}'); + + // Account notifications + {% if messages %} + {% for message in messages %} + showMessage( + '{{ message }}', + { + style: 'info', + } + ); + {% endfor %} + {% endif %} }); diff --git a/InvenTree/templates/js/translated/forms.js b/InvenTree/templates/js/translated/forms.js index a86b64d0e2..18ba08d512 100644 --- a/InvenTree/templates/js/translated/forms.js +++ b/InvenTree/templates/js/translated/forms.js @@ -19,7 +19,6 @@ renderStockLocation, renderSupplierPart, renderUser, - showAlertDialog, showAlertOrCache, showApiError, */ @@ -347,10 +346,12 @@ function constructForm(url, options) { constructCreateForm(OPTIONS.actions.POST, options); } else { // User does not have permission to POST to the endpoint - showAlertDialog( - '{% trans "Action Prohibited" %}', - '{% trans "Create operation not allowed" %}' - ); + showMessage('{% trans "Action Prohibited" %}', { + style: 'danger', + details: '{% trans "Create operation not allowed" %}', + icon: 'fas fa-user-times', + }); + console.log(`'POST action unavailable at ${url}`); } break; @@ -360,10 +361,12 @@ function constructForm(url, options) { constructChangeForm(OPTIONS.actions.PUT, options); } else { // User does not have permission to PUT/PATCH to the endpoint - showAlertDialog( - '{% trans "Action Prohibited" %}', - '{% trans "Update operation not allowed" %}' - ); + showMessage('{% trans "Action Prohibited" %}', { + style: 'danger', + details: '{% trans "Update operation not allowed" %}', + icon: 'fas fa-user-times', + }); + console.log(`${options.method} action unavailable at ${url}`); } break; @@ -372,10 +375,12 @@ function constructForm(url, options) { constructDeleteForm(OPTIONS.actions.DELETE, options); } else { // User does not have permission to DELETE to the endpoint - showAlertDialog( - '{% trans "Action Prohibited" %}', - '{% trans "Delete operation not allowed" %}' - ); + showMessage('{% trans "Action Prohibited" %}', { + style: 'danger', + details: '{% trans "Delete operation not allowed" %}', + icon: 'fas fa-user-times', + }); + console.log(`DELETE action unavailable at ${url}`); } break; @@ -384,10 +389,12 @@ function constructForm(url, options) { // TODO? } else { // User does not have permission to GET to the endpoint - showAlertDialog( - '{% trans "Action Prohibited" %}', - '{% trans "View operation not allowed" %}' - ); + showMessage('{% trans "Action Prohibited" %}', { + style: 'danger', + details: '{% trans "View operation not allowed" %}', + icon: 'fas fa-user-times', + }); + console.log(`GET action unavailable at ${url}`); } break;