mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 17:48:25 +01:00
Fix page to setup OAUTH
This commit is contained in:
@@ -100,7 +100,7 @@ $form = new Form($db);
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans('ConfigOAuth'), $linkback, 'title_setup');
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
|
||||
@@ -137,15 +137,8 @@ print '</form>';
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
$i = 0;
|
||||
|
||||
//var_dump($list);
|
||||
foreach ($conf->global as $key => $val) {
|
||||
@@ -155,8 +148,19 @@ foreach ($conf->global as $key => $val) {
|
||||
}
|
||||
}
|
||||
|
||||
// $list is defined into oauth.lib.php to the list of supporter OAuth providers.
|
||||
foreach ($listinsetup as $key) {
|
||||
|
||||
if (count($listinsetup) > 0) {
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
$i = 0;
|
||||
|
||||
// $list is defined into oauth.lib.php to the list of supporter OAuth providers.
|
||||
foreach ($listinsetup as $key) {
|
||||
$supported = 0;
|
||||
$keyforsupportedoauth2array = $key[0]; // May be OAUTH_GOOGLE_NAME or OAUTH_GOOGLE_xxx_NAME
|
||||
$keyforsupportedoauth2array = preg_replace('/^OAUTH_/', '', $keyforsupportedoauth2array);
|
||||
@@ -221,17 +225,16 @@ foreach ($listinsetup as $key) {
|
||||
print '<td><label for="'.$key[2].'">'.$langs->trans("OAUTH_SECRET").'</label></td>';
|
||||
print '<td><input type="password" size="100" id="'.$key[2].'" name="'.$key[2].'" value="'.$conf->global->{$key[2]}.'">';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print '</table>'."\n";
|
||||
print '</div>';
|
||||
|
||||
print $form->buttonsSaveCancel("Modify", '');
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
print '</table>'."\n";
|
||||
print '</div>';
|
||||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
print $form->buttonsSaveCancel("Modify", '');
|
||||
|
||||
print '</form>';
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
Reference in New Issue
Block a user