Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added option to disable "Forgot Password" link on login page. #1563

Merged
merged 1 commit into from
Dec 3, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions i18n/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"Accounts_RegistrationForm_SecretURL_Description" : "You must provide a random string that will be added to your registration URL. Example: https://demo.rocket.chat/register/[secret_hash]",
"Accounts_RegistrationRequired" : "Registration Required",
"Accounts_RequireNameForSignUp" : "Require Name For Signup",
"Accounts_PasswordReset" : "Password Reset",
"Accounts_Enrollment_Email" : "Enrollment E-mail",
"Accounts_Enrollment_Email_Description" : "You may use [name], [fname], [lname] for the user's full name, first name or last name, respectively.<br />You may use [email] for the user's e-mail.",
"Activate" : "Activate",
Expand Down
2 changes: 2 additions & 0 deletions packages/rocketchat-lib/server/startup/settings.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ RocketChat.settings.add 'Accounts_RegistrationForm_SecretURL', Random.id(), { ty
RocketChat.settings.add 'Accounts_RegistrationForm_LinkReplacementText', 'New user registration is currently disabled', { type: 'string', group: 'Accounts', section: 'Registration', public: true }
RocketChat.settings.add 'Accounts_Registration_AuthenticationServices_Enabled', true, { type: 'boolean', group: 'Accounts', section: 'Registration', public: true }

RocketChat.settings.add 'Accounts_PasswordReset', true, { type: 'boolean', group: 'Accounts', public: true, section: 'Registration' }

RocketChat.settings.add 'Accounts_AvatarStoreType', 'GridFS', { type: 'string', group: 'Accounts', section: 'Avatar' }
RocketChat.settings.add 'Accounts_AvatarStorePath', '', { type: 'string', group: 'Accounts', section: 'Avatar' }
RocketChat.settings.add 'Accounts_AvatarResize', false, { type: 'boolean', group: 'Accounts', section: 'Avatar' }
Expand Down
3 changes: 3 additions & 0 deletions packages/rocketchat-ui-login/login/form.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ Template.loginForm.helpers
linkReplacementText: ->
return RocketChat.settings.get('Accounts_RegistrationForm_LinkReplacementText')

passwordresetAllowed: ->
return RocketChat.settings.get 'Accounts_PasswordReset'

Template.loginForm.events
'submit #login-card': (event, instance) ->
event.preventDefault()
Expand Down
2 changes: 2 additions & 0 deletions packages/rocketchat-ui-login/login/form.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@ <h2>{{{_ "Registration_Succeeded"}}}</h2>
{{else}}{{#if linkReplacementText}}
{{{linkReplacementText}}}
{{/if}}{{/if}}
{{#if passwordresetAllowed}}
<div class="forgot-password {{showForgotPasswordLink}}">
<a href="">{{_ 'Forgot_password'}}</a>
</div>
{{/if}}
{{/if}}
<div class="back-to-login {{showBackToLoginLink}}">
<a href="">{{_ 'Back_to_login'}}</a>
Expand Down