Files
the-example-app-nodejs/views/settings.pug
Khaled Garbaya af575f37f5 Production build (#75)
* Production (#44)

* test: Fix integration test

* fix: Fix Editorial feature

* chore(localization): move locales to i18n folder

* feat(modules): add image caption and shadow

* fix: clarify German translation🇩🇪

* chore(localization): fix typo (#47)

* Split first paragraph into sections (#46)

* feat(controls): add help text to API dropdown

* fix(style): simplify header and fix mobile design

* fix(style): simplify footer and fix mobile design

* fix(style): update stylesheet and scripts file

* test(e2e): adjust tests and make them fail on CI

* language fixes

* rename labels to use full api name

* Refactor entry state toggle (#48)

* chore(editorialFeatures): extract editorial features toggle

* chore(refactor): rename function to make more contextual sense

* Fix breadcrumb and add test for locales (#49)

* test(unit): add test to check for locale consistency

* fix(breadcrumb): translate lessons route

* Change readme url to http from https (#52)

* tests(e2e): expect only 2 courses

* fix(cookies): fix variable naming and extend to two days maxAge

* Change text on next lesson button (#54)

* Retranslate advancedLabel

* fix(translations): do not break on vim temp files. This is dedicated to JP

* fix(analytics): use correct app-id

* Add instructions to seed a space to readme (#61)

* Change modal text; add link to model's repo to localization files (#57)

* fix(links): link correct GH repository

* fix(i18n): adjust view on github link label

* fix(style): move GitHub link to the left

* new screenshot

* Update README.md (#63)

* Update README.md

* Update README.md

* Https mistake and Heroku buton

* fixup

* fixup

* feat(heroku): add app.json

* docs(README): add linebreak

* docs(README): minor adjustments

* fix(tracking): add link click tracking to snowplow

* Add translation for edit in the web app (#64)

* chore(typo): fix error message (#67)

* chore(update): remove image rendering on lessons (#65)

* chore: Improve error page (#66)

* chore: Improve error page

* fix: Fix middlware order

* fix: Remove console.log

* fix:  no more duplicate error messges (#71)

* fix: Fix middlware order

* fix: Remove console.log

* feat: Uniq error meassages

* fix: fix cli link (#72)

* Add instructions to run app as Docker container (#68)

* feat: Minor fixes (#73)

* feat: Address JPs Feedback

* fix: settings config

* fix: fix tests

* fix: fix error display

* Fix Cookie Max Age (#74)
2017-12-01 14:20:10 +01:00

74 lines
3.4 KiB
Plaintext

extends layout
include mixins/_breadcrumb
mixin renderErrors (errors)
each message in errors
.form-item__error-wrapper
svg.form-item__error-icon
use(xlink:href='/icons/icons.svg#error')
.form-item__error-message= message
block content
.layout-centered-small
+breadcrumb
h1= title
p #{translate('settingsIntroLabel', currentLocale.code)}
if success
.status-block.status-block--success
svg.status-block__icon.status-block__icon--success
use(xlink:href='/icons/icons.svg#success')
.status-block__content
.status-block__title #{translate('changesSavedLabel', currentLocale.code)}
if hasErrors
.status-block.status-block--error
svg.status-block__icon.status-block__icon--error
use(xlink:href='/icons/icons.svg#error')
.status-block__content
.status-block__title #{translate('errorOcurredTitleLabel', currentLocale.code)}
.status-block__message #{translate('errorOcurredMessageLabel', currentLocale.code)}
if space && !hasErrors
.status-block.status-block--info
svg.status-block__icon.status-block__icon--info
use(xlink:href='/icons/icons.svg#info')
.status-block__content
.status-block__message #{translate('connectedToSpaceLabel', currentLocale.code)} “#{space.name}”
form(action=`/settings` method="POST" class="form")
.form-item
input(type="hidden" name="qs" value=queryString)
label(for="input-space-id") #{translate('spaceIdLabel', currentLocale.code)}
input(type="text" name="spaceId" id="input-space-id" value=settings.spaceId)
if 'spaceId' in errors
+renderErrors(errors.spaceId)
.form-item__help-text #{translate('spaceIdHelpText', currentLocale.code)}
.form-item
label(for="input-delivery-token") Content Delivery API - #{translate('accessTokenLabel', currentLocale.code)}
input(type="text" name="deliveryToken" id="input-delivery-token" value=settings.deliveryToken)
if 'deliveryToken' in errors
+renderErrors(errors.deliveryToken)
.form-item__help-text
| #{translate('contentDeliveryApiHelpText', currentLocale.code)} 
a(href='https://www.contentful.com/developers/docs/references/content-delivery-api/' target='_blank' rel='noopener') Content Delivery API.
.form-item
label(for="input-preview-token") Content Preview API - #{translate('accessTokenLabel', currentLocale.code)}
input(type="text" name="previewToken" id="input-preview-token" value=settings.previewToken)
if 'previewToken' in errors
+renderErrors(errors.previewToken)
.form-item__help-text
| #{translate('contentPreviewApiHelpText', currentLocale.code)} 
a(href='https://www.contentful.com/developers/docs/references/content-preview-api/' target='_blank' rel='noopener') Content Preview API.
.form-item
input(type="checkbox" name="editorialFeatures" id="input-editorial-features" checked=settings.editorialFeatures)
label(for="input-editorial-features") #{translate('enableEditorialFeaturesLabel', currentLocale.code)}
.form-item__help-text #{translate('enableEditorialFeaturesHelpText', currentLocale.code)}
.form-item
input.cta(type="submit" value=translate('saveSettingsButtonLabel', currentLocale.code))