forked from kompetenzinventar/ki-frontend
ISSUE-58| Move profile visiblity (!87)
Move switch profile visibility button to save bar Rename Save button to save as draft and offer save and publish Fixes kompetenzinventar/ki-doku#58 Reviewed-on: kompetenzinventar/ki-frontend#87 Reviewed-by: srsh <srsh@noreply.git.wtf-eg.de> Co-authored-by: Nikolai Gotzmann <self@ngotzmann.net> Co-committed-by: Nikolai Gotzmann <self@ngotzmann.net>
This commit is contained in:
parent
c2552f3c3a
commit
c79ada2123
@ -95,10 +95,11 @@ export default {
|
|||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async submitFormEdit() {
|
async submitFormEdit(isProfileVisible) {
|
||||||
this.showErrorMessage = false
|
this.showErrorMessage = false
|
||||||
this.showSuccessMessage = false
|
this.showSuccessMessage = false
|
||||||
const userId = store.state.currentUserId
|
const userId = store.state.currentUserId
|
||||||
|
this.profile.visible = isProfileVisible;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const body = JSON.stringify(this.profile)
|
const body = JSON.stringify(this.profile)
|
||||||
|
@ -12,25 +12,8 @@ SPDX-License-Identifier: AGPL-3.0-or-later
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<form @submit.prevent="submitFormEdit()">
|
<form @submit.prevent="submitFormEdit(false)">
|
||||||
<Section title="Grunddaten">
|
<Section title="Grunddaten">
|
||||||
<div class="mb-4">
|
|
||||||
<div class="form-check form-switch">
|
|
||||||
<input
|
|
||||||
class="form-check-input"
|
|
||||||
type="checkbox"
|
|
||||||
role="switch"
|
|
||||||
v-model="profile.visible"
|
|
||||||
id="visibility"
|
|
||||||
>
|
|
||||||
<label
|
|
||||||
class="form-check-label"
|
|
||||||
for="visibility">
|
|
||||||
Profil für angemeldete Benutzer sichtbar
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-4">
|
<div class="row mb-4">
|
||||||
<div class="col-12 col-md-4 mb-3 mb-md-0">
|
<div class="col-12 col-md-4 mb-3 mb-md-0">
|
||||||
<label class="form-label">Nickname</label>
|
<label class="form-label">Nickname</label>
|
||||||
@ -223,10 +206,16 @@ SPDX-License-Identifier: AGPL-3.0-or-later
|
|||||||
Gespeichert
|
Gespeichert
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
class="btn btn-primary ms-3"
|
class="btn btn-secondary ms-3"
|
||||||
@click="submitFormEdit()"
|
@click="submitFormEdit(false)"
|
||||||
>
|
>
|
||||||
Speichern
|
Entwurf Speichern
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="btn btn-primary ms-3"
|
||||||
|
@click="submitFormEdit(true)"
|
||||||
|
>
|
||||||
|
Speichern und Veröffentlichen
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user