{% extends "layout.html" %} {% block title %}OptiWarm - {% if is_new %}New Location{% else %}Edit {{ location.name }}{% endif %}{% endblock %} {% block content %}

{% if is_new %}New Location{% else %}Edit {{ location.name }}{% endif %}

Back to Locations
{{ form.csrf_token }}
{{ form.name(class="form-control", placeholder="Enter location name") }} {% if form.name.errors %}
{% for error in form.name.errors %} {{ error }} {% endfor %}
{% endif %} {{ form.name.description }}
{{ form.phone(class="form-control", placeholder="Contact phone number") }} {% if form.phone.errors %}
{% for error in form.phone.errors %} {{ error }} {% endfor %}
{% endif %} {{ form.phone.description }}
{{ form.description(class="form-control", rows=3, placeholder="Description of the location") }} {% if form.description.errors %}
{% for error in form.description.errors %} {{ error }} {% endfor %}
{% endif %} {{ form.description.description }}
{{ form.cmdb_id(class="form-control", placeholder="ID in external CMDB") }} {% if form.cmdb_id.errors %}
{% for error in form.cmdb_id.errors %} {{ error }} {% endfor %}
{% endif %} {{ form.cmdb_id.description }}
{{ form.billing_period(class="form-control") }} {% if form.billing_period.errors %}
{% for error in form.billing_period.errors %} {{ error }} {% endfor %}
{% endif %} {{ form.billing_period.description }}

Technical Configuration
{{ form.mqtt_pub_cost(class="form-control", placeholder="MQTT topic for publishing cost information") }} {% if form.mqtt_pub_cost.errors %}
{% for error in form.mqtt_pub_cost.errors %} {{ error }} {% endfor %}
{% endif %} {{ form.mqtt_pub_cost.description }}
{{ form.notification(class="form-control", placeholder="Notification configuration for alerts") }} {% if form.notification.errors %}
{% for error in form.notification.errors %} {{ error }} {% endfor %}
{% endif %} {{ form.notification.description }}
{{ form.weather_update_url(class="form-control", placeholder="URL for weather updates") }} {% if form.weather_update_url.errors %}
{% for error in form.weather_update_url.errors %} {{ error }} {% endfor %}
{% endif %} {{ form.weather_update_url.description }}
{{ form.weather_update_period(class="form-control", placeholder="Period in hours") }} {% if form.weather_update_period.errors %}
{% for error in form.weather_update_period.errors %} {{ error }} {% endfor %}
{% endif %} {{ form.weather_update_period.description }}
Cancel
{% endblock %}