Skip to content
Snippets Groups Projects
Verified Commit 722a226b authored by ornanovitch's avatar ornanovitch
Browse files

fix(ui): fix missing pieces of bootstrap 5 migration

parent 90b384d5
No related branches found
No related tags found
No related merge requests found
......@@ -11,44 +11,34 @@
{% block content %}
<div class="row">
{% for profile in profiles %}
<div class="col-xs col-md-6 col-lg-4">
<div class="card">
<div class="card-header bg-{{ macros.colors[loop.index0 % 7] }}">
<div class="float-right">
{% if profile.status == profile.ACTIVE %}
<form method="POST"
action="{{ utils.url_or_intent("account.home") }}"
class="form">
{{ form.hidden_tag() }}
<input type="hidden" name="profile_uuid" value="{{ profile.uuid }}"/>
<input type="submit"
value="{% trans %}Sign in{% endtrans %}"
class="btn btn-lg btn-flat bg-gray text-black"/>
</form>
{% else %}
<span class="btn btn-lg btn-flat bg-secondary text-black">{{ profile.STATUSES[profile.status][1] | capitalize }}</span>
{% endif %}
</div>
<h3 class="widget-header-username">{{ profile.username }}</h3>
{% if profile.comment %}
<h5>{{ profile.comment }}&nbsp;</h5>
{% else %}
<h5>{% trans %}No profile description{% endtrans %}&nbsp;</h5>
{% endif %}
</div>
<div class="card-footer p-0">
<ul class="nav flex-column">
{% set created_on = profile.created_at.date() %}
<li class="nav-item">
<a href="#" class="nav-link">{% trans %}Created on {{ created_on }}{% endtrans %}</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">{% trans %}Not shared with anyone{% endtrans %}</a>
</li>
</ul>
</div>
<div class="col-xs col-md-6 col-lg-4">
<div class="card">
<div class="card-header"
style="background-color: var(--bs-{{ macros.colors[loop.index0 % 7] }}">
<h3>{{ profile.username }}</h3>
{% if profile.comment %}
<h5>{{ profile.comment }}&nbsp;</h5>
{% endif %}
{% set created_on = profile.created_at.date() %}
{% trans %}Created on {{ created_on }}{% endtrans %}
</div>
<div class="card-body">
{% if profile.status == profile.ACTIVE %}
<form method="POST"
action="{{ utils.url_or_intent("account.home") }}"
class="form">
{{ form.hidden_tag() }}
<input type="hidden" name="profile_uuid" value="{{ profile.uuid }}"/>
<input type="submit"
value="{% trans %}Sign in{% endtrans %}"
class="btn btn-lg btn-outline-success"/>
</form>
{% else %}
<button disabled class="btn btn-lg">{{ profile.STATUSES[profile.status][1] | capitalize }}</button>
{% endif %}
</div>
</div>
</div>
{% endfor %}
</div>
{% endblock %}
......@@ -56,15 +46,15 @@
{% block actions %}
{% if service.policy not in ("locked",) %}
<a href="{{ utils.url_for(".claim", intent=True) }}"
class="btn btn-primary">{% trans %}Claim a profile{% endtrans %}</a>
class="btn btn-outline-primary">{% trans %}Claim a profile{% endtrans %}</a>
{% endif %}
{% if service.policy in ("open", "burst") and profiles.__len__() < service.max_profiles %}
<a href="{{ utils.url_for(".create", intent=True) }}"
class="btn btn-success">{% trans %}Create another profile{% endtrans %}</a>
class="btn btn-outline-success">{% trans %}Create another profile{% endtrans %}</a>
{% elif service.policy in ("managed", "burst") %}
<a href="{{ utils.url_for(".create", intent=True) }}"
class="btn btn-warning">{% trans %}Request another profile{% endtrans %}</a>
class="btn btn-outline-warning">{% trans %}Request another profile{% endtrans %}</a>
{% else %}
<a href="#" class="btn btn-success" disabled>{% trans %}Create another profile{% endtrans %}</a>
<a href="#" class="btn btn-outline-success" disabled>{% trans %}Create another profile{% endtrans %}</a>
{% endif %}
{% endblock %}
......@@ -12,38 +12,35 @@
{% block content %}
<div class="row">
<div class="col-xs col-md-6 col-lg-4">
<div class="card card-widget widget-user-2">
<div class="widget-user-header bg-primary">
<div class="float-right">
<form method="POST" class="form">
{{ form.hidden_tag() }}
<input type="hidden" name="username" value="{{ form.username.data }}"/>
<input type="submit"
value="{% trans %}Sign up{% endtrans %}"
class="btn btn-lg btn-flat bg-gray text-black"/>
</form>
</div>
<h3 class="widget-header-username">{{ form.username.data }}</h3>
<h5 class="widget-header-desc">{% trans service_name %}Your new {{ service_name }} profile{% endtrans %}</h5>
<div class="card">
<div class="card-header bg-light-subtle">
<h3>{{ form.username.data }}</h3>
<h5>{% trans service_name %}Your new {{ service_name }} profile{% endtrans %}</h5>
</div>
<div class="card-footer">
<div class="card-body">
<p>
{% trans service_name %}Please click the "Sign up" button to initialize your {{ service_name }} account.{% endtrans %}
</p>
{% if not service.single_profile %}
<p>{% trans %}If you wish to pick a different username, please click the "Custom profile" button.{% endtrans %}</p>
<p>{% trans %}If you wish to pick a different username, please click the "Create a custom profile" button.{% endtrans %}</p>
{% endif %}
<form method="POST" class="form text-center">
{{ form.hidden_tag() }}
<input type="hidden" name="username" value="{{ form.username.data }}"/>
<input type="submit"
value="{% trans %}Sign up{% endtrans %}"
class="btn btn-lg btn-outline-success"/>
</form>
</div>
</div>
</div>
</div>
{% endblock %}
{% block actions %}
{% if service.policy not in ("locked",) %}
<a href="{{ utils.url_for(".claim") }}" class="btn btn-primary">{% trans %}Claim a profile{% endtrans %}</a>
<a href="{{ utils.url_for(".claim") }}" class="btn btn-outline-primary">{% trans %}Claim a profile{% endtrans %}</a>
{% endif %}
{% if not service.single_profile %}
<a href="{{ utils.url_for(".create") }}" class="btn btn-success">{% trans %}Create a custom profile{% endtrans %}</a>
<a href="{{ utils.url_for(".create") }}" class="btn btn-outline-success">{% trans %}Create a custom profile{% endtrans %}</a>
{% endif %}
{% endblock %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment