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 @@ ...@@ -11,44 +11,34 @@
{% block content %} {% block content %}
<div class="row"> <div class="row">
{% for profile in profiles %} {% for profile in profiles %}
<div class="col-xs col-md-6 col-lg-4"> <div class="col-xs col-md-6 col-lg-4">
<div class="card"> <div class="card">
<div class="card-header bg-{{ macros.colors[loop.index0 % 7] }}"> <div class="card-header"
<div class="float-right"> style="background-color: var(--bs-{{ macros.colors[loop.index0 % 7] }}">
{% if profile.status == profile.ACTIVE %} <h3>{{ profile.username }}</h3>
<form method="POST" {% if profile.comment %}
action="{{ utils.url_or_intent("account.home") }}" <h5>{{ profile.comment }}&nbsp;</h5>
class="form"> {% endif %}
{{ form.hidden_tag() }} {% set created_on = profile.created_at.date() %}
<input type="hidden" name="profile_uuid" value="{{ profile.uuid }}"/> {% trans %}Created on {{ created_on }}{% endtrans %}
<input type="submit" </div>
value="{% trans %}Sign in{% endtrans %}" <div class="card-body">
class="btn btn-lg btn-flat bg-gray text-black"/> {% if profile.status == profile.ACTIVE %}
</form> <form method="POST"
{% else %} action="{{ utils.url_or_intent("account.home") }}"
<span class="btn btn-lg btn-flat bg-secondary text-black">{{ profile.STATUSES[profile.status][1] | capitalize }}</span> class="form">
{% endif %} {{ form.hidden_tag() }}
</div> <input type="hidden" name="profile_uuid" value="{{ profile.uuid }}"/>
<h3 class="widget-header-username">{{ profile.username }}</h3> <input type="submit"
{% if profile.comment %} value="{% trans %}Sign in{% endtrans %}"
<h5>{{ profile.comment }}&nbsp;</h5> class="btn btn-lg btn-outline-success"/>
{% else %} </form>
<h5>{% trans %}No profile description{% endtrans %}&nbsp;</h5> {% else %}
{% endif %} <button disabled class="btn btn-lg">{{ profile.STATUSES[profile.status][1] | capitalize }}</button>
</div> {% endif %}
<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> </div>
</div> </div>
</div>
{% endfor %} {% endfor %}
</div> </div>
{% endblock %} {% endblock %}
...@@ -56,15 +46,15 @@ ...@@ -56,15 +46,15 @@
{% block actions %} {% block actions %}
{% if service.policy not in ("locked",) %} {% if service.policy not in ("locked",) %}
<a href="{{ utils.url_for(".claim", intent=True) }}" <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 %} {% endif %}
{% if service.policy in ("open", "burst") and profiles.__len__() < service.max_profiles %} {% if service.policy in ("open", "burst") and profiles.__len__() < service.max_profiles %}
<a href="{{ utils.url_for(".create", intent=True) }}" <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") %} {% elif service.policy in ("managed", "burst") %}
<a href="{{ utils.url_for(".create", intent=True) }}" <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 %} {% 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 %} {% endif %}
{% endblock %} {% endblock %}
...@@ -12,38 +12,35 @@ ...@@ -12,38 +12,35 @@
{% block content %} {% block content %}
<div class="row"> <div class="row">
<div class="col-xs col-md-6 col-lg-4"> <div class="col-xs col-md-6 col-lg-4">
<div class="card card-widget widget-user-2"> <div class="card">
<div class="widget-user-header bg-primary"> <div class="card-header bg-light-subtle">
<div class="float-right"> <h3>{{ form.username.data }}</h3>
<form method="POST" class="form"> <h5>{% trans service_name %}Your new {{ service_name }} profile{% endtrans %}</h5>
{{ 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> </div>
<div class="card-footer"> <div class="card-body">
<p> <p>
{% trans service_name %}Please click the "Sign up" button to initialize your {{ service_name }} account.{% endtrans %} {% trans service_name %}Please click the "Sign up" button to initialize your {{ service_name }} account.{% endtrans %}
</p> </p>
{% if not service.single_profile %} {% 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 %} {% 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>
</div> </div>
</div>
{% endblock %} {% endblock %}
{% block actions %} {% block actions %}
{% if service.policy not in ("locked",) %} {% 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 %} {% endif %}
{% if not service.single_profile %} {% 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 %} {% endif %}
{% endblock %} {% 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