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