mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 09:59:47 -05:00
The last Yes/No pair in the pane. Like the four in All Boards: Hide above it, the setting is on or off, so it is one checkbox in the Admin Panel's own style - square when off, green tick when on, animated between - and the Logo section's Save writes the tick, skipping it when the checkbox is not on screen. Visibility has no radio pairs left. Thanks to xet7 !
461 lines
20 KiB
Plaintext
461 lines
20 KiB
Plaintext
template(name="setting")
|
|
.setting-content
|
|
//- Multitenancy option D (docs/Design/Multitenancy/Multitenancy.md, D.9): an
|
|
//- Organization's own admin opens this page for ONE pane - Visibility, and in it
|
|
//- only "Change color", the site theme of their Organization. Everything else
|
|
//- here is instance-wide and stays site-admin only, pane by pane and group by
|
|
//- group.
|
|
unless currentUser.isAdminOrOrgAdmin
|
|
| {{_ 'error-notAuthorized'}}
|
|
else
|
|
//- No page-title bar here. The Admin Panel top bar already says which section
|
|
//- you are in, and the left menu highlights which pane is open, so a third
|
|
//- line repeating the pane name only cost vertical space. Admin Panel /
|
|
//- Problems has never had one.
|
|
.content-body
|
|
+leftMenu(menuItems)
|
|
.main-body
|
|
//- Every Admin Panel pane opens with the same heading, and it is the
|
|
//- open menu entry's own label (docs/Design/Page/Left-Menu.md).
|
|
+paneTitle(paneTitleData)
|
|
if isLoading
|
|
+spinner
|
|
else if isVersionSetting
|
|
//- The version, database and system information. Its template lives in
|
|
//- informationBody.jade, with the code that loads the statistics; Blaze
|
|
//- templates are global, so the pane renders here.
|
|
+statistics
|
|
else if isTableVisibilityModeSetting
|
|
+tableVisibilityModeSettings
|
|
else if isAnnouncementSetting
|
|
+announcementSettings
|
|
else if isAccessibilitySetting
|
|
+accessibilitySettings
|
|
else if isTranslationSetting
|
|
+translationSettings
|
|
else if isLayoutSetting
|
|
+pwaSettings
|
|
else if isWebhookSetting
|
|
+webhookSettings
|
|
|
|
template(name="webhookSettings")
|
|
span
|
|
+outgoingWebhooksPopup
|
|
|
|
//- The Login pane. Admin Panel / PEOPLE renders this now (peopleBody.jade); it is
|
|
//- defined here, with the other admin settings panes, because Blaze templates are
|
|
//- global and its handlers sit beside the other settings handlers in settingBody.js.
|
|
template(name="general")
|
|
ul#registration-setting.setting-detail
|
|
li
|
|
h2.admin-pane-group-title {{_ 'login-allow'}}
|
|
//- Every row in this group is a checkbox that is TICKED when the thing is
|
|
//- allowed, under a title that says "Allow" once. Two of them are stored the
|
|
//- other way round - `disableForgotPassword` and `disableRegistration` are
|
|
//- "disable" flags - so the markup asks `unless`. Only the display is inverted;
|
|
//- the stored fields and their handlers are unchanged.
|
|
li
|
|
a.flex.js-toggle-forgot-password
|
|
.materialCheckBox(class="{{#unless currentSetting.disableForgotPassword}}is-checked{{/unless}}")
|
|
|
|
span {{_ 'forgot-password'}}
|
|
li
|
|
a.flex.js-toggle-registration
|
|
.materialCheckBox(class="{{#unless currentSetting.disableRegistration}}is-checked{{/unless}}")
|
|
|
|
span {{_ 'self-registration'}}
|
|
li
|
|
a.flex.js-toggle-username-change
|
|
.materialCheckBox(class="{{#if allowUserNameChange}}is-checked{{/if}}")
|
|
|
|
span {{_ 'accounts-allowUserNameChange'}}
|
|
li
|
|
a.flex.js-toggle-user-delete
|
|
.materialCheckBox(class="{{#if allowUserDelete}}is-checked{{/if}}")
|
|
|
|
span {{_ 'accounts-allowUserDelete'}}
|
|
li
|
|
a.flex.js-toggle-display-authentication-method
|
|
.materialCheckBox(class="{{#if currentSetting.displayAuthenticationMethod}}is-checked{{/if}}")
|
|
|
|
span {{_ 'display-authentication-method'}}
|
|
|
|
li.admin-pane-group-separator
|
|
hr
|
|
li
|
|
.invite-people(class="{{#if currentSetting.disableRegistration}}{{else}}hide{{/if}}")
|
|
ul
|
|
li
|
|
.title {{_ 'invite-people'}}
|
|
textarea#email-to-invite.wekan-form-control(rows='5', placeholder="{{_ 'email-addresses'}}")
|
|
li
|
|
.title {{_ 'to-boards'}}
|
|
.bg-white
|
|
each boards
|
|
a.option.flex.js-toggle-board-choose(id= _id)
|
|
.materialCheckBox(data-id= _id)
|
|
|
|
span= title
|
|
|
|
li
|
|
button.js-email-invite.primary {{_ 'invite'}}
|
|
li.accounts-form
|
|
.title {{_ 'default-authentication-method'}}
|
|
+selectAuthenticationMethod(authenticationMethod=currentSetting.defaultAuthenticationMethod)
|
|
li.accounts-form
|
|
.title {{_ 'oidc-button-text'}}
|
|
.form-group
|
|
input.wekan-form-control#oidcBtnTextvalue(type="text", placeholder="" value="{{currentSetting.oidcBtnText}}")
|
|
button.js-account-access-save.primary {{_ 'save'}}
|
|
|
|
//- The E-mail pane. Rendered by Admin Panel / People too - see the note above.
|
|
template(name='email')
|
|
ul#email-setting.setting-detail
|
|
//if isSandstorm
|
|
//
|
|
li.smtp-form
|
|
//
|
|
.title {{_ 'smtp-host'}}
|
|
//
|
|
.description {{_ 'smtp-host-description'}}
|
|
//
|
|
.form-group
|
|
//
|
|
input.wekan-form-control#mail-server-host(type="text", placeholder="smtp.domain.com" value="{{currentSetting.mailServer.host}}")
|
|
//
|
|
li.smtp-form
|
|
//
|
|
.title {{_ 'smtp-port'}}
|
|
//
|
|
.description {{_ 'smtp-port-description'}}
|
|
//
|
|
.form-group
|
|
//
|
|
input.wekan-form-control#mail-server-port(type="text", placeholder="25" value="{{currentSetting.mailServer.port}}")
|
|
//
|
|
li.smtp-form
|
|
//
|
|
.title {{_ 'smtp-username'}}
|
|
//
|
|
.form-group
|
|
//
|
|
input.wekan-form-control#mail-server-username(type="text", placeholder="{{_ 'username'}}" value="{{currentSetting.mailServer.username}}")
|
|
//
|
|
li.smtp-form
|
|
//
|
|
.title {{_ 'smtp-password'}}
|
|
//
|
|
.form-group
|
|
//
|
|
input.wekan-form-control#mail-server-password(type="password", placeholder="{{_ 'password'}}" value="")
|
|
//
|
|
li.smtp-form
|
|
//
|
|
.title {{_ 'smtp-tls'}}
|
|
//
|
|
.form-group
|
|
//
|
|
a.flex.js-toggle-tls
|
|
//
|
|
.materialCheckBox#mail-server-tls(class="{{#if currentSetting.mailServer.enableTLS}}is-checked{{/if}}")
|
|
//
|
|
//
|
|
span {{_ 'smtp-tls-description'}}
|
|
//
|
|
//
|
|
li.smtp-form
|
|
//
|
|
.title {{_ 'send-from'}}
|
|
//
|
|
.form-group
|
|
//
|
|
input.wekan-form-control#mail-server-from(type="email", placeholder="no-reply@domain.com" value="{{currentSetting.mailServer.from}}")
|
|
//
|
|
//
|
|
li
|
|
//
|
|
li.smtp-form
|
|
//- Not "Email domain name": the field decides who may INVITE. A non-admin
|
|
//- whose address ends with this domain can send board invitations, and only
|
|
//- while self-registration is disabled - see isNonAdminAllowedToSendMail()
|
|
//- in server/models/settings.js. It restricts nothing about signing in.
|
|
.title {{_ 'email-domain-allowed-to-invite'}}
|
|
.form-group
|
|
input.wekan-form-control#mailDomainNamevalue(type="text", placeholder="" value="{{currentSetting.mailDomainName}}")
|
|
li.accounts-form
|
|
//- One checkbox, not a Yes/No pair: the setting is on or off, and this is the
|
|
//- checkbox the rest of the Admin Panel uses (Announcement's "Active
|
|
//- System-Wide Announcement" is the same markup). Ticked = e-mail changes are
|
|
//- allowed. The Save button below writes it, as it did the radios.
|
|
a.flex.js-toggle-allow-email-change
|
|
.materialCheckBox#accounts-allowEmailChange(class="{{#if allowEmailChange}}is-checked{{/if}}")
|
|
span {{_ 'accounts-allowEmailChange'}}
|
|
li
|
|
//- One Save, BELOW both settings it writes - the invite domain above and the
|
|
//- Yes/No beside it. It used to sit inside the Yes/No row, where it read as
|
|
//- part of that one radio pair.
|
|
button.js-save.primary {{_ 'save'}}
|
|
|
|
li
|
|
button.js-send-smtp-test-email.primary {{_ 'send-smtp-test'}}
|
|
|
|
//- Admin Panel / Settings / Visibility, in four named groups: what All Boards
|
|
//- shows, the URLs, the product name and the logos. The groups are what makes a
|
|
//- long single list readable - the settings themselves are unchanged, and so are
|
|
//- their ids, so the one Save button at the bottom still reads every field it did
|
|
//- before (it looks them up by id, not by position).
|
|
//-
|
|
//- A group title is smaller than the pane title above it (.admin-pane-group-title
|
|
//- vs .admin-pane-title, settingBody.css), so the page reads as one heading with
|
|
//- groups under it rather than as several pages.
|
|
template(name='tableVisibilityModeSettings')
|
|
ul#tableVisibilityMode-setting.setting-detail
|
|
//- Every group here writes the INSTANCE settings, so it is site-admin only.
|
|
//- The one exception is "Change color" below, which an Organization's own
|
|
//- admin sets for their Organization (models/lib/tenantAdmin.js themeTarget).
|
|
if isSiteAdmin
|
|
li
|
|
h2.admin-pane-group-title {{_ 'all-boards-hide'}}
|
|
//- One checkbox per setting instead of a Yes/No pair: each of these is on or
|
|
//- off, and the group's own title already says what ticking one means (All
|
|
//- Boards: Hide …). Same checkbox as everywhere else in the Admin Panel -
|
|
//- Announcement's "Active System-Wide Announcement" - so it has the plain
|
|
//- square when off, the green tick when on, and the animation between.
|
|
//- The Save button below reads the ticks, as it read the radios.
|
|
li.tableVisibilityMode-form
|
|
//- "Public boards", under the "All Boards: Hide" title above: ticked hides
|
|
//- them, which is what allowPrivateOnly does. The setting's own key keeps its
|
|
//- sentence - boardBody.jade shows it as the message on a board you may not
|
|
//- open, where a two-word label would say nothing.
|
|
a.flex.js-toggle-all-boards-hide
|
|
.materialCheckBox#accounts-allowPrivateOnly(class="{{#if allowPrivateOnly}}is-checked{{/if}}")
|
|
span {{_ 'public-boards'}}
|
|
li.hideBoardActivities-form
|
|
a.flex.js-toggle-all-boards-hide
|
|
.materialCheckBox#hide-board-activities(class="{{#if currentSetting.hideBoardActivitiesOnAllBoards}}is-checked{{/if}}")
|
|
span {{_ 'board-activities'}}
|
|
li.tableVisibilityMode-form
|
|
a.flex.js-toggle-all-boards-hide
|
|
.materialCheckBox#hide-card-counter-list(class="{{#if currentSetting.hideCardCounterList}}is-checked{{/if}}")
|
|
span {{_ 'card-counter-list'}}
|
|
li.tableVisibilityMode-form
|
|
a.flex.js-toggle-all-boards-hide
|
|
.materialCheckBox#hide-board-member-list(class="{{#if currentSetting.hideBoardMemberList}}is-checked{{/if}}")
|
|
span {{_ 'board-member-list'}}
|
|
li.tableVisibilityMode-form
|
|
.title {{_ 'wait-spinner'}}
|
|
+selectSpinnerName(spinnerName=currentSetting.spinnerName)
|
|
li
|
|
//- One Save per section, at its end, above the rule that closes it. It writes
|
|
//- this section's fields and nothing else, so saving one group can never
|
|
//- overwrite what you were editing in another.
|
|
button.js-visibility-all-boards-save.primary {{_ 'save'}}
|
|
|
|
li.admin-pane-group-separator
|
|
hr
|
|
li
|
|
h2.admin-pane-group-title {{_ 'settings-group-url'}}
|
|
li
|
|
a(href="/support" style="text-decoration: underline; color: blue;") {{_ 'support'}}
|
|
li
|
|
a.flex.js-toggle-support
|
|
.materialCheckBox(class="{{#if currentSetting.supportPageEnabled}}is-checked{{/if}}")
|
|
|
|
span {{_ 'support-page-enabled'}}
|
|
li
|
|
.support-content(class="{{#if currentSetting.supportPageEnabled}}{{else}}hide{{/if}}")
|
|
ul
|
|
li
|
|
a.flex.js-toggle-support-public
|
|
.materialCheckBox(class="{{#if currentSetting.supportPagePublic}}is-checked{{/if}}")
|
|
|
|
span {{_ 'public'}}
|
|
li
|
|
.title {{_ 'support-title'}}
|
|
textarea#support-title.wekan-form-control= currentSetting.supportTitle
|
|
li
|
|
.title {{_ 'support-content'}}
|
|
textarea#support-page-text.wekan-form-control= currentSetting.supportPageText
|
|
li.tableVisibilityMode-form
|
|
.title {{_ 'custom-help-link-url'}}
|
|
.form-group
|
|
input.wekan-form-control#custom-help-link-url(type="text", placeholder="" value="{{currentSetting.customHelpLinkUrl}}")
|
|
li.tableVisibilityMode-form
|
|
.title {{_ 'custom-legal-notice-link-url'}}
|
|
.form-group
|
|
input.wekan-form-control#legalNoticevalue(type="text", placeholder="" value="{{currentSetting.legalNotice}}")
|
|
li.tableVisibilityMode-form
|
|
.title {{_ 'automatic-linked-url-schemes'}}
|
|
.form-group
|
|
textarea#automatic-linked-url-schemes.wekan-form-control= currentSetting.automaticLinkedUrlSchemes
|
|
li
|
|
button.js-visibility-url-save.primary {{_ 'save'}}
|
|
|
|
li.admin-pane-group-separator
|
|
hr
|
|
li
|
|
//- The group title IS the field's label here: the group holds one field, so a
|
|
//- title above a label that says the same thing said it twice. The group title
|
|
//- keeps its size and takes the field's existing translation.
|
|
h2.admin-pane-group-title {{_ 'custom-product-name'}}
|
|
li.tableVisibilityMode-form
|
|
.form-group
|
|
input.wekan-form-control#product-name(type="text", placeholder="" value="{{currentSetting.productName}}")
|
|
li
|
|
button.js-visibility-product-name-save.primary {{_ 'save'}}
|
|
|
|
//- The site theme. Same picker as the per-user "Change color", one layer
|
|
//- below it: whoever has not chosen a theme of their own sees this one
|
|
//- (docs/Theme/Theme.md). It applies immediately - the picker has no Save
|
|
//- button, like the per-user one.
|
|
if isSiteAdmin
|
|
li.admin-pane-group-separator
|
|
hr
|
|
li
|
|
h2.admin-pane-group-title {{_ 'change-color'}}
|
|
//- The site admin's colour is the one every Organization that has not set
|
|
//- its own inherits, so their pane says so; an Organization's own admin is
|
|
//- setting only their own and needs no such line.
|
|
if isSiteAdmin
|
|
h3.admin-pane-subgroup-title {{_ 'theme-override-all-tenants'}}
|
|
li.tableVisibilityMode-form
|
|
+themeColorPicker(scope="admin")
|
|
|
|
if isSiteAdmin
|
|
li.admin-pane-group-separator
|
|
hr
|
|
li
|
|
h2.admin-pane-group-title {{_ 'settings-group-logo'}}
|
|
li.tableVisibilityMode-form
|
|
//- One checkbox, like the All Boards group above and like Announcement's
|
|
//- "Active System-Wide Announcement": ticked = the logo is hidden. The
|
|
//- group's Save below writes it, as it wrote the Yes/No pair.
|
|
a.flex.js-toggle-hide-logo
|
|
.materialCheckBox#hide-logo(class="{{#if currentSetting.hideLogo}}is-checked{{/if}}")
|
|
span {{_ 'hide-logo'}}
|
|
li.tableVisibilityMode-form
|
|
.title {{_ 'custom-login-logo-image-url'}}
|
|
.form-group
|
|
input.wekan-form-control#custom-login-logo-image-url(type="text", placeholder="" value="{{currentSetting.customLoginLogoImageUrl}}")
|
|
li.tableVisibilityMode-form
|
|
.title {{_ 'custom-login-logo-link-url'}}
|
|
.form-group
|
|
input.wekan-form-control#custom-login-logo-link-url(type="text", placeholder="" value="{{currentSetting.customLoginLogoLinkUrl}}")
|
|
li.tableVisibilityMode-form
|
|
.title {{_ 'text-below-custom-login-logo'}}
|
|
.form-group
|
|
textarea#text-below-custom-login-logo.wekan-form-control= currentSetting.textBelowCustomLoginLogo
|
|
li.tableVisibilityMode-form
|
|
.title {{_ 'custom-top-left-corner-logo-image-url'}}
|
|
.form-group
|
|
input.wekan-form-control#custom-top-left-corner-logo-image-url(type="text", placeholder="" value="{{currentSetting.customTopLeftCornerLogoImageUrl}}")
|
|
li.tableVisibilityMode-form
|
|
.title {{_ 'custom-top-left-corner-logo-link-url'}}
|
|
.form-group
|
|
input.wekan-form-control#custom-top-left-corner-logo-link-url(type="text", placeholder="" value="{{currentSetting.customTopLeftCornerLogoLinkUrl}}")
|
|
li.tableVisibilityMode-form
|
|
.title {{_ 'custom-top-left-corner-logo-height'}}
|
|
.form-group
|
|
input.wekan-form-control#custom-top-left-corner-logo-height(type="text", placeholder="" value="{{currentSetting.customTopLeftCornerLogoHeight}}")
|
|
li
|
|
button.js-visibility-logo-save.primary {{_ 'save'}}
|
|
|
|
template(name='announcementSettings')
|
|
ul#announcement-setting.setting-detail
|
|
li
|
|
a.flex.js-toggle-activemessage
|
|
.materialCheckBox(class="{{#if currentAnnouncements.enabled}}is-checked{{/if}}")
|
|
|
|
span {{_ 'admin-announcement-active'}}
|
|
li
|
|
.admin-announcement(class="{{#if currentAnnouncements.enabled}}{{else}}hide{{/if}}")
|
|
ul
|
|
li
|
|
.title {{_ 'admin-announcement-title'}}
|
|
textarea#admin-announcement.wekan-form-control= currentAnnouncements.body
|
|
li
|
|
button.js-announcement-save.primary {{_ 'save'}}
|
|
|
|
template(name='accessibilitySettings')
|
|
ul#accessibility-setting.setting-detail
|
|
li
|
|
a(href="/accessibility" style="text-decoration: underline; color: blue;") {{_ 'accessibility'}}
|
|
li
|
|
a.flex.js-toggle-accessibility
|
|
.materialCheckBox(class="{{#if currentAccessibility.enabled}}is-checked{{/if}}")
|
|
|
|
span {{_ 'accessibility-page-enabled'}}
|
|
li
|
|
.accessibility-content(class="{{#if currentAccessibility.enabled}}{{else}}hide{{/if}}")
|
|
ul
|
|
li
|
|
.title {{_ 'accessibility-title'}}
|
|
textarea#admin-accessibility-title.wekan-form-control= currentAccessibility.title
|
|
li
|
|
.title {{_ 'accessibility-content'}}
|
|
textarea#admin-accessibility-content.wekan-form-control= currentAccessibility.body
|
|
li
|
|
button.js-accessibility-save.primary {{_ 'save'}}
|
|
|
|
template(name='pwaSettings')
|
|
ul#layout-setting.setting-detail
|
|
li
|
|
a.flex.js-toggle-custom-head
|
|
.materialCheckBox(class="{{#if currentSetting.customHeadEnabled}}is-checked{{/if}}")
|
|
span {{_ 'custom-head-tags-enabled'}}
|
|
li
|
|
.custom-head-settings(class="{{#if currentSetting.customHeadEnabled}}{{else}}hide{{/if}}")
|
|
ul
|
|
li
|
|
.title {{_ 'custom-head-meta-tags'}}
|
|
textarea#custom-head-meta.wekan-form-control= customHeadMetaTagsValue
|
|
li
|
|
.title {{_ 'custom-head-link-tags'}}
|
|
textarea#custom-head-links.wekan-form-control= customHeadLinkTagsValue
|
|
li
|
|
a.flex.js-toggle-custom-manifest
|
|
.materialCheckBox(class="{{#if currentSetting.customManifestEnabled}}is-checked{{/if}}")
|
|
span {{_ 'custom-manifest-enabled'}}
|
|
li
|
|
.custom-manifest-settings(class="{{#if currentSetting.customManifestEnabled}}{{else}}hide{{/if}}")
|
|
.title {{_ 'custom-head-manifest-content'}}
|
|
textarea#custom-manifest-content.wekan-form-control= customManifestContentValue
|
|
li
|
|
button.js-custom-head-save.primary {{_ 'save'}}
|
|
li
|
|
a.flex.js-toggle-custom-assetlinks
|
|
.materialCheckBox(class="{{#if currentSetting.customAssetLinksEnabled}}is-checked{{/if}}")
|
|
span {{_ 'custom-assetlinks-enabled'}}
|
|
li
|
|
.custom-assetlinks-settings(class="{{#if currentSetting.customAssetLinksEnabled}}{{else}}hide{{/if}}")
|
|
ul
|
|
li
|
|
.title {{_ 'custom-assetlinks-content'}}
|
|
textarea#custom-assetlinks-content.wekan-form-control= customAssetLinksContentValue
|
|
li
|
|
button.js-custom-assetlinks-save.primary {{_ 'save'}}
|
|
template(name='selectAuthenticationMethod')
|
|
select#defaultAuthenticationMethod
|
|
each authentications
|
|
if isSelected value
|
|
option(value="{{value}}" selected) {{_ value}}
|
|
else
|
|
option(value="{{value}}") {{_ value}}
|
|
|
|
template(name='selectSpinnerName')
|
|
//- The dropdown and a live preview of the spinner it names, side by side. When
|
|
//- there is not enough room for both, the preview wraps BELOW the dropdown -
|
|
//- which is what flex-wrap does on its own, so no width is guessed here or in a
|
|
//- media query (settingBody.css .spinner-select-row).
|
|
.spinner-select-row
|
|
select#spinnerName
|
|
each spinner in spinners
|
|
if isSelected spinner
|
|
option(value="{{spinner}}" selected) {{_ spinner}}
|
|
else
|
|
option(value="{{spinner}}") {{_ spinner}}
|
|
.spinner-preview(title="{{_ 'preview'}}" aria-label="{{_ 'preview'}}")
|
|
//- Follows the DROPDOWN, not the saved setting: an admin sees what they are
|
|
//- about to save before pressing Save.
|
|
+Template.dynamic(template=previewTemplate)
|