diff --git a/rndt/apps.py b/rndt/apps.py index ecb9032..30295e1 100644 --- a/rndt/apps.py +++ b/rndt/apps.py @@ -18,6 +18,7 @@ def run_setup_hooks(*args, **kwargs): from geonode.urls import urlpatterns LOCAL_ROOT = os.path.abspath(os.path.dirname(__file__)) + settings.TEMPLATES[0]["DIRS"].insert(0, os.path.join(LOCAL_ROOT, "templates")) settings.TEMPLATES[0]["OPTIONS"]["context_processors"].append( diff --git a/rndt/context_processors.py b/rndt/context_processors.py index 81be4c8..710006e 100644 --- a/rndt/context_processors.py +++ b/rndt/context_processors.py @@ -1,13 +1,9 @@ -import ast -import os +from django.conf import settings from rndt.layers.forms import LayerRNDTForm def rndt_tags(request): return { - "DISABLE_LAYER_CONSTRAINTS": ast.literal_eval( - os.getenv("DISABLE_LAYER_CONSTRAINTS", "True") - ), - "LayerRNDTForm": LayerRNDTForm, + "LayerRNDTForm": LayerRNDTForm } diff --git a/rndt/layers/forms.py b/rndt/layers/forms.py index 5c55b90..b49da97 100644 --- a/rndt/layers/forms.py +++ b/rndt/layers/forms.py @@ -29,13 +29,13 @@ class Meta: resolution = forms.FloatField( label=_("resolution choices"), required=False, - widget=NumberInput(attrs={"class": "form-control"}), + widget=NumberInput(attrs={"class": "form-control", "placeholder": 10}), ) accuracy = forms.FloatField( label=_("accuracy"), required=False, - widget=NumberInput(attrs={"class": "form-control"}), + widget=NumberInput(attrs={"class": "form-control", "placeholder": 0.5}), ) def __init__(self, *args, **kwargs): diff --git a/rndt/static/rndt/js/search/search.js b/rndt/static/rndt/js/search/search.js index 34ddbe9..aedfcc8 100644 --- a/rndt/static/rndt/js/search/search.js +++ b/rndt/static/rndt/js/search/search.js @@ -24,7 +24,6 @@ } return data; } - console.log("ajsjhdksajkhdsajhksda"); // Load categories, keywords, and regions module.load_categories = function ($http, $rootScope, $location) { var params = typeof FILTER_TYPE == 'undefined' ? {} : {'type': FILTER_TYPE}; diff --git a/rndt/templates/layouts/panels.html b/rndt/templates/layouts/panels.html index 7fc3633..468685b 100644 --- a/rndt/templates/layouts/panels.html +++ b/rndt/templates/layouts/panels.html @@ -8,20 +8,6 @@ {% endblock additional_scripts %} {% block layer_constraints %} -{% if not DISABLE_LAYER_CONSTRAINTS %} -
-
- - - {{ layer_form.restriction_code_type }} -
-
- - - {{ layer_form.constraints_other }} -
-
-{% endif %} {% endblock layer_constraints %} {% block breadcrumbs %} @@ -33,7 +19,11 @@ {% trans "Location and Licenses" %}
  • - {% trans "Optional Metadata" %} + {% if UI_REQUIRED_FIELDS %} + {% trans "Required Metadata" %} + {% else %} + {% trans "Optional Metadata" %} + {% endif %}
  • {% trans "Dataset Attributes" %} @@ -53,8 +43,20 @@
    {% trans "Mandatory" %}
    -
    - {% trans "Optional" %} + {% if UI_REQUIRED_FIELDS %} + +
    + {% trans "Optional" %} +
    + {% else %} +
    + {% trans "Optional" %} +
    + {% endif %} +
    + {% trans "Mandatory" %}
    {% endblock edit_progress %} @@ -67,7 +69,7 @@
    {% trans "Data Constraints" %}
    -
    +
    @@ -88,7 +90,7 @@ {% endfor %}
    -
    +