First commit
This commit is contained in:
24
client/video-edit-client-plugin.js
Normal file
24
client/video-edit-client-plugin.js
Normal file
@ -0,0 +1,24 @@
|
||||
function register ({ registerVideoField }) {
|
||||
const explicitAgreement = {
|
||||
name: 'lumbung-explicit-agreement',
|
||||
label: 'I agree with lumbung terms and I have the right to publish this video',
|
||||
type: 'input-checkbox',
|
||||
|
||||
hidden: ({ formValues }) => {
|
||||
return formValues['privacy'] !== 1 && formValues['privacy'] !== 2
|
||||
},
|
||||
|
||||
error: ({ formValues, value }) => {
|
||||
if (formValues['privacy'] !== 1 && formValues['privacy'] !== 2) return { error: false }
|
||||
if (value === true) return { error: false }
|
||||
|
||||
return { error: true, text: 'Explicit lumbung agreement is required' }
|
||||
}
|
||||
}
|
||||
|
||||
registerVideoField(explicitAgreement, { type: 'upload', tab: 'main' })
|
||||
}
|
||||
|
||||
export {
|
||||
register
|
||||
}
|
||||
Reference in New Issue
Block a user