1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

Bootstrap5 (#17)

* Bootstrap5 migration
This commit is contained in:
catborise 2021-07-07 14:12:38 +03:00 committed by GitHub
parent 1663a49cee
commit 073b7b6717
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
244 changed files with 9494 additions and 8597 deletions

View file

@ -1,6 +1,6 @@
{% load i18n %}
{% if request.user.is_superuser %}
<a href="#AddSecret" type="button" class="btn btn-success float-right" data-toggle="modal">
<a href="#AddSecret" type="button" class="btn btn-success float-end" data-bs-toggle="modal">
<span class="fa fa-plus" aria-hidden="true"></span>
</a>
@ -10,11 +10,11 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">{% trans "Create New Secret" %}</h5>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<button type="button" class="btn-close" data-bs-dismiss="modal" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form method="post" action="" role="form" aria-label="Create Secret form">{% csrf_token %}
<div class="form-group row">
<div class="row">
<label class="col-sm-3 col-form-label">{% trans "Ephemeral" %}</label>
<div class="col-sm-6">
<select name="ephemeral" class="form-control">
@ -23,7 +23,7 @@
</select>
</div>
</div>
<div class="form-group row">
<div class="row">
<label class="col-sm-3 col-form-label">{% trans "Private" %}</label>
<div class="col-sm-6">
<select name="private" class="form-control">
@ -32,7 +32,7 @@
</select>
</div>
</div>
<div class="form-group row">
<div class="row">
<label class="col-sm-3 col-form-label">{% trans "Usage" %}</label>
<div class="col-sm-6">
<select name="usage_type" class="form-control">
@ -42,7 +42,7 @@
</select>
</div>
</div>
<div class="form-group row">
<div class="row">
<label class="col-sm-3 col-form-label">{% trans "Data" %}</label>
<div class="col-sm-6">
<input type="text" name="data" class="form-control" value="" required
@ -51,7 +51,7 @@
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">{% trans "Close" %}</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{% trans "Close" %}</button>
<button type="submit" class="btn btn-primary" name="create">{% trans "Create" %}</button>
</div>
</form>

View file

@ -4,19 +4,21 @@
{% block title %}{% trans "Secrets" %} - {{ compute.name }}{% endblock %}
{% block style %}
<link rel="stylesheet" href="{% static "css/sortable-theme-bootstrap.css" %}" />
<link rel="stylesheet" href="{% static 'css/sortable-theme-bootstrap.css' %}" />
{% endblock %}
{% block page_heading %}{{ compute }} - {% trans "Secrets" %}{% endblock page_heading %}
{% block page_heading_extra %}{% include 'create_secret_block.html' %}{% endblock page_heading_extra %}
{% block page_heading_extra %}
{% include 'create_secret_block.html' %}
{% endblock page_heading_extra %}
{% block content %}
<div class="row">
<div class="col-lg-12">
<nav aria-label="breadcrumb">
<ol class="breadcrumb bg-light shadow-sm">
<li class="breadcrumb-item active">
<ol class="breadcrumb shadow-sm">
<li class="breadcrumb-item">
<a href="{% url 'overview' compute.id %}"><i class="fa fa-dashboard"></i> {% trans "Overview" %}</a>
</li>
<li class="breadcrumb-item">
@ -35,7 +37,7 @@
<a href="{% url 'nwfilters' compute.id %}"><i class="fa fa-filter"></i> {% trans "NWFilters" %}</a>
</li>
<li class="breadcrumb-item">
<span class="font-weight-bold"><i class="fa fa-key"></i> {% trans "Secrets" %}</span>
<span class="fw-bold"><i class="fa fa-key"></i> {% trans "Secrets" %}</span>
</li>
</ol>
</nav>
@ -45,8 +47,7 @@
<div class="row">
{% if not secrets_all %}
<div class="col-lg-12">
<div class="alert alert-warning alert-dismissable shadow-sm">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<div class="alert alert-warning shadow-sm">
<i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning" %}:</strong> {% trans "Hypervisor doesn't have any Secrets" %}
</div>
</div>
@ -71,7 +72,7 @@
<td>
<form action="" method="post" role="form" aria-label="Delete secret form">{% csrf_token %}
<input type="hidden" name="uuid" value="{{ secret.uuid }}"/>
<a data-toggle="modal" href="#editSecret{{ secret.uuid }}" class="btn btn-sm btn-primary" title="{% trans "Edit" %}">
<a data-bs-toggle="modal" href="#editSecret{{ secret.uuid }}" class="btn btn-sm btn-primary" title="{% trans "Edit" %}">
<span class="fa fa-pencil"></span>
</a>
<button type="submit" class="btn btn-sm btn-danger" name="delete" title="{% trans "Delete" %}" onclick="return confirm('{% trans "Are you sure?" %}')">
@ -86,11 +87,11 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">{% trans "Set secret value" %}</h5>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form method="post" role="form" aria-label="Edit secret form">{% csrf_token %}
<div class="form-group row">
<div class="row">
<label class="col-sm-3 col-form-label">{% trans "Value" %}</label>
<input type="hidden" name="uuid" value="{{ secret.uuid }}">
<div class="col-sm-6">
@ -99,7 +100,7 @@
</div>
</div> <!-- /.modal-content -->
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">{% trans "Close" %}</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{% trans "Close" %}</button>
<button type="submit" class="btn btn-primary" name="set_value">{% trans "Set" %}</button>
</div>
</form>