dcousens on point-readme-to-ks6
dcousens on master
Point keystone-classic readme t… don't dance around the wording Merge pull request #5008 from k… (compare)
dcousens on point-readme-to-ks6
don't dance around the wording (compare)
Noviny on point-readme-to-ks6
Point keystone-classic readme t… (compare)
bladey on master
Update README.md (compare)
bladey on master
Update README.md (compare)
const obj = { greeting: { action: 'hello', object: 'world' } }
const { greeting } = obj
greeting.object = 'you'
console.log(obj.greeting) // {action: "hello", object: "you"}
var locals = res.locals
then modifying locals
will also modify res.locals
because you only copied over the reference to the object rather than the object itself. If you want to make a copy of res.locals to a variable called locals and modify that without also modifying the original, you want to use the following code:var locals = Object.assign({}, res.locals);
Object.assign(...)
takes the first object and assigns values from all objects following it to that value. In this case, we're copying the values of res.locals
to the empty object {}
, effectively copying all the values of res.locals
into a new object
Research.add({
title : {type : String, required : true},
state : {type : Types.Select, options : 'Submitted, Ongoing , Completed',default : 'Submitted'},
principalInvestigator : {type : String},
coInvestigator : {type : String},
fundingAgency : {type : String},
sanctionedAmount : {type : Number,note:'lakhs'},
from : {type : Types.Date},
to : {type : Types.Date},
});
I want to add a logo to a keystone project or if logo is not possible, just a simple text. I was able to add the logo only during the login process. I suppose the best place to add the logo is the navigation bar but its not a must.
I tried to changed the home logo <span class="octicon octicon-home"></span> with my logo but was not able to found where.
I tried to add img(src='/images/logo.png', width='160') to templates/layouts/default.pub but I got an error img is a self closing element: <img/> but contains nested content. It's also wrote There is no .container wrapping class around body blocks to allow more flexibility in design
I tried to add an iFrame using javascript and tried to put some html code on it. This also didn't worked.
I also tried to set a label or singular to one page but this is not what I need
Do you have any idea?
Hello everyone. I've added a custom validator to a text field, but the admin UI isn't displaying the message
property of the validator. Instead it displays: "ValidationError: [model name] validation failed". Example:
phone: {
type: Types.Text,
required: [true, 'Phone number is required'],
initial: true,
validate: {
validator: function(value: any) {
return /\d{3}-\d{3}-\d{4}/.test(value);
},
message: '{VALUE} is not a valid phone number',
},
},
What am I doing wrong?