diff options
| author | 2014-09-30 17:11:31 +0200 | |
|---|---|---|
| committer | 2014-09-30 17:12:42 +0200 | |
| commit | dc714d3949373b79344438335cfc0edde77de036 (patch) | |
| tree | c9cc90c2612c7c0605f2bc5a9e24850fc7d84ec3 /app/views/configure/categorize.phtml | |
| parent | 13fb1170c06bd67ba69534e823ea6f5861c745dd (diff) | |
Cat updating system works
Add a submit button
Each box contains a specific form
See https://github.com/marienfressinaud/FreshRSS/issues/646
Diffstat (limited to 'app/views/configure/categorize.phtml')
| -rw-r--r-- | app/views/configure/categorize.phtml | 54 |
1 files changed, 30 insertions, 24 deletions
diff --git a/app/views/configure/categorize.phtml b/app/views/configure/categorize.phtml index 781c4bb14..b9d04ddb8 100644 --- a/app/views/configure/categorize.phtml +++ b/app/views/configure/categorize.phtml @@ -28,32 +28,38 @@ ?> <div class="box"> <div class="box-title stick"> - <input type="text" value="<?php echo $cat->name(); ?>" /> - <div class="dropdown"> - <div id="dropdown-cat-<?php echo $cat->id(); ?>" class="dropdown-target"></div> + <form action="<?php echo _url('category', 'update', 'id', $cat->id()); ?>" method="post"> + <input type="text" name="name" value="<?php echo $cat->name(); ?>" /> + <button class="btn" type="submit">✓</button> - <a class="dropdown-toggle btn" href="#dropdown-cat-<?php echo $cat->id(); ?>"><?php echo _i('down'); ?></a> - <ul class="dropdown-menu"> - <li class="dropdown-close"><a href="#close">❌</a></li> + <div class="dropdown"> + <div id="dropdown-cat-<?php echo $cat->id(); ?>" class="dropdown-target"></div> - <li class="item"> - <button class="as-link confirm" - data-str-confirm="<?php echo _t('confirm_action_feed_cat'); ?>" - type="submit" - form="controller-category" - formaction="<?php echo _url('category', 'empty', 'id', $cat->id()); ?>"> - <?php echo _t('ask_empty'); ?></button> - </li> - <li class="item"> - <button class="as-link confirm" - data-str-confirm="<?php echo _t('confirm_action_feed_cat'); ?>" - type="submit" - form="controller-category" - formaction="<?php echo _url('category', 'delete', 'id', $cat->id()); ?>"> - <?php echo _t('delete'); ?></button> - </li> - </ul> - </div> + <a class="dropdown-toggle btn" href="#dropdown-cat-<?php echo $cat->id(); ?>"><?php echo _i('down'); ?></a> + <ul class="dropdown-menu"> + <li class="dropdown-close"><a href="#close">❌</a></li> + + <?php if (!empty($feeds)) { ?> + <li class="item"> + <button class="as-link confirm" + data-str-confirm="<?php echo _t('confirm_action_feed_cat'); ?>" + type="submit" + form="controller-category" + formaction="<?php echo _url('category', 'empty', 'id', $cat->id()); ?>"> + <?php echo _t('ask_empty'); ?></button> + </li> + <?php } ?> + <li class="item"> + <button class="as-link confirm" + data-str-confirm="<?php echo _t('confirm_action_feed_cat'); ?>" + type="submit" + form="controller-category" + formaction="<?php echo _url('category', 'delete', 'id', $cat->id()); ?>"> + <?php echo _t('delete'); ?></button> + </li> + </ul> + </div> + </form> </div> <ul class="box-content"> |
