mirror of https://github.com/requarks/wiki
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
577 B
30 lines
577 B
8 years ago
|
|
||
|
// Vue Create User instance
|
||
|
|
||
|
let vueCreateUser = new Vue({
|
||
|
el: '#modal-admin-createuser',
|
||
|
data: {
|
||
|
email: '',
|
||
|
provider: 'local',
|
||
|
password: '',
|
||
|
name: ''
|
||
|
},
|
||
|
methods: {
|
||
|
open: (ev) => {
|
||
|
$('#modal-admin-createuser').addClass('is-active');
|
||
|
$('#modal-admin-createuser input').first().focus();
|
||
|
},
|
||
|
cancel: (ev) => {
|
||
|
$('#modal-admin-createuser').removeClass('is-active');
|
||
|
vueCreateUser.email = '';
|
||
|
vueCreateUser.provider = 'local';
|
||
|
},
|
||
|
create: (ev) => {
|
||
|
|
||
|
vueCreateUser.cancel();
|
||
|
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
|
||
|
$('.btn-create-prompt').on('click', vueCreateUser.open);
|