Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render() {
const { routes, params } = this.props
return (
<div>
{_c('site.logo')}
{_c('site.title', 'Admin')}
</div>
<header style="{{">
{/* */}
<div style="{{">
{items => <menu style="{{" mode="horizontal">{items}</menu>}
</div></header>
const UserSignIn = ({ context: { _t } }) => ({
type: 'object',
name: 'user_sign_in',
resource: 'auth/login',
title: _t('Sign In'),
properties: {
username: {
title: _t('Username'),
type: 'string'
},
password: {
title: _t('Password'),
type: 'string'
},
...(_c('auth.login.captcha')?{
code: {
title: _t('Captcha Code'),
type: 'string',
fieldType: 'captcha'
}
}:{})
},
required: [ 'username', 'password', ...(_c('auth.login.captcha')?[ 'code' ]:[]) ],
form: [
'username',
{ key: 'password', attrs: { type: 'password' } },
...(_c('auth.login.captcha')?[ {
key: 'code', captcha_url: '/' + _c('auth.login.captcha')
} ]:[])
]
})
render() {
return (
<div id="footer">
<hr>
<footer>
<p>© {_c('site.copyright')}</p>
</footer>
</div>
)}
}
...(_c('auth.registration.captcha')?{
code: {
title: _t('Captcha Code'),
type: 'string',
fieldType: 'captcha'
}
}:{})
},
permission: { add: true },
required: [ 'username', 'email', 'password1', 'password2', ...(_c('auth.registration.captcha')?[ 'code' ]:[]) ],
form: [
'username',
'email',
{ key: 'password1', attrs: { type: 'password' } },
{ key: 'password2', attrs: { type: 'password' } },
...(_c('auth.registration.captcha')?[ {
key: 'code', captcha_url: '/' + _c('auth.registration.captcha')
} ]:[] )
]
})
code: {
title: _t('Captcha Code'),
type: 'string',
fieldType: 'captcha'
}
}:{})
},
permission: { add: true },
required: [ 'username', 'email', 'password1', 'password2', ...(_c('auth.registration.captcha')?[ 'code' ]:[]) ],
form: [
'username',
'email',
{ key: 'password1', attrs: { type: 'password' } },
{ key: 'password2', attrs: { type: 'password' } },
...(_c('auth.registration.captcha')?[ {
key: 'code', captcha_url: '/' + _c('auth.registration.captcha')
} ]:[] )
]
})
const useTextFilter = ({ input }) => {
let value = input.value
let like = null
if(value == null || value == undefined || value == '') {
value = ''
like = config('filter') && config('filter').textDefaultSearch == true
} else if(value && value.like !== undefined) {
value = value.like
like = true
} else {
like = false
}
const onChange = ({ value, like }) => {
if(like) {
input.onChange({ like: value })
} else {
input.onChange(value)
}
}
const onValueChange = value => {
const WrapForm = React.useMemo(() => {
const formConfig = config('redux-form-config')
return reduxForm({
form: formKey,
...formConfig,
...wrapProps,
validate: (values) => {
let errors = validate ? validate(values) : {}
return validateByFields(errors, values, fields)
}
})(BaseForm)
}, [ formKey ])
type: 'string'
},
...(_c('auth.login.captcha')?{
code: {
title: _t('Captcha Code'),
type: 'string',
fieldType: 'captcha'
}
}:{})
},
required: [ 'username', 'password', ...(_c('auth.login.captcha')?[ 'code' ]:[]) ],
form: [
'username',
{ key: 'password', attrs: { type: 'password' } },
...(_c('auth.login.captcha')?[ {
key: 'code', captcha_url: '/' + _c('auth.login.captcha')
} ]:[])
]
})
render() {
return (
<>
{this.props.children}
<footer>
)}
}</footer>