Refactoring of list blocs
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
<div class="formAddBloc" id="addBloc">
|
||||
<form action="{{ url_for('add_bloc', page=page) }}" id="addBloc" method="POST" class="" >
|
||||
<input id="csrf_token" name="csrf_token" type="hidden" value="{{ csrf_token() }}">
|
||||
<h3>Créé un nouveau bloc</H3>
|
||||
<h3>Créer nouveau bloc</H3>
|
||||
<br>
|
||||
<label for="blocName">Nom du bloc (caractères sans accents uniquement) </label>
|
||||
<div class="input-group">
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
<br/>
|
||||
|
||||
<div hx-get="{{ url_for('publish_progress') }}" hx-trigger="load, every 1s">
|
||||
<div hx-get="{{ url_for('publish_progress') }}" hx-trigger="load, every 3s">
|
||||
|
||||
</div>
|
||||
<br/>
|
||||
|
||||
@@ -6,16 +6,9 @@
|
||||
hx-target="#{{ bloc.name }}" > Enregistrer </button>
|
||||
|
||||
|
||||
<button class="btn btn-danger"
|
||||
onclick="enableModBtn()"
|
||||
hx-get="{% if page %}/{{ page }}{% endif %}/view/{{ bloc.name }}"
|
||||
hx-swap="outerHTML"
|
||||
hx-target="#{{ bloc.name }}" > Fermer </button>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function enableModBtn(){
|
||||
document.getElementById("modify-{{ bloc.name }}").disabled = false;
|
||||
}
|
||||
|
||||
function saveText(){
|
||||
|
||||
|
||||
@@ -1,4 +1,16 @@
|
||||
|
||||
<script>
|
||||
function enableModBtn(){
|
||||
document.getElementById("modify-{{ bloc.name }}").disabled = false;
|
||||
document.getElementById("modify-{{ bloc.name }}").style.visibility = "visible";
|
||||
document.getElementById("close-edit-{{ bloc.name }}").style.visibility = "hidden";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
document.getElementById("modify-{{ bloc.name }}").disabled = true;
|
||||
document.getElementById("modify-{{ bloc.name }}").style.visibility = "hidden";
|
||||
document.getElementById("close-edit-{{ bloc.name }}").style.visibility = "visible";
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user