forked from Wavyzz/dolibarr
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:
committed by
GitHub
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>';
|
||||
|
||||
Reference in New Issue
Block a user