Skip to content
Snippets Groups Projects
Commit 2c6d7e4b authored by Marcelo Schmidt's avatar Marcelo Schmidt
Browse files

Merge pull request #1310 from blaskovicz/feat/settings/easier-descriptions

Feat/settings/easier descriptions
parents 44095d18 a63d9ac0
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,7 @@
{{else}}
{{#with group}}
<div class="info">
<h3>{{description}}</h3>
<p class="settings-description">{{description}}</p>
</div>
{{/with}}
<div class="rocket-form">
......@@ -33,56 +33,33 @@
{{/if}}
{{/if}}
{{#each settings}}
{{#if $eq type 'string'}}
<div class="input-line double-col">
<label>{{label}}</label>
<div>
{{#if $eq type 'string'}}
{{#if multiline}}
<textarea name="{{_id}}" rows="4" style="height: auto">{{value}}</textarea>
{{else}}
<input type="text" name="{{_id}}" value="{{value}}" />
{{/if}}
{{#if description}}
<small>{{description}}</small>
{{/if}}
</div>
</div>
{{/if}}
{{#if $eq type 'int'}}
<div class="input-line double-col">
<label>{{label}}</label>
<div>
<input type="number" name="{{_id}}" value="{{value}}" />
{{#if description}}
<small>{{description}}</small>
{{/if}}
</div>
</div>
{{/if}}
{{#if $eq type 'boolean'}}
<div class="input-line double-col">
<label>{{label}}</label>
<div>
<label><input type="radio" name="{{_id}}" value="1" checked="{{$eq value true}}" /> {{_ "True"}}</label>
<label><input type="radio" name="{{_id}}" value="0" checked="{{$eq value false}}" /> {{_ "False"}}</label>
{{#if description}}
<br /><small>{{description}}</small>
{{/if}}
</div>
</div>
{{/if}}
{{#if $eq type 'color'}}
<div class="input-line double-col">
<label>{{label}}</label>
<div>
<input type="text" class="minicolors" name="{{_id}}" value="{{value}}" />
{{#if description}}
<small>{{description}}</small>
{{/if}}
{{/if}}
{{#if description}}
<div>
<small class="settings-description">{{description}}</small>
</div>
{{/if}}
</div>
</div>
{{/if}}
{{/each}}
{{#if section}}
......
......@@ -170,7 +170,7 @@
"Layout_Sidenav_Footer_description" : "Die Footer Größe ist 260x70",
"Layout_Terms_of_Service" : "Nutzungsbedingungen",
"LDAP" : "LDAP",
"LDAP_Dn" : "LDAP DN",
"LDAP_DN" : "LDAP DN",
"LDAP_Port" : "LDAP Port",
"LDAP_Url" : "LDAP URL",
"Leave_room" : "Raum verlassen",
......
......@@ -111,7 +111,7 @@
"Last_message" : "Τελευταίο μήνυμα",
"Layout_Home_Body" : "Αρχική Σώμα",
"Layout_Home_Title" : "Αρχική Τίτλος",
"LDAP_Dn" : "LDAP DN",
"LDAP_DN" : "LDAP DN",
"LDAP_Port" : "LDAP Θύρα",
"LDAP_Url" : "LDAP URL",
"Leave_room" : "Έξοδος από το δωμάτιο",
......
......@@ -187,13 +187,21 @@
"Layout_Sidenav_Footer_description" : "Footer size is 260 x 70px",
"Layout_Terms_of_Service" : "Terms of Service",
"LDAP" : "LDAP",
"LDAP_Description": "LDAP is a heirarchical database that many companies use to provide single sign on - a facility for sharing one password between multiple sites and services. For advanced configuration information and examples, please consult our twiki: https://github.com/RocketChat/Rocket.Chat/wiki/LDAP-Authentication.",
"LDAP_Bind_Search" : "Bind Search",
"LDAP_Dn" : "Distinguished Name (DN)",
"LDAP_Bind_Search_Description": "A piece of JSON that governs bind and connection info and is of the form {\"filter\": \"(&(objectCategory=person)(objectclass=user)(memberOf=CN=ROCKET_ACCESS,CN=Users,DC=domain,DC=com)(sAMAccountName=#{username}))\", \"scope\": \"sub\", \"userDN\": \"rocket.service@domain.com\", \"password\": \"urpass\"}",
"LDAP_DN" : "Distinguished Name (DN)",
"LDAP_DN_Description": "Search root; example: dc=domain,dc=com",
"LDAP_Enable" : "Enable LDAP",
"LDAP_Enable_Description": "Attempt to utilize ldap for authentication.",
"LDAP_Port" : "LDAP Port",
"LDAP_Sync_User_Data" : "Keep user data in sync with server",
"LDAP_Port_Description": "Port to access LDAP on; eg: 389",
"LDAP_Sync_User_Data" : "Sync Data",
"LDAP_Sync_User_Data_Description" : "Keep user data in sync with server on login (eg: name, email).",
"LDAP_Sync_User_Data_FieldMap" : "User data field map",
"LDAP_Sync_User_Data_FieldMap_Description" : "Allows configuring how to populate user account fields (like email) from a record in ldap (once found). As an example, {\"cn\":\"name\", \"mail\":\"email\"} will choose a persion's human readable name from the cn attribute, and their email from the mail attribute. Available fields include name, and email.",
"LDAP_Url" : "LDAP URL",
"LDAP_Url_Description": "Uri of the ldap server; example: ldap://company.dns.com",
"Leave_room" : "Leave room",
"line" : "line",
"Load_more" : "Load more",
......
......@@ -156,7 +156,7 @@
"Layout_Sidenav_Footer_description" : "Alatunnisteen koko on 260x70",
"Layout_Terms_of_Service" : "Käyttöehdot",
"LDAP" : "LDAP",
"LDAP_Dn" : "LDAP DN",
"LDAP_DN" : "LDAP DN",
"LDAP_Port" : "LDAP portti",
"LDAP_Url" : "LDAP URL",
"Leave_room" : "Poistu kanavalta",
......
......@@ -160,7 +160,7 @@
"Layout_Sidenav_Footer_description" : "La taille du pied de page est 260x70",
"Layout_Terms_of_Service" : "Conditions de service",
"LDAP" : "LDAP",
"LDAP_Dn" : "DN LDAP",
"LDAP_DN" : "DN LDAP",
"LDAP_Port" : "Port LDAP",
"LDAP_Url" : "Adresse LDAP",
"Leave_room" : "Quitter le salon",
......
......@@ -168,7 +168,7 @@
"Layout_Sidenav_Footer_description" : "​ទំហំ​បាន​គឺ 260x70",
"Layout_Terms_of_Service" : "ល័ក្ខខ័ណ្ឌ​នៃ​សេវាកម្ម",
"LDAP" : "ប្រើ LDAP",
"LDAP_Dn" : " LDAP DN",
"LDAP_DN" : " LDAP DN",
"LDAP_Port" : "ច្រក LDAP",
"LDAP_Url" : "URL របស់ LDAP",
"Leave_room" : "ចេញ​ពីបន្ទប់",
......
......@@ -153,7 +153,7 @@
"Layout_Sidenav_Footer_description" : "바닥글 크기는 260x70입니다.",
"Layout_Terms_of_Service" : "이용약관",
"LDAP" : "LDAP",
"LDAP_Dn" : "LDAP DN",
"LDAP_DN" : "LDAP DN",
"LDAP_Port" : "LDAP 포트",
"LDAP_Url" : "LDAP URL",
"Leave_room" : "방 나가기",
......
......@@ -147,7 +147,7 @@
"Layout_Sidenav_Footer_description" : "Saiz footer ialah 260x70",
"Layout_Terms_of_Service" : "Terma Perkhidmatan",
"LDAP" : "LDAP",
"LDAP_Dn" : "LDAP DN",
"LDAP_DN" : "LDAP DN",
"LDAP_Port" : "Port LDAP",
"LDAP_Url" : "URL LDAP",
"Leave_room" : "Meninggalkan bilik",
......
......@@ -106,7 +106,7 @@
"Last_message" : "Ostatnia wiadomość",
"Layout_Home_Body" : "Treść strony głównej",
"Layout_Home_Title" : "Tytuł strony głównej",
"LDAP_Dn" : "LDAP DN",
"LDAP_DN" : "LDAP DN",
"LDAP_Port" : "Port LDAP",
"LDAP_Url" : "Adres URL LDAP",
"Leave_room" : "Opuść pokój",
......
......@@ -169,7 +169,7 @@
"Layout_Sidenav_Footer_description" : "Tamanho do rodapé é 260x70",
"Layout_Terms_of_Service" : "Termos de Serviço",
"LDAP" : "LDAP",
"LDAP_Dn" : "DN LDAP",
"LDAP_DN" : "DN LDAP",
"LDAP_Port" : "Porta LDAP",
"LDAP_Sync_User_Data" : "Manter dados dos usuários sincronizados",
"LDAP_Sync_User_Data_FieldMap" : "Mapeamento de campos do usuário",
......
......@@ -83,7 +83,7 @@
"Language" : "Язык",
"Language_Version" : "Русская версия",
"Last_message" : "Последнее сообщение",
"LDAP_Dn" : "LDAP домен",
"LDAP_DN" : "LDAP домен",
"LDAP_Port" : "LDAP Порт",
"LDAP_Url" : "URL-адрес LDAP",
"Leave_room" : "Покинуть чат",
......
......@@ -121,7 +121,7 @@
"Layout_Sidenav_Footer" : "侧面导航页脚",
"Layout_Terms_of_Service" : "服务条款",
"LDAP" : "LDAP",
"LDAP_Dn" : "LDAP DN",
"LDAP_DN" : "LDAP DN",
"LDAP_Port" : "LDAP端口",
"LDAP_Url" : "LDAP URL",
"Leave_room" : "离开聊天室",
......
......@@ -5,7 +5,7 @@ Meteor.startup ->
RocketChat.settings.add 'LDAP_Enable', false, { type: 'boolean', group: 'LDAP', public: true }
RocketChat.settings.add 'LDAP_Url', 'ldap://', { type: 'string' , group: 'LDAP' }
RocketChat.settings.add 'LDAP_Port', '389', { type: 'string' , group: 'LDAP' }
RocketChat.settings.add 'LDAP_DN', '', { type: 'string' , group: 'LDAP', i18nLabel: 'LDAP_Dn', public: true }
RocketChat.settings.add 'LDAP_DN', '', { type: 'string' , group: 'LDAP', public: true }
RocketChat.settings.add 'LDAP_Bind_Search', '', { type: 'string' , group: 'LDAP' }
RocketChat.settings.add 'LDAP_Sync_User_Data', false, { type: 'boolean' , group: 'LDAP' }
RocketChat.settings.add 'LDAP_Sync_User_Data_FieldMap', '{"cn":"name", "mail":"email"}', { type: 'string' , group: 'LDAP' }
......
......@@ -18,7 +18,12 @@ RocketChat.settings.add = (_id, value, options = {}) ->
updateSettings =
i18nLabel: options.i18nLabel or _id
updateSettings.i18nDescription = options.i18nDescription if options.i18nDescription?
# default description i18n key will be the setting name + "_Description"
# (eg: LDAP_Enable -> LDAP_Enable_Description)
updateSettings.i18nDescription = if options.i18nDescription?
options.i18nDescription
else
"#{_id}_Description"
updateSettings.type = options.type if options.type
updateSettings.multiline = options.multiline if options.multiline
updateSettings.group = options.group if options.group
......@@ -49,7 +54,10 @@ RocketChat.settings.addGroup = (_id, options = {}) ->
type: 'group'
i18nLabel: options.i18nLabel or _id
updateSettings.i18nDescription = options.i18nDescription if options.i18nDescription?
updateSettings.i18nDescription = if options.i18nDescription?
options.i18nDescription
else
"#{_id}_Description"
upsertChanges = { $set: updateSettings }
if options.persistent is true
......
......@@ -20,6 +20,12 @@
-ms-user-select: none;
user-select: none;
}
.allow-text-selection {
-webkit-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
}
:focus {
outline: 0 !important;
......@@ -1706,6 +1712,9 @@ a.github-fork {
}
.page-settings {
.settings-description {
.allow-text-selection;
}
.rocket-form {
max-width: none;
width: 100%;
......
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