3 * StatusNet, the distributed open-source microblogging tool
5 * Form for enabling/disabling plugins
9 * LICENCE: This program is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU Affero General Public License as published by
11 * the Free Software Foundation, either version 3 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU Affero General Public License for more details.
19 * You should have received a copy of the GNU Affero General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
24 * @copyright 2010 StatusNet, Inc.
25 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
26 * @link http://status.net/
29 if (!defined('STATUSNET') && !defined('LACONICA')) {
33 require_once INSTALLDIR.'/lib/form.php';
36 * Form for joining a group
40 * @author Brion Vibber <brion@status.net>
41 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
42 * @link http://status.net/
44 * @see PluginDisableForm
47 class PluginEnableForm extends Form
50 * Plugin to enable/disable
58 * @param HTMLOutputter $out output channel
59 * @param string $plugin plugin to enable/disable
62 function __construct($out=null, $plugin=null)
64 parent::__construct($out);
66 $this->plugin = $plugin;
72 * @return string ID of the form
77 return 'plugin-enable-' . $this->plugin;
83 * @return string of the form class
88 return 'form_plugin_enable';
94 * @return string URL of the action
99 return common_local_url('pluginenable',
100 array('plugin' => $this->plugin));
109 function formActions()
111 // TRANS: Plugin admin panel controls
112 $this->out->submit('submit', _m('plugin', 'Enable'));