44 lines
1.5 KiB
HTML
44 lines
1.5 KiB
HTML
{% extends "base.html" %}
|
|
{% load crispy_forms_filters %}
|
|
{% load static %}
|
|
{% load i18n %}
|
|
|
|
{% block title %}
|
|
{# Check if an 'object' exists in the context #}
|
|
{% if object %}
|
|
{% trans 'Update Service'%}
|
|
{% else %}
|
|
{% trans 'Add New Service'%}
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="container">
|
|
<div class="row justify-content-center">
|
|
<div class="col-md-8">
|
|
<div class="card bg-body">
|
|
<div class="card-header">
|
|
{% if service.pk %}
|
|
{{ _("Update Service") }}
|
|
{% else %}
|
|
{{ _("Add Service") }}
|
|
{% endif %}
|
|
</div>
|
|
<div class="card-body">
|
|
<form method="post" action="">
|
|
{% csrf_token %}
|
|
{{ form|crispy }}
|
|
<div class="d-flex justify-content-start">
|
|
<button class="btn btn-sm btn-success me-2" type="submit"><i class="fa-solid fa-floppy-disk me-1"></i> {{ _("Save") }}</button>
|
|
<a href="{{request.META.HTTP_REFERER}}" class="btn btn-sm btn-danger"><i class="fa-solid fa-ban me-1"></i>{% trans "Cancel" %}</a>
|
|
</div>
|
|
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock content %}
|
|
|