First commit

This commit is contained in:
Chocobozzz
2021-12-29 14:20:48 +01:00
commit ce2ea01663
5 changed files with 736 additions and 0 deletions

View 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
}