Commit 22294c97 authored by ZeMKI's avatar ZeMKI
Browse files

Update app.js

parent ac7aae85
......@@ -305,12 +305,13 @@ window.app = new Vue({
'There it was an error during the request - refresh page and try again');
});
}, confirmduplicate: function (id, name) {
let self = this;
let confirmDelete = this.$buefy.dialog.confirm({
title: 'Confirm Duplicate',
message: 'Do you want to duplicate the study "' +
title: self.trans('Confirm Duplicate'),
message: self.trans('Do you want to duplicate the study "') +
name + '" ?',
cancelText: 'Cancel',
confirmText: 'Yes Duplicate Study',
cancelText: self.trans('Cancel'),
confirmText: self.trans('Yes Duplicate Study'),
hasIcon: true,
type: 'is-warning',
onConfirm: () => this.duplicatestudy(
......@@ -323,7 +324,7 @@ window.app = new Vue({
axios.get('studies/' + id + '/duplicate').then((response) => {
setTimeout(function () {
self.loading = false;
self.$buefy.snackbar.open('Study duplicated');
self.$buefy.snackbar.open(self.trans('Study duplicated'));
window.location.reload();
}, 500);
......@@ -334,13 +335,14 @@ window.app = new Vue({
'There it was an error during the request - refresh page and try again');
});
}, confirmdelete: function (id, name) {
let self = this;
let confirmDelete = this.$buefy.dialog.confirm({
title: 'Confirm Delete',
message: this.trans(`<div class="bg-red-600 p-2 text-white text-center">You are about to delete the study <br><span class="uppercase">` +
message: `<div class="bg-red-600 p-2 text-white text-center">`+this.self('You are about to delete the study')+ `<br><span class="uppercase">` +
name +
'</span><br> and all its content?<br><span class="has-text-weight-bold">Continue?</span></div>'),
cancelText: this.trans('Cancel'),
confirmText: this.trans('YES \n Delete Study'),
`</span><br>`+self.self('and all its content?')+`<br><span class="has-text-weight-bold">`+self.self('Continue?')+`</span></div>`,
cancelText: this.self('Cancel'),
confirmText: this.self('YES \n Delete Study'),
hasIcon: true,
type: 'is-danger',
onConfirm: () => this.deletestudy(
......@@ -406,16 +408,17 @@ window.app = new Vue({
},
});
}, setinterviewdname: function (studyid) {
let self = this;
this.$buefy.dialog.prompt({
message: this.trans(`What's the interviewee name?`),
confirmText: this.trans('Start Interview'),
message: self.trans(`What's the interviewee name?`),
confirmText: self.trans('Start Interview'),
inputAttrs: {
placeholder: '',
maxlength: 20,
required: false,
},
onConfirm: (value) => {
this.interview.interviewed = value;
self.interview.interviewed = value;
window.location.href = 'interviews/new?study=' +
studyid + '&interviewed=' +
value;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment