added confirmation to deleting
This commit is contained in:
BIN
cao_blogr.sqlite
BIN
cao_blogr.sqlite
Binary file not shown.
@@ -69,15 +69,10 @@ h5 {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.modal-header, .close {
|
||||
background-color: #333;
|
||||
color: #fff !important;
|
||||
text-align: center;
|
||||
font-size: 30px;
|
||||
}
|
||||
.modal-header, .modal-body {
|
||||
padding: 40px 50px;
|
||||
.modal-dialog {
|
||||
top:7%;
|
||||
}
|
||||
|
||||
.nav-tabs li a {
|
||||
color: #777;
|
||||
}
|
||||
@@ -94,7 +89,6 @@ h5 {
|
||||
border-bottom: 1px solid black;
|
||||
border-radius: 0;
|
||||
font-size: 14px !important;
|
||||
letter-spacing: 4px;
|
||||
min-height: 82px;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
{% if blog_id != '0' %}
|
||||
<button class="btn btn-warning" type="submit" name="form.deleted">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
<button class="btn btn-danger" type="button" data-toggle="modal" data-target="#confirmDelete">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -50,4 +50,29 @@
|
||||
|
||||
</form>
|
||||
|
||||
<!-- Modal : Confirmation SUPRESSION -->
|
||||
<div id="confirmDelete" class="modal" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Supprimer une page</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- The form is placed inside the body of modal -->
|
||||
<p>Etes-vous certain(e) de vouloir supprimer <b>{{ entry.title }}</b> ?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="form-group">
|
||||
<div class="text-center">
|
||||
<form id="confirmForm" method="post">
|
||||
<button type="submit" class="btn btn-danger" name="form.deleted">Supprimer</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -11,14 +11,13 @@
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
|
||||
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet" type="text/css">
|
||||
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet" type="text/css">
|
||||
<!-- Custom styles for this scaffold -->
|
||||
<link href="{{request.static_url('cao_blogr:static/theme.css')}}" rel="stylesheet">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
|
||||
|
||||
<!-- HTML5 shiv and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js" integrity="sha384-0s5Pv64cNZJieYFkXYOTId2HMA2Lfb6q2nAcx2n0RTLUnCAoTTsS0nKEO27XyKcY" crossorigin="anonymous"></script>
|
||||
<script src="//oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js" integrity="sha384-ZoaMbDF+4LeFxg6WdScQ9nnR1QC2MIRxA1O9KWEXQwns1G8UNyIEZIQidzb0T1fo" crossorigin="anonymous"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -40,7 +39,7 @@
|
||||
{% if request.authenticated_userid %}
|
||||
<li><a href="{{request.route_url('settings')}}"><span class="glyphicon glyphicon-cog"></span></a></li>
|
||||
<li><a href="{{request.route_url('logout')}}">
|
||||
<span class="glyphicon glyphicon-log-out"></span> {{request.authenticated_userid}}</a></li>
|
||||
{{request.authenticated_userid}} <span class="glyphicon glyphicon-log-out"></span></a></li>
|
||||
{% else %}
|
||||
<!-- si anonyme, lien pour se connecter -->
|
||||
<li><a href="{{request.route_url('login')}}"><span class="glyphicon glyphicon-log-in"></span></a></li>
|
||||
@@ -56,6 +55,7 @@
|
||||
<!-- Display Page Title -->
|
||||
{% if page_title %}
|
||||
<h1>{{ page_title }}</h1>
|
||||
<br />
|
||||
{% endif %}
|
||||
|
||||
<div id="messages">
|
||||
@@ -90,16 +90,11 @@
|
||||
</p>
|
||||
<p class="text-center">
|
||||
© 2022 - Méditation SUNYATA Paris
|
||||
 | <a href="{{ request.route_url('blog', id=1, slug='mentions-l%25C3%25A9gales') }}">Mentions légales</a>
|
||||
| <a href="{{ request.route_url('blog', id=1, slug='mentions-l%25C3%25A9gales') }}">Mentions légales</a>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- Bootstrap core JavaScript
|
||||
================================================== -->
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -19,9 +19,10 @@
|
||||
|
||||
<h2>Pages Paramètres</h2>
|
||||
{% if request.authenticated_userid %}
|
||||
<p><a href="{{ request.route_url('blog_edit', topic=topic, id='0') }}">
|
||||
[Nouveau post]</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="{{ request.route_url('blog_edit', topic=topic, id='0') }}" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouvelle page</a>
|
||||
</p>
|
||||
{% endif%}
|
||||
|
||||
<ul>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
{% block content %}
|
||||
|
||||
{% if request.authenticated_userid %}
|
||||
<p><a href="{{ request.route_url('blog_edit', topic=topic, id='0') }}">
|
||||
[Nouveau post]</a>
|
||||
<p><a href="{{ request.route_url('blog_edit', topic=topic, id='0') }}" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouvelle page</a>
|
||||
</p>
|
||||
{% endif%}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="container">
|
||||
<form action="{{request.route_url('user_add', name=name)}}" method="post" class="form">
|
||||
|
||||
{% for error in form.username.errors %}
|
||||
@@ -31,6 +30,5 @@
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
{% extends "cao_blogr:templates/layout.jinja2" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
|
||||
<form action="{{ request.route_url('user_pwd', name=entry.name) }}" method="post" class="form">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="password">Nouveau mot de passe</label></label>
|
||||
<label for="password">Nouveau mot de passe</label>
|
||||
<input type="password" name="new_password" class="form-control" placeholder="Optionel">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="form-control-static text-success">
|
||||
<strong>Dernière connexion</strong> :
|
||||
{{ entry.last_logged.strftime("%d-%m-%Y - %H:%M") }}</div>
|
||||
{{ entry.last_logged.strftime("%d-%m-%Y - %H:%M") }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@@ -21,11 +21,36 @@
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
{% if name != 'new' %}
|
||||
<button class="btn btn-warning" type="submit" name="form.deleted">
|
||||
<button class="btn btn-danger" type="button" data-toggle="modal" data-target="#confirmDelete">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Modal : Confirmation SUPRESSION -->
|
||||
<div id="confirmDelete" class="modal" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Supprimer la fiche utilisateur</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- The form is placed inside the body of modal -->
|
||||
<p>Etes-vous certain(e) de vouloir supprimer la fiche <b>{{ entry.name }}</b> ?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="form-group">
|
||||
<div class="text-center">
|
||||
<form id="confirmForm" method="post">
|
||||
<button type="submit" class="btn btn-danger" name="form.deleted">Supprimer</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user