mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Add token oauth for social network (#30813)
* Add token oauth for social network * Fix phpstan errors * Fix phpstan errors * variable undeclared and phan errors * variable undeclared and phan errors --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
parent
4690f4aadb
commit
0ec1d2b750
|
|
@ -295,8 +295,26 @@ print '<td>https://mastodon.social/api/v1/accounts/id_user</td>';
|
|||
print '</tr>';
|
||||
$vartosmtpstype = 'MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING';
|
||||
|
||||
print '<script>
|
||||
$(document).ready(function() {
|
||||
function toggleOAuthServiceDisplay() {
|
||||
if ($("#radio_oauth").is(":checked")) {
|
||||
$("#oauth_service_div").show();
|
||||
} else {
|
||||
$("#oauth_service_div").hide();
|
||||
}
|
||||
}
|
||||
|
||||
toggleOAuthServiceDisplay();
|
||||
|
||||
$("input[name=\"'.$vartosmtpstype.'\"]").change(function() {
|
||||
toggleOAuthServiceDisplay();
|
||||
});
|
||||
});
|
||||
</script>';
|
||||
|
||||
// Methods oauth
|
||||
print '<td>'.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").'</td>';
|
||||
print '<tr><td>'.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").'</td>';
|
||||
print '<td>';
|
||||
print '<input type="radio" id="radio_oauth" name="'.$vartosmtpstype.'" value="XOAUTH2"'.(getDolGlobalString($vartosmtpstype) == 'XOAUTH2' ? ' checked' : '').(isModEnabled('oauth') ? '' : ' disabled').'>';
|
||||
print '<label for="radio_oauth">'.$form->textwithpicto($langs->trans("UseOauth"), $langs->trans("OauthNotAvailableForAllAndHadToBeCreatedBefore")).'</label>';
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user