Adds Helper Button to Tainacan Form Item. Adds ~

This commit is contained in:
mateuswetah 2018-03-22 15:44:06 -03:00
parent 19c5759cf7
commit e65f9d2091
3 changed files with 14 additions and 6 deletions

View File

@ -6,7 +6,7 @@
<h5>{{ title }}</h5><a @click="isOpened = false"><b-icon icon="close"></b-icon></a>
</div>
<div class="help-tooltip-body">
<p>{{ message }}</p>
<p>{{ (message != '' && message != undefined) ? message : $i18n.get('info_no_description_provided') }}</p>
</div>
</div>
</span>
@ -46,6 +46,7 @@ export default {
.help-tooltip.opened {
visibility: visible;
opacity: 1;
margin-bottom: 14px;
}
.help-tooltip {
@ -53,7 +54,7 @@ export default {
background-color: #e8f9f5;
border: 1px solid #338591;
border-radius: 10px;
margin: 0px 0px 14px -37px;
margin: 0px 0px 0px -37px;
position: absolute;
z-index: 99999999999999;
bottom: 100%;
@ -62,7 +63,7 @@ export default {
display: block;
visibility: hidden;
opacity: 0;
transition: opacity 0.3s ease;
transition: opacity 0.4s ease, margin-bottom 0.4s ease;
.help-tooltip-header {
padding: 0.8em 0.8em 0.6em 0.8em;

View File

@ -154,6 +154,7 @@ return [
'info_not_saved' => __( 'Not saved ', 'tainacan' ),
'info_warning_fields_not_saved' => __('Are you sure? There are fields not saved, changes will be lost.', 'tainacan'),
'info_warning_filters_not_saved' => __('Are you sure? There are filters not saved, changes will be lost.', 'tainacan'),
'info_no_description_provided' => __('No description provided.', 'tainacan'),
// Tainacan Field Types
'tainacan-text' => __( 'Text', 'tainacan' ),

View File

@ -1,7 +1,13 @@
<template>
<b-field :label="field.field.name"
:message="getErrorMessage"
:type="fieldTypeMessage">
<b-field
:addons="false"
:label="field.field.name"
:message="getErrorMessage"
:type="fieldTypeMessage">
<help-button
:title="field.field.name"
:message="field.field.description">
</help-button>
<div v-if="isTextInputComponent( field.field.field_type_object.component )">
<component :id="field.field.field_type_object.component + '-' + field.field.slug" :is="field.field.field_type_object.component" v-model="inputs[0]" :field="field" @blur="changeValue()"></component>
<div v-if="field.field.multiple == 'yes'">