1 # Copyright 2015 Paul Hänsch
3 # This file is part of Confetti.
5 # Confetti is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU Affero General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
10 # Confetti is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU Affero General Public License for more details.
15 # You should have received a copy of the GNU Affero General Public License
16 # along with Confetti. If not, see <http://www.gnu.org/licenses/>.
19 list_categories | while read cat; do
21 <li>${cat}<button type="submit" name="remove" value="${cat}">$(l10n cat_remove)</button></li>
28 cats="$(get_categories $card)"
30 list_categories |while read cat; do
32 <li><label><input type="checkbox" name="$card" value="$cat"
33 $(printf %s "$cats" |grep -qF "$cat" && printf %s 'checked="checked"')>${cat}</label></li>
41 <li><h2>$(get_name "$card")</h2><ul>$(list_catsel "$card")</ul></li>
46 <form class="categories" action="?action=edit_categories" method="POST">
47 <h1>$(l10n categories_label)</h1>
48 <input type="hidden" name="page" value="categories"/>
52 <input type="text" name="newcat" placeholder="$(l10n cat_newlabel)">
53 <button type="submit" name="add" value="add">$(l10n cat_add)</button>
58 <form class="namelist" action="?action=update_categories" method="POST">
60 <button type="submit" name="submit" value="submit">$(l10n cat_update)</button>
63 $(listcards |while read card; do display_catsel "$card"; done )
66 <button type="submit" name="submit" value="submit">$(l10n cat_update)</button>