wikijs-fork/client/js/modals/admin-users-create.js

29 lines
619 B
JavaScript
Raw Normal View History

2017-01-04 05:07:15 +00:00
// Vue Create User instance
let vueCreateUser = new Vue({
2017-02-09 01:52:37 +00:00
el: '#modal-admin-users-create',
data: {
email: '',
provider: 'local',
password: '',
name: ''
},
methods: {
open: (ev) => {
$('#modal-admin-users-create').addClass('is-active')
$('#modal-admin-users-create input').first().focus()
},
cancel: (ev) => {
$('#modal-admin-users-create').removeClass('is-active')
vueCreateUser.email = ''
vueCreateUser.provider = 'local'
},
create: (ev) => {
vueCreateUser.cancel()
}
}
})
2017-01-04 05:07:15 +00:00
2017-02-09 01:52:37 +00:00
$('.btn-create-prompt').on('click', vueCreateUser.open)