4 * This file is (c) Copyright 2010 by Olivier BERGER, Madhumita DHAR, Institut TELECOM
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 * This program has been developed in the frame of the COCLICO
21 * project with financial support of its funders.
25 require_once('../../env.inc.php');
26 require_once $gfwww.'include/pre.php';
27 require_once 'checks.php';
29 $pluginname = 'oauthprovider';
31 oauthprovider_CheckSiteAdmin();
33 session_require_global_perm('forge_admin');
35 $f_consumer_id = getIntFromGet( 'consumer_id' );
37 $t_consumer = OauthAuthzConsumer::load( $f_consumer_id );
44 <form action="consumer_update.php" method="post">
45 <?php echo '<input type="hidden" name="plugin_oauthprovider_consumer_update_token" value="'.form_generate_key().'"/>' ?>
46 <input type="hidden" name="consumer_id" value="<?php echo $t_consumer->getId() ?>"/>
47 <table class="width60" align="center" cellspacing="1">
50 <td class="form-title"><?php echo _('Update Consumer') ?></td>
51 <td class="right"><?php print util_make_link("/plugins/".$pluginname.'/consumer_manage.php?consumer_id=' . $t_consumer->getId(), _('Cancel') ); ?></td>
54 <tr <?php echo $HTML->boxGetAltRowStyle($i++) ?>>
55 <td class="category"><?php echo _('Name') ?></td>
56 <td><input name="consumer_name" maxlength="128" size="40" value="<?php echo ( $t_consumer->getName() ) ?>"/></td>
59 <tr <?php echo $HTML->boxGetAltRowStyle($i++) ?>>
60 <td class="category"><?php echo _('URL') ?></td>
61 <td><input name="consumer_url" maxlength="250" size="40" value="<?php echo ( $t_consumer->getUrl() ) ?>"/></td>
64 <tr <?php echo $HTML->boxGetAltRowStyle($i++) ?>>
65 <td class="category"><?php echo _('Description') ?></td>
66 <td><input name="consumer_desc" maxlength="250" size="40" value="<?php echo ( $t_consumer->getDesc() ) ?>"/></td>
69 <tr <?php echo $HTML->boxGetAltRowStyle($i++) ?>>
70 <td class="category"><?php echo _('Email') ?></td>
71 <td><input name="consumer_email" maxlength="250" size="40" value="<?php echo ( $t_consumer->getEmail() ) ?>"/></td>
74 <tr <?php echo $HTML->boxGetAltRowStyle($i++) ?>>
75 <td class="category"><?php echo _('Key') ?></td>
76 <td><input name="consumer_key" readonly="readonly" maxlength="250" size="40" value="<?php echo ( $t_consumer->key ) ?>"/></td>
79 <tr <?php echo $HTML->boxGetAltRowStyle($i++) ?>>
80 <td class="category"><?php echo _('Secret') ?></td>
81 <td><input name="consumer_secret" readonly="readonly" maxlength="250" size="40" value="<?php echo ( $t_consumer->secret ) ?>"/></td>
85 <td class="center" colspan="1"><input type="submit" name="update" value="<?php echo _('Update Consumer') ?>"/></td>
86 <td class="center" colspan="1"><input type="submit" name="keys_update" value="<?php echo _('Regenerate keys & Update Consumer') ?>"/></td>
93 //html_page_bottom1( __FILE__ );
94 site_project_footer(array());