Skip to content
Snippets Groups Projects
Commit 28038b88 authored by Yakira C. Bristol's avatar Yakira C. Bristol
Browse files

Update PR With Admin Settings Option

parent f63fd8c1
No related merge requests found
......@@ -2,6 +2,9 @@ Template.loginForm.helpers
userName: ->
return Meteor.user()?.username
namePlaceholder: ->
return if RocketChat.settings.get 'Accounts_RequireNameForSignUp' then 'Name' else 'Name(optional)'
showName: ->
return 'hidden' unless Template.instance().state.get() is 'register'
......@@ -129,6 +132,8 @@ Template.loginForm.onCreated ->
validationObj['pass'] = t('Invalid_pass')
if instance.state.get() is 'register'
if RocketChat.settings.get 'Accounts_RequireNameForSignUp' and not formObj['name']
validationObj['name'] = t('Invalid_name')
if formObj['confirm-pass'] isnt formObj['pass']
validationObj['confirm-pass'] = t('Invalid_confirm_pass')
......
......@@ -15,7 +15,7 @@
{{/if}}
<div class="fields">
<div class='input-text active {{showName}}'>
<input type="text" name='name' placeholder='{{_ "Name(optional)"}}' dir="auto" />
<input type="text" name='name' placeholder='{{namePlaceholder}}' dir="auto" />
</div>
<div class='input-text active {{showEmailOrUsername}}'>
<input type="text" name='emailOrUsername' placeholder='{{_ "Email_or_username"}}' autocapitalize="off" autocorrect="off" />
......
......@@ -44,6 +44,7 @@
"Accounts_OAuth_Custom_Button_Label_Text" : "Button Text",
"Accounts_OAuth_Custom_Button_Label_Color" : "Button Text Color",
"Accounts_OAuth_Custom_Button_Color" : "Button Color",
"Accounts_RequireNameForSignUp" : "Require name for signup",
"Activate" : "Activate",
"Add_custom_oauth" : "Add custom oauth",
"Add_Members" : "Add Members",
......
......@@ -35,6 +35,7 @@
"Accounts_OAuth_Custom_Button_Label_Text" : "Texto do botão",
"Accounts_OAuth_Custom_Button_Label_Color" : "Cor do texto do botão",
"Accounts_OAuth_Custom_Button_Color" : "Cor do botão",
"Accounts_RequireNameForSignUp" : "Nome é obrigatório para cadastro",
"Activate" : "Ativar",
"Add_custom_oauth" : "Adicionar oauth customizado",
"Add_Members" : "Adicionar membros",
......@@ -406,4 +407,4 @@
"You_will_not_be_able_to_recover" : "Você não será capaz de desfazer!",
"Your_entry_has_been_deleted" : "Sua mensagem foi excluída.",
"Your_Open_Source_solution" : "Sua própria solução Open Source"
}
\ No newline at end of file
}
......@@ -37,6 +37,7 @@ RocketChat.settings.add 'Accounts_OAuth_Twitter_secret', '', { type: 'string', g
RocketChat.settings.add 'Accounts_AllowUsernameChange', true, { type: 'boolean', group: 'Accounts', section: 'General', public: true }
RocketChat.settings.add 'Accounts_AllowPasswordChange', true, { type: 'boolean', group: 'Accounts', section: 'General', public: true }
RocketChat.settings.add 'Accounts_RequireNameForSignUp', true, { type: 'boolean', group: 'Accounts', section: 'General', public: true }
RocketChat.settings.addGroup 'FileUpload'
RocketChat.settings.add 'FileUpload_Enabled', true, { type: 'boolean', group: 'FileUpload', public: true }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment