diff --git a/rowers/templates/plannedsessiontemplatecreate.html b/rowers/templates/plannedsessiontemplatecreate.html index fbda21b5..c1d89a73 100644 --- a/rowers/templates/plannedsessiontemplatecreate.html +++ b/rowers/templates/plannedsessiontemplatecreate.html @@ -34,6 +34,8 @@ + + {% endblock %} {% block sidebar %} diff --git a/rowers/templates/plannedsessiontemplateedit.html b/rowers/templates/plannedsessiontemplateedit.html index 303d47cf..ea18075b 100644 --- a/rowers/templates/plannedsessiontemplateedit.html +++ b/rowers/templates/plannedsessiontemplateedit.html @@ -36,13 +36,15 @@
  • - {% if steps %}

    Steps

    + {% if steps %}

    {{ steps|safe }}

    + {% else %} + No Steps defined + {% endif %}

    Edit Steps (experimental)

    - {% endif %}
  • diff --git a/rowers/views/planviews.py b/rowers/views/planviews.py index 3012334a..6e8e8826 100644 --- a/rowers/views/planviews.py +++ b/rowers/views/planviews.py @@ -3004,9 +3004,16 @@ def stepadder(request, id=0): 'message': 'permission denied for host '+hostt[0]} return JSONResponse(status=403, data=message) + if ps.steps: + filename = ps.steps.get('filename','') + sport = ps.steps.get('sport','rowing') + else: + filename = '' + sport = 'rowing' + steps = { - "filename": ps.steps['filename'], - "sport": ps.steps['sport'], + "filename": filename, + "sport": sport, "steps": [] }