Added confirmation on purge actions

merge-requests/552/head
Eliot Berriot 2019-01-09 18:40:58 +01:00
rodzic fbfbe36639
commit cb3dacedbe
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: DD6965E2476E5C27
1 zmienionych plików z 10 dodań i 10 usunięć

Wyświetl plik

@ -27,14 +27,8 @@
</select> </select>
</div> </div>
<div class="field"> <div class="field">
<div
v-if="!selectAll"
@click="launchAction"
:disabled="checked.length === 0"
:class="['ui', {disabled: checked.length === 0}, {'loading': actionLoading}, 'button']">
<translate>Go</translate></div>
<dangerous-button <dangerous-button
v-else :class="['ui', {disabled: checked.length === 0}, {'loading': actionLoading}, 'button']" v-if="selectAll || currentAction.isDangerous" :class="['ui', {disabled: checked.length === 0}, {'loading': actionLoading}, 'button']"
confirm-color="green" confirm-color="green"
color="" color=""
@confirm="launchAction"> @confirm="launchAction">
@ -42,17 +36,23 @@
<p slot="modal-header"> <p slot="modal-header">
<translate <translate
key="1" key="1"
:translate-n="objectsData.count" :translate-n="checked.length"
:translate-params="{count: objectsData.count, action: currentActionName}" :translate-params="{count: checked.length, action: currentActionName}"
translate-plural="Do you want to launch %{ action } on %{ count } elements?"> translate-plural="Do you want to launch %{ action } on %{ count } elements?">
Do you want to launch %{ action } on %{ count } element? Do you want to launch %{ action } on %{ count } element?
</translate> </translate>
</p> </p>
<p slot="modal-content"> <p slot="modal-content">
<translate>This may affect a lot of elements, please double check this is really what you want.</translate> <translate>This may affect a lot of elements or have irreversible consequences, please double check this is really what you want.</translate>
</p> </p>
<p slot="modal-confirm"><translate>Launch</translate></p> <p slot="modal-confirm"><translate>Launch</translate></p>
</dangerous-button> </dangerous-button>
<div
v-else
@click="launchAction"
:disabled="checked.length === 0"
:class="['ui', {disabled: checked.length === 0}, {'loading': actionLoading}, 'button']">
<translate>Go</translate></div>
</div> </div>
<div class="count field"> <div class="count field">
<translate <translate