We balling

This commit is contained in:
2025-04-17 14:38:01 +02:00
parent 4eb2419109
commit 85ca5911e2
2 changed files with 11 additions and 3 deletions

View File

@@ -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:",

View File

@@ -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()