From 75fbec2fa336ac9b749fa273ac5a44c2fb211623 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 28 Dec 2009 07:58:33 -0800 Subject: Add tools to clear flags Added a form to clear all flags for a profile, when showed on adminprofileflags list. Add an action to handle the form, and a right for the action. --- plugins/UserFlag/clearflagform.php | 92 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 plugins/UserFlag/clearflagform.php (limited to 'plugins/UserFlag/clearflagform.php') diff --git a/plugins/UserFlag/clearflagform.php b/plugins/UserFlag/clearflagform.php new file mode 100644 index 000000000..5ad6055d3 --- /dev/null +++ b/plugins/UserFlag/clearflagform.php @@ -0,0 +1,92 @@ +. + * + * @category Form + * @package StatusNet + * @author Evan Prodromou + * @copyright 2009 StatusNet, Inc. + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 + * @link http://status.net/ + */ + +if (!defined('STATUSNET')) { + exit(1); +} + +require_once INSTALLDIR.'/lib/form.php'; + +/** + * Form for clearing profile flags + * + * @category Form + * @package StatusNet + * @author Evan Prodromou + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 + * @link http://status.net/ + */ + +class ClearFlagForm extends ProfileActionForm +{ + /** + * class of the form + * Action this form provides + * + * @return string class of the form + */ + + function formClass() + { + return 'form_entity_clearflag'; + } + + /** + * Action this form provides + * + * @return string Name of the action, lowercased. + */ + + function target() + { + return 'clearflag'; + } + + /** + * Title of the form + * + * @return string Title of the form, internationalized + */ + + function title() + { + return _('Clear'); + } + + /** + * Description of the form + * + * @return string description of the form, internationalized + */ + + function description() + { + return _('Clear all flags'); + } +} -- cgit v1.2.3-54-g00ecf