diff options
| author | 2014-03-16 19:50:55 +0100 | |
|---|---|---|
| committer | 2014-03-16 19:50:55 +0100 | |
| commit | 8fb630821b3fc22793bf3ef11686cd1df0e53576 (patch) | |
| tree | 5b2a4085eaea3e4881e8301a9561a83d6d2149e4 | |
| parent | 996c387f50f9b65f271b3cd13b9d63165236b6d2 (diff) | |
Fix bug when emptying a category
- Controller expected a POST action but we were using a link (so a GET action)
- Links to empty a category is now a button whit a formaction
- Improve comparaison id with id of the default category
| -rw-r--r-- | app/views/configure/categorize.phtml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/configure/categorize.phtml b/app/views/configure/categorize.phtml index a564e8cdd..c0171d2dc 100644 --- a/app/views/configure/categorize.phtml +++ b/app/views/configure/categorize.phtml @@ -17,11 +17,11 @@ <input type="text" id="cat_<?php echo $cat->id (); ?>" name="categories[]" value="<?php echo $cat->name (); ?>" /> <?php if ($cat->nbFeed () > 0) { ?> - <a class="confirm" href="<?php echo _url ('feed', 'delete', 'id', $cat->id (), 'type', 'category'); ?>"><?php echo Minz_Translate::t ('ask_empty'); ?></a> + <button type="submit" class="btn btn-attention confirm" formaction="<?php echo _url ('feed', 'delete', 'id', $cat->id (), 'type', 'category'); ?>"><?php echo Minz_Translate::t ('ask_empty'); ?></button> <?php } ?> (<?php echo Minz_Translate::t ('number_feeds', $cat->nbFeed ()); ?>) - <?php if ($cat->id () == $this->defaultCategory->id ()) { ?> + <?php if ($cat->id () === $this->defaultCategory->id ()) { ?> <?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t ('can_not_be_deleted'); ?> <?php } ?> |
