{% extends "base.html" %} {% load static %} {% load i18n %} {% load django_th_extras %} {% block title %}{% trans "My Services" %} - {{ user.username }}{% endblock %} {% block content %}
{% if action == 'edit' %}

{% trans 'Edition of the service' %} {{ service_name_alone }}

{% else %}

{% trans 'Adding of the service' %} {{ service_name_alone }}

{% endif %} {% if messages %} {% endif %} {% if services == 0 %}
You already have activated all the existing services. Go back to your activated services
{% else %}
{% csrf_token %}
{{ form.non_field_errors }}

Digest retention

{{ form.duration }}
{{ form.duration.errors }}
{% trans 'Choose the duration of the retention for the digester of that service. After that duration, you will receive the complet bucket of the grabbed data to your email account. If you do not mind, leave None to disable that feature' %}
{% if service_name in SERVICES_WITH_TOKEN %}

Authentication

{{ form.token }}
{{ form.token.errors }}
{% elif service_name in SERVICES_HOSTED_WITH_AUTH %}
{% if service_name == 'ServiceMastodon' %} {% else %} {% endif %}
{{ form.username }}
{% if service_name == 'ServiceMastodon' %}
{% trans "Put your email you connect with" %}
{% endif %}
{{ form.username.errors }}
{{ form.password }}
{{ form.password.errors }}
{{ form.client_id }}
{{ form.client_id.errors }}
{{ form.client_secret }}
{{ form.client_secret.errors }}
{{ form.host }}
{{ form.host.errors }}
{% elif service_name in SERVICES_AUTH and action != 'edit' %}
When you will press Activate it, you will be redirected to your {{ service_name_alone }} account. Authorize the access of Trigger Happy, then you will go back here.
That way, TriggerHappy will be connected to your account, and you will be able to send data to it. This connection can be removed when you want.
{% endif %}
{% endif %}
{% endblock %}