Skip to content

Commit

Permalink
Corrige erros no console do frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
lpirola committed Jul 11, 2024
1 parent aed8dc5 commit 327c8a8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
<?php
<?php

/**
* @var MapasCulturais\App $app
* @var MapasCulturais\Themes\BaseV2\Theme $this
*/

use MapasCulturais\i;

$this->import('
entity-field
');
?>
<div :class="classes" v-if="editable || show" class="entity-social-media">
<mc-title v-if="!editable" tag="h4" :short-length="0" size="medium" class="bold"><?= i::__("Redes sociais") ?></mc-title>
<mc-title v-if="!editable" tag="h4" :short-length="0" size="medium" class="bold" text="<?= i::__("Redes sociais") ?>"><?= i::__("Redes sociais") ?></mc-title>

<div v-if="!editable" class="entity-social-media__links">
<div v-if="entity.instagram" class="entity-social-media__links--link">
Expand Down Expand Up @@ -55,7 +57,7 @@
</div>


<mc-title v-if="editable" tag="h4" :short-length="0" size="medium" class="bold"><?= i::__("Adicionar redes sociais") ?></mc-title>
<mc-title v-if="editable" tag="h4" :short-length="0" size="medium" class="bold" text="<?= i::__("Adicionar redes sociais") ?>"><?= i::__("Adicionar redes sociais") ?></mc-title>

<div v-if="editable" class="entity-social-media__edit">
<div class="entity-social-media__edit--link">
Expand Down
13 changes: 7 additions & 6 deletions src/modules/Entities/components/entity-terms/template.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @var MapasCulturais\App $app
* @var MapasCulturais\Themes\BaseV2\Theme $this
Expand All @@ -15,11 +16,11 @@
?>
<div v-if="taxomyExists() && (editable || entity.terms?.[taxonomy].length > 0)" :class="['entity-terms', classes, error]">
<div class="entity-terms__header">
<mc-title tag="h4" :short-length="0" size="medium" class="bold">{{title ?? taxonomy}}</mc-title>
<mc-title tag="h4" :short-length="0" size="medium" class="bold" text="{{title ?? taxonomy}}">{{title ?? taxonomy}}</mc-title>
<span class="entity-terms__required" style="color: red">*</span>
</div>
<mc-popover v-if="allowInsert && editable" openside="down-right" @open="loadTerms()" :title="popoverTitle">

<mc-popover v-if="allowInsert && editable" openside="down-right" @open="loadTerms()" :title="popoverTitle">
<template #button="popover">
<button @click="popover.toggle()" class="button button--rounded button--sm button--icon button--primary" v-if="editable">
<?php i::_e("Adicionar nova") ?>
Expand All @@ -31,7 +32,7 @@
<template #default="{toggle}">
<div class="entity-terms__tags">
<form class="entity-terms__tags--form" @submit.prevent="insertTag(toggle)">
<input type="text" class="input" placeholder="<?= i::__('Adicione uma nova tag') ?>" v-model="filter">
<input type="text" class="input" placeholder="<?= i::__('Adicione uma nova tag') ?>" v-model="filter">
<button class="button button--primary button--icon entity-terms__tags--form-addBtn" type="submit">
<mc-icon name="add"></mc-icon>
</button>
Expand All @@ -46,12 +47,12 @@
</mc-popover>

<mc-multiselect v-if="!allowInsert && editable" :model="entity.terms[this.taxonomy]" :title="title" :items="terms" @open="loadTerms()" #default="{popover}">
<button class="button button--rounded button--sm button--icon button--primary" @click="popover.toggle()" >
<button class="button button--rounded button--sm button--icon button--primary" @click="popover.toggle()">
<?php i::_e("Adicionar nova") ?>
<mc-icon name="add"></mc-icon>
</button>
</mc-multiselect>
<small class="field__error" v-if="hasErrors">
<small class="field__error" v-if="hasErrors">
{{errors.join('; ')}}
</small>
<mc-tag-list :editable="editable" :classes="entity.__objectType+'__background'" :tags="entity.terms[this.taxonomy]"></mc-tag-list>
Expand Down

0 comments on commit 327c8a8

Please sign in to comment.