Removed Custom HTML feature that does not work.

Thanks to xet7 !

Closes #2218
reviewable/pr2891/r1
Lauri Ojansivu 5 years ago
parent 60df1fa1ee
commit ddce0ada09
  1. 6
      client/components/settings/settingBody.jade
  2. 8
      client/components/settings/settingBody.js
  3. 8
      models/settings.js
  4. 32
      server/migrations.js

@ -184,12 +184,6 @@ template(name='layoutSettings')
.title {{_ 'custom-product-name'}}
.form-group
input.wekan-form-control#product-name(type="text", placeholder="" value="{{currentSetting.productName}}")
li.layout-form
.title {{_ 'add-custom-html-after-body-start'}}
textarea#customHTMLafterBodyStart.wekan-form-control= currentSetting.customHTMLafterBodyStart
li.layout-form
.title {{_ 'add-custom-html-before-body-end'}}
textarea#customHTMLbeforeBodyEnd.wekan-form-control= currentSetting.customHTMLbeforeBodyEnd
li
button.js-save-layout.primary {{_ 'save'}}

@ -171,20 +171,12 @@ BlazeComponent.extendComponent({
const displayAuthenticationMethod =
$('input[name=displayAuthenticationMethod]:checked').val() === 'true';
const defaultAuthenticationMethod = $('#defaultAuthenticationMethod').val();
const customHTMLafterBodyStart = $('#customHTMLafterBodyStart')
.val()
.trim();
const customHTMLbeforeBodyEnd = $('#customHTMLbeforeBodyEnd')
.val()
.trim();
try {
Settings.update(Settings.findOne()._id, {
$set: {
productName,
hideLogo: hideLogoChange,
customHTMLafterBodyStart,
customHTMLbeforeBodyEnd,
displayAuthenticationMethod,
defaultAuthenticationMethod,
},

@ -33,14 +33,6 @@ Settings.attachSchema(
type: String,
optional: true,
},
customHTMLafterBodyStart: {
type: String,
optional: true,
},
customHTMLbeforeBodyEnd: {
type: String,
optional: true,
},
displayAuthenticationMethod: {
type: Boolean,
optional: true,

@ -472,38 +472,6 @@ Migrations.add('add-hide-logo', () => {
);
});
Migrations.add('add-custom-html-after-body-start', () => {
Settings.update(
{
customHTMLafterBodyStart: {
$exists: false,
},
},
{
$set: {
customHTMLafterBodyStart: '',
},
},
noValidateMulti,
);
});
Migrations.add('add-custom-html-before-body-end', () => {
Settings.update(
{
customHTMLbeforeBodyEnd: {
$exists: false,
},
},
{
$set: {
customHTMLbeforeBodyEnd: '',
},
},
noValidateMulti,
);
});
Migrations.add('add-displayAuthenticationMethod', () => {
Settings.update(
{

Loading…
Cancel
Save