Commit 266dcb0a authored by Julien BOUYER's avatar Julien BOUYER
Browse files

Merge branch 'develop' into feature/spel_expression_handling

parents 3fb49f5f eac55f9d
......@@ -21,6 +21,12 @@ export default class AdminUsersTable extends Vue {
public autocompleteUsers: IUser[] = [];
@Prop()
public customTitle;
@Prop()
public customDescription;
@Inject('userService')
private userManagementService: () => UserManagementService;
......@@ -75,4 +81,18 @@ export default class AdminUsersTable extends Vue {
this.authorizedUsers.splice(userIdx, 1);
}
}
public getTitle() {
if (this.customTitle) {
return this.customTitle;
}
return this.$t('user.table.titre')
}
public getDescription() {
if (this.customDescription) {
return this.customDescription;
}
return this.$t('user.table.info')
}
}
<template>
<main>
<h2 id="managers" class="mb-4 text-2xl">{{ $t('user.table.titre') }}</h2>
<p class="mb-4">{{ $t('user.table.info') }}</p>
<h2 id="managers" class="mb-4 text-2xl">{{ getTitle() }}</h2>
<p class="mb-4">{{ getDescription() }}</p>
<div class="flex items-center">
<input
class="w-full px-6 py-4 text-lg transition bg-white border rounded-md outline-none ring-inset focus:ring"
......
......@@ -46,9 +46,7 @@ export default class FormSettings extends Vue {
public save(): void {
this.formService()
.update(this.form)
.then(() => {
this.$router.go(-1);
});
.then(() => console.log('Enregistrement réussi.'));
}
public retrieveForm(idForm: number): void {
......@@ -70,14 +68,12 @@ export default class FormSettings extends Vue {
setName(name: string) {
this.form.name = name;
}
setDescription(description: string) {
this.form.description = description;
this.save()
}
setReference(reference: string) {
this.form.reference = reference;
this.save()
}
public addPermision(user: IUser) {
......
......@@ -11,18 +11,13 @@
disabled="true"
></oa-input>
<oa-input id="name" :label="$t('form.settings.name')" type="text" :value="form.name" required="true" @update="setName"></oa-input>
<oa-textarea
id="description"
:label="$t('form.settings.description')"
:value="form.description"
@update="setDescription"
></oa-textarea>
<oa-button type="submit" variant="primary" :label="$t('button.save')"></oa-button>
</form>
<admin-users-table
:authorizedUsers="authorizedUsers"
@addPermission="addPermision"
@removePermission="removePermision"
:customTitle="$t('form.settings.contributeurs')"
:customDescription="$t('form.settings.contributeurs_description')"
></admin-users-table>
</section>
</template>
......
......@@ -8,7 +8,6 @@
:key="index"
:title="form.name"
:number="form.number_element"
:state="form.publicationState"
:link="getFormLink(form.id)"
></card>
</div>
......
......@@ -21,9 +21,12 @@
},
"settings": {
"title": "Informations générales",
"name": "Titre",
"name": "Intitulé du questionnaire",
"reference": "Référence",
"description": "Description"
"description": "Description",
"contributeurs": "Contributeurs",
"contributeurs_description": "Vous pouvez ajouter ou supprimer des contributeurs sur ce questionnaire."
},
"actions": {
"add": "Créer un questionnaire"
......
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