2020-01-28 15:33:33 +01:00
|
|
|
<template>
|
|
|
|
<div class="columns is-centered">
|
|
|
|
<div class="form-column column is-two-thirds-tablet is-half-desktop is-one-third-widescreen is-one-quarter-fullhd">
|
2020-02-13 08:50:20 +01:00
|
|
|
<h1 class="title" v-html="title" v-if="title"></h1>
|
2020-01-28 15:33:33 +01:00
|
|
|
<slot />
|
|
|
|
<p v-if="showTag">
|
2020-05-08 11:38:56 +02:00
|
|
|
<notification :message="fail" type="is-danger" :isFixed="hasFixedNotification" v-if="fail" />
|
|
|
|
<notification :message="success" type="is-success" :isFixed="hasFixedNotification" v-if="success" />
|
2020-01-28 15:33:33 +01:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
name: 'FormWrapper',
|
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
computed: {
|
|
|
|
showTag: function() {
|
|
|
|
return (this.fail || this.success) ? true : false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
props: {
|
|
|
|
title: {
|
|
|
|
type: String,
|
|
|
|
default: ''
|
|
|
|
},
|
|
|
|
|
|
|
|
fail: {
|
|
|
|
type: String,
|
|
|
|
default: ''
|
|
|
|
},
|
|
|
|
|
|
|
|
success: {
|
|
|
|
type: String,
|
|
|
|
default: ''
|
|
|
|
},
|
2020-05-07 14:02:03 +02:00
|
|
|
|
|
|
|
hasFixedNotification: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
},
|
2020-01-28 15:33:33 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|