From b72a5c8d4cae90a9348d85bd457f473d6fd8eaec Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Fri, 18 Aug 2023 16:35:27 +0800 Subject: [PATCH] Add social media register options to Register page --- .../Account/Localization/Resources/ar.json | 4 +- .../Account/Localization/Resources/cs.json | 4 +- .../Account/Localization/Resources/da.json | 4 +- .../Account/Localization/Resources/de.json | 4 +- .../Account/Localization/Resources/el.json | 4 +- .../Account/Localization/Resources/en-GB.json | 4 +- .../Account/Localization/Resources/en.json | 4 +- .../Account/Localization/Resources/es-mx.json | 4 +- .../Account/Localization/Resources/es.json | 4 +- .../Account/Localization/Resources/fa.json | 4 +- .../Account/Localization/Resources/fi.json | 4 +- .../Account/Localization/Resources/fr.json | 4 +- .../Account/Localization/Resources/hi.json | 4 +- .../Account/Localization/Resources/hr.json | 4 +- .../Account/Localization/Resources/hu.json | 4 +- .../Account/Localization/Resources/is.json | 4 +- .../Account/Localization/Resources/it.json | 4 +- .../Account/Localization/Resources/nl.json | 4 +- .../Account/Localization/Resources/pl-PL.json | 4 +- .../Account/Localization/Resources/pt-BR.json | 4 +- .../Account/Localization/Resources/ro-RO.json | 4 +- .../Account/Localization/Resources/ru.json | 4 +- .../Account/Localization/Resources/sk.json | 4 +- .../Account/Localization/Resources/sl.json | 4 +- .../Account/Localization/Resources/tr.json | 4 +- .../Account/Localization/Resources/vi.json | 4 +- .../Localization/Resources/zh-Hans.json | 4 +- .../Localization/Resources/zh-Hant.json | 4 +- .../Pages/Account/Register.cshtml | 14 +++++++ .../Pages/Account/Register.cshtml.cs | 41 ++++++++++++++++++- 30 files changed, 137 insertions(+), 30 deletions(-) diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ar.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ar.json index cdabc68af1..4691a2268e 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ar.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ar.json @@ -64,6 +64,8 @@ "PasswordResetInfoInEmail": "لقد تلقينا طلب استرداد الحساب! إذا بدأت هذا الطلب ، فانقر فوق الارتباط التالي لإعادة تعيين كلمة المرور الخاصة بك.", "ResetMyPassword": "إعادة تعيين كلمة المرور الخاصة بي", "AccessDenied": "تم الرفض!", - "AccessDeniedMessage": "ليس لديك حق الوصول إلى هذا المورد." + "AccessDeniedMessage": "ليس لديك حق الوصول إلى هذا المورد.", + "OrRegisterWith": "أو التسجيل بـ:", + "RegisterUsingYourProviderAccount": "قم بالتسجيل باستخدام حسابك في {0}" } } \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/cs.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/cs.json index faec2b2a22..aeae890d54 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/cs.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/cs.json @@ -63,6 +63,8 @@ "PasswordResetInfoInEmail": "Obdrželi jsme žádost o obnovení účtu! Pokud jste tento požadavek iniciovali, klikněte na následující odkaz a obnovte své heslo.", "ResetMyPassword": "Obnovit moje heslo", "AccessDenied": "Přístup odepřen!", - "AccessDeniedMessage": "K tomuto zdroji nemáte přístup." + "AccessDeniedMessage": "K tomuto zdroji nemáte přístup.", + "OrRegisterWith": "Nebo se registrujte pomocí:", + "RegisterUsingYourProviderAccount": "Registrovat pomocí vašeho účtu {0}" } } \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/da.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/da.json index 895638aede..24283d06c8 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/da.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/da.json @@ -63,6 +63,8 @@ "PasswordResetInfoInEmail": "Vi har modtaget en forespørgsel for gendannelse af konto! Hvis du har lavet denne forespørgsel, klik på det efterfølgende link for at nulstille dit kodeord.", "ResetMyPassword": "Nulstil mit kodeord", "AccessDenied": "Adgang nægtet!", - "AccessDeniedMessage": "Du har ikke adgang til denne ressource." + "AccessDeniedMessage": "Du har ikke adgang til denne ressource.", + "OrRegisterWith": "Eller registrér med:", + "RegisterUsingYourProviderAccount": "Registrér med din {0} konto" } } diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/de.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/de.json index fb1f4b7153..64c86e4abe 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/de.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/de.json @@ -64,6 +64,8 @@ "PasswordResetInfoInEmail": "Wir haben eine Anfrage zur Wiederherstellung des Kontos erhalten! Wenn Sie diese Anforderung initiiert haben, klicken Sie auf den folgenden Link, um Ihr Passwort zurückzusetzen.", "ResetMyPassword": "Mein Passwort zurücksetzen", "AccessDenied": "Zugriff abgelehnt!", - "AccessDeniedMessage": "Sie haben keinen Zugriff auf diese Ressource." + "AccessDeniedMessage": "Sie haben keinen Zugriff auf diese Ressource.", + "OrRegisterWith": "Oder registrieren Sie sich mit:", + "RegisterUsingYourProviderAccount": "Registrieren Sie sich mit Ihrem {0} Benutzerkonto" } } diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/el.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/el.json index 6a6788300d..a64dca5ef5 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/el.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/el.json @@ -64,6 +64,8 @@ "PasswordResetInfoInEmail": "Λάβαμε ένα αίτημα ανάκτησης λογαριασμού! Εάν υποβάλατε αυτό το αίτημα, κάντε κλικ στον παρακάτω σύνδεσμο για να επαναφέρετε τον κωδικό πρόσβασής σας.", "ResetMyPassword": "Επαναφορά του κωδικού πρόσβασής μου", "AccessDenied": "Δεν επιτρέπεται η πρόσβαση!", - "AccessDeniedMessage": "Δεν έχετε πρόσβαση σε αυτόν τον πόρο." + "AccessDeniedMessage": "Δεν έχετε πρόσβαση σε αυτόν τον πόρο.", + "OrRegisterWith": "Ή εγγραφείτε με:", + "RegisterUsingYourProviderAccount": "Εγγραφείτε χρησιμοποιώντας τον λογαριασμό σας {0}" } } \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en-GB.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en-GB.json index 4f1486a78e..f4208335b5 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en-GB.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en-GB.json @@ -61,6 +61,8 @@ "Volo.Account:InvalidEmailAddress": "Cannot find the given email address: {0}", "PasswordReset": "Password reset", "PasswordResetInfoInEmail": "We received an account recovery request! If you initiated this request, click the following link to reset your password.", - "ResetMyPassword": "Reset my password" + "ResetMyPassword": "Reset my password", + "OrRegisterWith": "Or register with", + "RegisterUsingYourProviderAccount": "Register using your {0} account" } } \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json index 706f92bbd5..183bb5363e 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json @@ -66,6 +66,8 @@ "PasswordResetInfoInEmail": "We received an account recovery request! If you initiated this request, click the following link to reset your password.", "ResetMyPassword": "Reset my password", "AccessDenied": "Access denied!", - "AccessDeniedMessage": "You do not have access to this resource." + "AccessDeniedMessage": "You do not have access to this resource.", + "OrRegisterWith": "Or register with", + "RegisterUsingYourProviderAccount": "Register using your {0} account" } } \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/es-mx.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/es-mx.json index b3bcad86f9..6793e58986 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/es-mx.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/es-mx.json @@ -34,6 +34,8 @@ "NewPasswordConfirmFailed": "Por favor, confirme la nueva contraseña.", "NewPasswordSameAsOld": "La nueva contraseña debe ser diferente de la contraseña actual.", "Manage": "Administrar", - "MyAccount": "Mi cuenta" + "MyAccount": "Mi cuenta", + "OrRegisterWith": "O registrarse con", + "RegisterUsingYourProviderAccount": "Registrarse con su cuenta de {0} " } } diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/es.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/es.json index 0e883a1372..9fd52c8450 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/es.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/es.json @@ -64,6 +64,8 @@ "PasswordResetInfoInEmail": "Recibimos una solicitud de recuperación de cuenta. Si inició esta solicitud, haga clic en el siguiente enlace para restablecer su contraseña.", "ResetMyPassword": "Restablecer mi contraseña", "AccessDenied": "¡Acceso denegado!", - "AccessDeniedMessage": "No tienes acceso a este recurso." + "AccessDeniedMessage": "No tienes acceso a este recurso.", + "OrRegisterWith": "O registrarse con:", + "RegisterUsingYourProviderAccount": "Registrarse con su cuenta de {0} " } } \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fa.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fa.json index e7c5ee084e..4fc0685b79 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fa.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fa.json @@ -64,6 +64,8 @@ "PasswordResetInfoInEmail": "ما درخواست بازیابی حساب دریافت کردیم! اگر این درخواست را آغاز کرده اید, برای بازنشانی گذرواژه خود روی پیوند زیر کلیک کنید.", "ResetMyPassword": "بازنشانی گذرواژه من", "AccessDenied": "دسترسی ممنوع!", - "AccessDeniedMessage": "شما به این منبع دسترسی ندارید." + "AccessDeniedMessage": "شما به این منبع دسترسی ندارید.", + "OrRegisterWith": "یا ثبت نام کنید با:", + "RegisterUsingYourProviderAccount": "با استفاده از حساب {0} خود ثبت نام کنید" } } \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fi.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fi.json index 027928ead3..2f0ae2c574 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fi.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fi.json @@ -66,6 +66,8 @@ "PasswordResetInfoInEmail": "Saimme tilin palautuspyynnön! Jos aloitit tämän pyynnön, voit nollata salasanasi napsauttamalla seuraavaa linkkiä.", "ResetMyPassword": "Vaihda salasanani", "AccessDenied": "Pääsy evätty!", - "AccessDeniedMessage": "Sinulla ei ole pääsyä tähän resurssiin." + "AccessDeniedMessage": "Sinulla ei ole pääsyä tähän resurssiin.", + "OrRegisterWith": "Tai rekisteröidy:", + "RegisterUsingYourProviderAccount": "Rekisteröidy {0} -tililläsi" } } \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fr.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fr.json index b1e547652d..aa640abf1a 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fr.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fr.json @@ -64,6 +64,8 @@ "PasswordResetInfoInEmail": "Nous avons reçu une demande de récupération de compte! Si vous avez lancé cette demande, cliquez sur le lien suivant pour réinitialiser votre mot de passe.", "ResetMyPassword": "Réinitialiser mon mot de passe", "AccessDenied": "Accès refusé!", - "AccessDeniedMessage": "Vous n'avez pas accès à cette ressource." + "AccessDeniedMessage": "Vous n'avez pas accès à cette ressource.", + "OrRegisterWith": "Or register with", + "RegisterUsingYourProviderAccount": "Register using your {0} account" } } diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hi.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hi.json index fd93420216..a424deae00 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hi.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hi.json @@ -64,6 +64,8 @@ "PasswordResetInfoInEmail": "हमें एक खाता पुनर्प्राप्ति अनुरोध प्राप्त हुआ! यदि आपने यह अनुरोध किया है, तो अपना पासवर्ड रीसेट करने के लिए निम्न लिंक पर क्लिक करें।", "ResetMyPassword": "अपना पासवर्ड रीसेट करें", "AccessDenied": "पहुंच अस्वीकृत!", - "AccessDeniedMessage": "आपके पास इस संसाधन तक पहुँच नहीं है।" + "AccessDeniedMessage": "आपके पास इस संसाधन तक पहुँच नहीं है।", + "OrRegisterWith": "या इसके साथ पंजीकरण करें:", + "RegisterUsingYourProviderAccount": "अपने {0} खाते का उपयोग करके पंजीकरण करें" } } \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hr.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hr.json index 665755a2dd..8ec48e7a09 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hr.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hr.json @@ -66,6 +66,8 @@ "PasswordResetInfoInEmail": "Primili smo zahtjev za oporavak računa! Ako ste vi pokrenuli ovaj zahtjev, kliknite na sljedeću poveznicu za ponovno postavljanje lozinke.", "ResetMyPassword": "Resetirati moju lozinku", "AccessDenied": "Pristup odbijen!", - "AccessDeniedMessage": "Nemate pristup ovom resursu." + "AccessDeniedMessage": "Nemate pristup ovom resursu.", + "OrRegisterWith": "Ili se registrirajte sa:", + "RegisterUsingYourProviderAccount": "Registrirajte se koristeći svoj {0} račun" } } diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hu.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hu.json index 3c97fd290d..481fa2733a 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hu.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hu.json @@ -64,6 +64,8 @@ "PasswordResetInfoInEmail": "Fiók-helyreállítási kérelmet kaptunk! Ha Ön kezdeményezte ezt a kérést, kattintson a következő hivatkozásra jelszava visszaállításához.", "ResetMyPassword": "Jelszavam visszaállítása", "AccessDenied": "Hozzáférés megtagadva!", - "AccessDeniedMessage": "Nincs hozzáférése ehhez az erőforráshoz." + "AccessDeniedMessage": "Nincs hozzáférése ehhez az erőforráshoz.", + "OrRegisterWith": "Vagy regisztráljon:", + "RegisterUsingYourProviderAccount": "Regisztráljon a(z) {0} fiókjával" } } \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/is.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/is.json index e309962242..f33db6eadb 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/is.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/is.json @@ -63,6 +63,8 @@ "PasswordResetInfoInEmail": "Við fengum beiðni um endurheimt reiknings! Ef þú stofnaðir þessa beiðni skaltu smella á eftirfarandi krækju til að endurstilla lykilorðið þitt.", "ResetMyPassword": "Endurstilla lykilorðið mitt", "AccessDenied": "Aðgangi hafnað!", - "AccessDeniedMessage": "Þú hefur ekki aðgang að þessari auðlind." + "AccessDeniedMessage": "Þú hefur ekki aðgang að þessari auðlind.", + "OrRegisterWith": "Eða skráðu þig með:", + "RegisterUsingYourProviderAccount": "Skráðu þig með {0} aðganginum þínum" } } \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/it.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/it.json index 6e4521c8f7..0b5f3dbcf2 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/it.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/it.json @@ -64,6 +64,8 @@ "PasswordResetInfoInEmail": "Abbiamo ricevuto una richiesta di recupero dell'account! Se hai fatto tu questa richiesta fai clic sul seguente collegamento per reimpostare la password.", "ResetMyPassword": "Reimposta la mia password", "AccessDenied": "Accesso negato!", - "AccessDeniedMessage": "Non hai accesso a questa risorsa." + "AccessDeniedMessage": "Non hai accesso a questa risorsa.", + "OrRegisterWith": "Oppure registrati con:", + "RegisterUsingYourProviderAccount": "Registrati utilizzando il tuo account {0}" } } diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/nl.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/nl.json index b804e517a9..d5d400277f 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/nl.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/nl.json @@ -63,6 +63,8 @@ "PasswordResetInfoInEmail": "We hebben een verzoek ontvangen om uw wachtwoord opnieuw in te stellen. Als u dit verzoek heeft ingediend, klikt u op de volgende link om een nieuw wachtwoord in te stellen.", "ResetMyPassword": "Reset mijn wachtwoord", "AccessDenied": "Toegang geweigerd!", - "AccessDeniedMessage": "U heeft geen toegang tot deze bron." + "AccessDeniedMessage": "U heeft geen toegang tot deze bron.", + "OrRegisterWith": "Of registreer met:", + "RegisterUsingYourProviderAccount": "Registreer met uw {0} -account" } } \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pl-PL.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pl-PL.json index c3596c8aa5..0fdab745de 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pl-PL.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pl-PL.json @@ -63,6 +63,8 @@ "PasswordResetInfoInEmail": "Otrzymaliśmy prośbę o odzyskanie konta! Jeśli zainicjowałeś to żądanie, kliknij poniższy link, aby zresetować hasło.", "ResetMyPassword": "Zresetować moje hasło", "AccessDenied": "Brak dostępu!", - "AccessDeniedMessage": "Nie masz dostępu do tego zasobu." + "AccessDeniedMessage": "Nie masz dostępu do tego zasobu.", + "OrRegisterWith": "Lub zarejestruj się za pomocą:", + "RegisterUsingYourProviderAccount": "Zarejestruj się za pomocą konta {0}" } } \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pt-BR.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pt-BR.json index 732d804bbe..5b54bc91c5 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pt-BR.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pt-BR.json @@ -64,6 +64,8 @@ "PasswordResetInfoInEmail": "Recebemos um pedido de recuperação de conta! Se você iniciou esta solicitação, clique no link a seguir para redefinir sua senha.", "ResetMyPassword": "Resetar minha senha", "AccessDenied": "Acesso negado!", - "AccessDeniedMessage": "Você não tem acesso a este recurso." + "AccessDeniedMessage": "Você não tem acesso a este recurso.", + "OrRegisterWith": "Ou registre-se com:", + "RegisterUsingYourProviderAccount": "Registre-se utilizando sua conta {0}" } } \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ro-RO.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ro-RO.json index c2a75c3401..732a4103ec 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ro-RO.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ro-RO.json @@ -63,6 +63,8 @@ "PasswordResetInfoInEmail": "Am primit o cerere de recuperare a contului! Dacă dumneavoastră aţi iniţiat această cerere, daţi click pe următorul link pentru a vă reseta parola.", "ResetMyPassword": "Resetează-mi parola", "AccessDenied": "Acces interzis!", - "AccessDeniedMessage": "Nu aveţi acces la această resursă." + "AccessDeniedMessage": "Nu aveţi acces la această resursă.", + "OrRegisterWith": "Sau înregistraţi-vă cu:", + "RegisterUsingYourProviderAccount": "Înregistraţi-vă folosindu-vă contul {0}" } } diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ru.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ru.json index 88250e8d03..8413c32831 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ru.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ru.json @@ -63,6 +63,8 @@ "PasswordResetInfoInEmail": "Мы получили запрос на восстановление аккаунта! Если вы инициировали этот запрос, щелкните следующую ссылку, чтобы сбросить пароль.", "ResetMyPassword": "Сбросить пароль", "AccessDenied": "В доступе отказано!", - "AccessDeniedMessage": "У вас нет доступа к этому ресурсу." + "AccessDeniedMessage": "У вас нет доступа к этому ресурсу.", + "OrRegisterWith": "Или зарегистрируйтесь с помощью:", + "RegisterUsingYourProviderAccount": "Зарегистрируйтесь, используя свой {0} аккаунт" } } \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sk.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sk.json index 6ca224455a..d69c0da03e 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sk.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sk.json @@ -64,6 +64,8 @@ "PasswordResetInfoInEmail": "Dostali sme žiadosť na obnovenie účtu! Ak ste o zmenu žiadali vy, kliknite na nasledujúci link a obnovte svoje heslo.", "ResetMyPassword": "Obnovte moje heslo", "AccessDenied": "Prístup zamietnutý!", - "AccessDeniedMessage": "K tomuto zdroju nemáte prístup." + "AccessDeniedMessage": "K tomuto zdroju nemáte prístup.", + "OrRegisterWith": "Alebo sa zaregistrujte pomocou:", + "RegisterUsingYourProviderAccount": "Zaregistrujte sa pomocou svojho {0} účtu" } } \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sl.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sl.json index 322e04cf76..4442227ad6 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sl.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sl.json @@ -64,6 +64,8 @@ "PasswordResetInfoInEmail": "Prejeta je bila zahteva za obnovitev računa! V kolikor ste vi sprožili zahtevo, kliknite na sledečo povezavo, da ponastavite geslo.", "ResetMyPassword": "Ponastavi geslo", "AccessDenied": "Dostop zavrnjen!", - "AccessDeniedMessage": "Nimate dostopa do tega vira." + "AccessDeniedMessage": "Nimate dostopa do tega vira.", + "OrRegisterWith": "Ali pa se registrirajte z:", + "RegisterUsingYourProviderAccount": "Registrirajte se z uporabo vašega {0} računa" } } \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json index c63eb86cef..0e53963f9a 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json @@ -66,6 +66,8 @@ "PasswordResetInfoInEmail": "Şifrenizi sıfırlamanız için bir talep aldık! Eğer bu talebi siz gerçekleştirmişseniz, şifrenizi sıfırlamak için bağlantıya tıklayın.", "ResetMyPassword": "Şifremi sıfırla", "AccessDenied": "Erişim reddedildi!", - "AccessDeniedMessage": "Bu kaynağa erişiminiz yok." + "AccessDeniedMessage": "Bu kaynağa erişiminiz yok.", + "OrRegisterWith": "Veya bunlarla kayıt ol:", + "RegisterUsingYourProviderAccount": "{0} hesabınızla kayıt olun." } } diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/vi.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/vi.json index e10ae3ebe1..eae396b011 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/vi.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/vi.json @@ -63,6 +63,8 @@ "PasswordResetInfoInEmail": "Chúng tôi đã nhận được yêu cầu khôi phục tài khoản! Nếu bạn bắt đầu yêu cầu này, hãy nhấp vào liên kết sau để đặt lại mật khẩu của bạn.", "ResetMyPassword": "Đặt lại mật khẩu của tôi", "AccessDenied": "Quyền truy cập bị từ chối!", - "AccessDeniedMessage": "Bạn không có quyền truy cập vào tài nguyên này." + "AccessDeniedMessage": "Bạn không có quyền truy cập vào tài nguyên này.", + "OrRegisterWith": "Hoặc đăng ký bằng:", + "RegisterUsingYourProviderAccount": "Đăng ký bằng tài khoản {0} của bạn" } } \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json index 1cfabd4d62..635971e7db 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json @@ -66,6 +66,8 @@ "PasswordResetInfoInEmail": "我们收到了帐户恢复请求!如果你发起了此请求,请单击以下链接以重置密码.", "ResetMyPassword": "重置我的密码", "AccessDenied": "拒绝访问!", - "AccessDeniedMessage": "你无权访问此资源." + "AccessDeniedMessage": "你无权访问此资源.", + "OrRegisterWith": "或注册:", + "RegisterUsingYourProviderAccount": "使用你的{0}帐户注册" } } \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hant.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hant.json index 8749163c1d..a782aa42dc 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hant.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hant.json @@ -64,6 +64,8 @@ "PasswordResetInfoInEmail": "我們收到了帳戶恢復請求!如果你發起了此請求,請點擊以下連結以重置密碼.", "ResetMyPassword": "重置我的密碼", "AccessDenied": "拒絕訪問!", - "AccessDeniedMessage": "您無權訪問此資源." + "AccessDeniedMessage": "您無權訪問此資源.", + "OrRegisterWith": "或是註冊用:", + "RegisterUsingYourProviderAccount": "使用你的{0}帳號註冊" } } diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml index 59d5ee852f..aa5ecba592 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml @@ -27,5 +27,19 @@ @L["Register"] + + @if (!Model.IsExternalLogin && Model.VisibleExternalProviders.Any()) + { +
+
@L["OrRegisterWith"]
+
+ @foreach (var provider in Model.VisibleExternalProviders) + { + + } +
+
+ } + diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs index f9489f7797..11d8b92c91 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs @@ -1,7 +1,10 @@ +using System; +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Security.Claims; using System.Threading.Tasks; +using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; @@ -32,16 +35,29 @@ public class RegisterModel : AccountPageModel [BindProperty(SupportsGet = true)] public string ExternalLoginAuthSchema { get; set; } - - public RegisterModel(IAccountAppService accountAppService) + + public IEnumerable ExternalProviders { get; set; } + public IEnumerable VisibleExternalProviders => ExternalProviders.Where(x => !string.IsNullOrWhiteSpace(x.DisplayName)); + + protected IAuthenticationSchemeProvider SchemeProvider { get; } + + protected AbpAccountOptions AccountOptions { get; } + + public RegisterModel( + IAccountAppService accountAppService, + IAuthenticationSchemeProvider schemeProvider, + IOptions accountOptions) { + SchemeProvider = schemeProvider; AccountAppService = accountAppService; + AccountOptions = accountOptions.Value; } public virtual async Task OnGetAsync() { await CheckSelfRegistrationAsync(); await TrySetEmailAsync(); + ExternalProviders = await GetExternalProviders(); return Page(); } @@ -77,6 +93,7 @@ public class RegisterModel : AccountPageModel try { await CheckSelfRegistrationAsync(); + ExternalProviders = await GetExternalProviders(); if (IsExternalLogin) { @@ -155,6 +172,20 @@ public class RegisterModel : AccountPageModel throw new UserFriendlyException(L["SelfRegistrationDisabledMessage"]); } } + + protected virtual async Task> GetExternalProviders() + { + var schemes = await SchemeProvider.GetAllSchemesAsync(); + + return schemes + .Where(x => x.DisplayName != null || x.Name.Equals(AccountOptions.WindowsAuthenticationSchemeName, StringComparison.OrdinalIgnoreCase)) + .Select(x => new ExternalProviderModel + { + DisplayName = x.DisplayName, + AuthenticationScheme = x.Name + }) + .ToList(); + } public class PostInput { @@ -173,4 +204,10 @@ public class RegisterModel : AccountPageModel [DisableAuditing] public string Password { get; set; } } + + public class ExternalProviderModel + { + public string DisplayName { get; set; } + public string AuthenticationScheme { get; set; } + } }