mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-05-25 00:35:40 -04:00
Ajout d'un "popup" de confirmation
On vérifie que l'utilisateur a conscience de ce qu'il fait lorsqu'il supprime un flux ou vide une catégorie
This commit is contained in:
@@ -214,6 +214,8 @@ return array (
|
||||
'forbidden_access' => 'Forbidden access',
|
||||
'forbidden_access_description' => 'Access is password protected, please <a class="signin" href="#">sign in</a> to read your feeds.',
|
||||
|
||||
'confirm_action' => 'Are you sure you want perform this action? It cannot be canceled!',
|
||||
|
||||
// DATE
|
||||
'january' => 'january',
|
||||
'february' => 'february',
|
||||
|
||||
@@ -214,6 +214,8 @@ return array (
|
||||
'forbidden_access' => 'Accès interdit',
|
||||
'forbidden_access_description' => 'L’accès est protégé par un mot de passe, veuillez <a class="signin" href="#">vous connecter</a> pour accéder aux flux.',
|
||||
|
||||
'confirm_action' => 'Êtes-vous sûr de vouloir continuer ? Cette action ne peut être annulée !',
|
||||
|
||||
// DATE
|
||||
'january' => 'janvier',
|
||||
'february' => 'février',
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</label>
|
||||
<div class="group-controls">
|
||||
<input type="text" id="cat_<?php echo $cat->id (); ?>" name="categories[]" value="<?php echo $cat->name (); ?>" />
|
||||
<a href="<?php echo _url ('feed', 'delete', 'id', $cat->id (), 'type', 'category'); ?>"><?php echo Translate::t ('ask_empty'); ?></a> (<?php echo Translate::t ('number_feeds', $cat->nbFeed ()); ?>)
|
||||
<a class="confirm" href="<?php echo _url ('feed', 'delete', 'id', $cat->id (), 'type', 'category'); ?>"><?php echo Translate::t ('ask_empty'); ?></a> (<?php echo Translate::t ('number_feeds', $cat->nbFeed ()); ?>)
|
||||
<?php if ($cat->id () == $this->defaultCategory->id ()) { ?>
|
||||
<i class="icon i_help"></i> <?php echo Translate::t ('can_not_be_deleted'); ?>
|
||||
<?php } ?>
|
||||
@@ -39,3 +39,5 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php $this->renderHelper ('confirm_action_script'); ?>
|
||||
|
||||
@@ -106,11 +106,14 @@
|
||||
<div class="form-group form-actions">
|
||||
<div class="group-controls">
|
||||
<button class="btn btn-important"><?php echo Translate::t ('save'); ?></button>
|
||||
<button class="btn btn-attention" formaction="<?php echo Url::display (array ('c' => 'feed', 'a' => 'delete', 'params' => array ('id' => $this->flux->id ()))); ?>"><?php echo Translate::t ('delete'); ?></button>
|
||||
<button class="btn btn-attention confirm" formaction="<?php echo Url::display (array ('c' => 'feed', 'a' => 'delete', 'params' => array ('id' => $this->flux->id ()))); ?>"><?php echo Translate::t ('delete'); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php $this->renderHelper ('confirm_action_script'); ?>
|
||||
|
||||
<?php } else { ?>
|
||||
<div class="alert alert-warn"><span class="alert-head"><?php echo Translate::t ('no_selected_feed'); ?></span> <?php echo Translate::t ('think_to_add'); ?></div>
|
||||
<?php } ?>
|
||||
|
||||
5
app/views/helpers/confirm_action_script.phtml
Normal file
5
app/views/helpers/confirm_action_script.phtml
Normal file
@@ -0,0 +1,5 @@
|
||||
<script type="text/javascript">
|
||||
$('.confirm').click(function () {
|
||||
return confirm("<?php echo Translate::t('confirm_action'); ?>");
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user