From a65ec2f214c96cb537a101f96998d87a9e681991 Mon Sep 17 00:00:00 2001 From: Kabir Kukreti Date: Wed, 21 Mar 2012 15:13:37 +0530 Subject: Authentication bug in forms fixed.User dashboard fixed to include my dashboard for admin --- gstudio/templates/gstudioforms/gstudioattributeform.html | 9 +++++++++ gstudio/templates/gstudioforms/gstudioattributetypeform.html | 7 +++++++ gstudio/templates/gstudioforms/gstudiocomplementform.html | 7 +++++++ gstudio/templates/gstudioforms/gstudiointersectionform.html | 9 ++++++++- gstudio/templates/gstudioforms/gstudiometatypeform.html | 7 +++++++ gstudio/templates/gstudioforms/gstudioobjecttypeform.html | 7 +++++++ gstudio/templates/gstudioforms/gstudioprocesstypeform.html | 6 ++++++ gstudio/templates/gstudioforms/gstudiorelationform.html | 6 ++++++ gstudio/templates/gstudioforms/gstudiorelationtypeform.html | 8 ++++++++ gstudio/templates/gstudioforms/gstudiosystemtypeform.html | 7 +++++++ gstudio/templates/gstudioforms/gstudiounionform.html | 8 +++++++- 11 files changed, 79 insertions(+), 2 deletions(-) (limited to 'gstudio/templates/gstudioforms') diff --git a/gstudio/templates/gstudioforms/gstudioattributeform.html b/gstudio/templates/gstudioforms/gstudioattributeform.html index 6779ab52..38e85fa5 100644 --- a/gstudio/templates/gstudioforms/gstudioattributeform.html +++ b/gstudio/templates/gstudioforms/gstudioattributeform.html @@ -4,6 +4,7 @@ {% block content %}
{% csrf_token %} +{% if user.is_authenticated %}

Form to add attributes

{% for field in formset %} @@ -12,10 +13,18 @@ {{ field.errors }}
+ {% endfor %} + + + {% else %} +

Sorry either you are not logged in or dont have permission to view this content

+ {% trans 'Login' %}
+ {% trans 'Register' %}
+ {% endif %}
{% endblock %} diff --git a/gstudio/templates/gstudioforms/gstudioattributetypeform.html b/gstudio/templates/gstudioforms/gstudioattributetypeform.html index 7b5529f4..2a04811f 100644 --- a/gstudio/templates/gstudioforms/gstudioattributetypeform.html +++ b/gstudio/templates/gstudioforms/gstudioattributetypeform.html @@ -4,6 +4,7 @@ {% block content %}
{% csrf_token %} +{% if user.is_authenticated %}

Form to add Attributetypes

{% for field in formset %} @@ -17,5 +18,11 @@
+ {% else %} +

Sorry either you are not logged in or dont have permission to view this content

+ {% trans 'Login' %}
+ {% trans 'Register' %}
+ {% endif %} + {% endblock %} diff --git a/gstudio/templates/gstudioforms/gstudiocomplementform.html b/gstudio/templates/gstudioforms/gstudiocomplementform.html index 4304d242..7066541c 100644 --- a/gstudio/templates/gstudioforms/gstudiocomplementform.html +++ b/gstudio/templates/gstudioforms/gstudiocomplementform.html @@ -4,6 +4,7 @@ {% block content %}
{% csrf_token %} +{% if user.is_authenticated %}

Form to add Complements

{% for field in formset %} @@ -17,5 +18,11 @@
+ {% else %} +

Sorry either you are not logged in or dont have permission to view this content

+ {% trans 'Login' %}
+ {% trans 'Register' %}
+ {% endif %} + {% endblock %} diff --git a/gstudio/templates/gstudioforms/gstudiointersectionform.html b/gstudio/templates/gstudioforms/gstudiointersectionform.html index 71533ff6..13cbeccb 100644 --- a/gstudio/templates/gstudioforms/gstudiointersectionform.html +++ b/gstudio/templates/gstudioforms/gstudiointersectionform.html @@ -3,7 +3,8 @@ {% block content %}
-{% csrf_token %} +{% csrf_token %} +{% if user.is_authenticated %}

Form to add Intersection

{% for field in formset %} @@ -17,5 +18,11 @@
+ {% else %} +

Sorry either you are not logged in or dont have permission to view this content

+ {% trans 'Login' %}
+ {% trans 'Register' %}
+ {% endif %} + {% endblock %} diff --git a/gstudio/templates/gstudioforms/gstudiometatypeform.html b/gstudio/templates/gstudioforms/gstudiometatypeform.html index b86b50e3..bdb91165 100644 --- a/gstudio/templates/gstudioforms/gstudiometatypeform.html +++ b/gstudio/templates/gstudioforms/gstudiometatypeform.html @@ -4,6 +4,7 @@ {% block content %}
{% csrf_token %} +{% if user.is_authenticated %}

Form to add Metatypes

{% for field in formset %} @@ -18,5 +19,11 @@
+ {% else %} +

Sorry either you are not logged in or dont have permission to view this content

+ {% trans 'Login' %}
+ {% trans 'Register' %}
+ {% endif %} + {% endblock %} diff --git a/gstudio/templates/gstudioforms/gstudioobjecttypeform.html b/gstudio/templates/gstudioforms/gstudioobjecttypeform.html index c4d8bcb8..2fc2fba9 100644 --- a/gstudio/templates/gstudioforms/gstudioobjecttypeform.html +++ b/gstudio/templates/gstudioforms/gstudioobjecttypeform.html @@ -4,6 +4,7 @@ {% block content %}
{% csrf_token %} +{% if user.is_authenticated %}

Form to add Objecttypes

{% for field in formset %} @@ -17,5 +18,11 @@
+ {% else %} +

Sorry either you are not logged in or dont have permission to view this content

+ {% trans 'Login' %}
+ {% trans 'Register' %}
+ {% endif %} + {% endblock %} diff --git a/gstudio/templates/gstudioforms/gstudioprocesstypeform.html b/gstudio/templates/gstudioforms/gstudioprocesstypeform.html index 00939595..0ecfbc05 100644 --- a/gstudio/templates/gstudioforms/gstudioprocesstypeform.html +++ b/gstudio/templates/gstudioforms/gstudioprocesstypeform.html @@ -4,6 +4,7 @@ {% block content %}
{% csrf_token %} +{% if user.is_authenticated %}

Form to add Processtypes

{% for field in formset %} @@ -16,5 +17,10 @@
+ {% else %} +

Sorry either you are not logged in or dont have permission to view this content

+ {% trans 'Login' %}
+ {% trans 'Register' %}
+ {% endif %} {% endblock %} diff --git a/gstudio/templates/gstudioforms/gstudiorelationform.html b/gstudio/templates/gstudioforms/gstudiorelationform.html index b87d6a0a..79c5ba78 100644 --- a/gstudio/templates/gstudioforms/gstudiorelationform.html +++ b/gstudio/templates/gstudioforms/gstudiorelationform.html @@ -3,6 +3,7 @@ {% block content %}
+{% if user.is_authenticated %} {% csrf_token %}

Form to add Relations

{% for field in formset %} @@ -17,5 +18,10 @@
+ {% else %} +

Sorry either you are not logged in or dont have permission to view this content

+ {% trans 'Login' %}
+ {% trans 'Register' %}
+ {% endif %} {% endblock %} diff --git a/gstudio/templates/gstudioforms/gstudiorelationtypeform.html b/gstudio/templates/gstudioforms/gstudiorelationtypeform.html index 947e0e05..48531b92 100644 --- a/gstudio/templates/gstudioforms/gstudiorelationtypeform.html +++ b/gstudio/templates/gstudioforms/gstudiorelationtypeform.html @@ -3,6 +3,8 @@ {% block content %}
+{% if user.is_authenticated %} + {% csrf_token %}

Form to add Relationtypes

{% for field in formset %} @@ -16,5 +18,11 @@
+ {% else %} +

Sorry either you are not logged in or dont have permission to view this content

+ {% trans 'Login' %}
+ {% trans 'Register' %}
+ {% endif %} + {% endblock %} diff --git a/gstudio/templates/gstudioforms/gstudiosystemtypeform.html b/gstudio/templates/gstudioforms/gstudiosystemtypeform.html index c2238f19..780a38e3 100644 --- a/gstudio/templates/gstudioforms/gstudiosystemtypeform.html +++ b/gstudio/templates/gstudioforms/gstudiosystemtypeform.html @@ -3,6 +3,7 @@ {% block content %}
+{% if user.is_authenticated %} {% csrf_token %}

Form to add Systemtypes

{% for field in formset %} @@ -17,5 +18,11 @@
+ {% else %} +

Sorry either you are not logged in or dont have permission to view this content

+ {% trans 'Login' %}
+ {% trans 'Register' %}
+ {% endif %} + {% endblock %} diff --git a/gstudio/templates/gstudioforms/gstudiounionform.html b/gstudio/templates/gstudioforms/gstudiounionform.html index 7d7ec4d9..e9310132 100644 --- a/gstudio/templates/gstudioforms/gstudiounionform.html +++ b/gstudio/templates/gstudioforms/gstudiounionform.html @@ -3,6 +3,7 @@ {% block content %}
+{% if user.is_authenticated %} {% csrf_token %}

Form to add unions

{% for field in formset %} @@ -17,5 +18,10 @@
- + {% else %} +

Sorry either you are not logged in or dont have permission to view this content

+ {% trans 'Login' %}
+ {% trans 'Register' %}
+ {% endif %} +x {% endblock %} -- cgit v1.2.3-70-g09d2