From 85ca5911e25cbb35a23b25dd8944024aedab60aa Mon Sep 17 00:00:00 2001 From: Stef Date: Thu, 17 Apr 2025 14:38:01 +0200 Subject: [PATCH] We balling --- application/dash/forms.py | 12 ++++++++++-- application/dash/views.py | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/application/dash/forms.py b/application/dash/forms.py index d55eda3..681d8d4 100644 --- a/application/dash/forms.py +++ b/application/dash/forms.py @@ -6,8 +6,16 @@ from flask_wtf.file import FileField, FileAllowed # type: ignore # Form for service on dashboard, connected to database through ORM class ServiceForm(FlaskForm): - name = StringField("Service name:", validators=[DataRequired()]) - url = URLField("Service URL:", validators=[DataRequired()]) + name = StringField( + "Service name:", + validators=[DataRequired()], + render_kw={"placeholder": "Service Name"}, + ) + url = URLField( + "Service URL:", + validators=[DataRequired()], + render_kw={"placeholder": "https://example.com"}, + ) # File field that only allows jpg, jpeg or png image = FileField( "Icon:", diff --git a/application/dash/views.py b/application/dash/views.py index 27d2d34..5d3f4bc 100644 --- a/application/dash/views.py +++ b/application/dash/views.py @@ -35,7 +35,7 @@ def delete_service(service_id: int): # Add a service -@dash_blueprint.route("/service", methods=["GET", "POST"]) +@dash_blueprint.route("/add_service", methods=["GET", "POST"]) @login_required def add_service(): service_form = ServiceForm()