mirror of
https://framagit.org/tom79/fediplan.git
synced 2025-05-07 13:01:32 +02:00
82 lines
3.5 KiB
Twig
82 lines
3.5 KiB
Twig
{% extends 'base.html.twig' %}
|
|
{% trans_default_domain 'fediplan' %}
|
|
{% block title %}{{ 'common.login'|trans }}{% endblock %}
|
|
|
|
{% block content %}
|
|
{% include 'nav.html.twig' %}
|
|
<h1>Login</h1>
|
|
|
|
{{ form_start(form) }}
|
|
{{ form_row(form._token) }}
|
|
|
|
{{ form_errors(form) }}
|
|
{% if flow.getCurrentStepNumber() == 1 %}
|
|
<div class="row">
|
|
<div class=" col-md-4">
|
|
<div class="form-group has-feedback">
|
|
{{ form_label(form.host) }}
|
|
<div class="input-group">
|
|
<div class="input-group-prepend">
|
|
<span class="input-group-text" id="basic-addon1"><i class="fa fa-globe"></i></span>
|
|
</div>
|
|
{{ form_widget(form.host, {'attr': {'class': 'form-control'}}) }}
|
|
</div>
|
|
{% if not form.host.vars.errors is empty %}
|
|
<span class="label label-danger">
|
|
{% for errorItem in form.host.vars.errors %}
|
|
{{ errorItem.message }}
|
|
{% endfor %}
|
|
</span>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% elseif flow.getCurrentStepNumber() == 2 %}
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="alert alert-warning">
|
|
{{ 'messages.login_authorization'|trans }}
|
|
</div>
|
|
<a href="{{ urlToMastodon }}" target="_blank" class="btn btn-default"> {{ 'messages.authorization_get'|trans }}</a>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class=" col-md-4">
|
|
<div class="form-group has-feedback">
|
|
{{ form_label(form.code) }}
|
|
<div class="input-group">
|
|
<div class="input-group-prepend">
|
|
<span class="input-group-text" id="basic-addon1"><i class="fa fa-key"></i></span>
|
|
</div>
|
|
{{ form_widget(form.code, {'attr': {'class': 'form-control'}}) }}
|
|
</div>
|
|
|
|
{% if not form.code.vars.errors is empty %}
|
|
<span class="label label-danger">
|
|
{% for errorItem in form.code.vars.errors %}
|
|
{{ errorItem.message }}
|
|
{% endfor %}
|
|
</span>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{ form_widget(form.client_id, {'value' : client_id}) }}
|
|
{{ form_widget(form.client_secret, {'value' : client_secret}) }}
|
|
{% endif %}
|
|
{{ form_widget(form) }}
|
|
<div class="row">
|
|
<div class="col-md-2">
|
|
<input type="submit" class="btn btn-primary btn-block btn-flat" value="{{ 'common.next'|trans }}"/>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<blockquote class="blockquote text-center" style="margin-top: 50px;">
|
|
<p class="mb-0">FediPlan is an open source application (<a href="https://framagit.org/tom79/fediplan" target="_blank">source code</a>) built for scheduling your messages with <a href="https://joinmastodon.org/" target="_blank">Mastodon</a> or <a href="https://pleroma.social/" target="_blank">Pleroma</a> (2.7+).</p>
|
|
<p>It <b>does not store any data</b> (token or messages), that is why you need to create a new Token when your session expired.</p>
|
|
<footer class="blockquote-footer">FediPlan 1.0.0</footer>
|
|
</blockquote>
|
|
|
|
{{ form_end(form) }}
|
|
{% endblock %}
|