-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Faz overrride o template do modal create-agent para poder inserir o c…
…ampo sub area de atuação
- Loading branch information
1 parent
b29a35a
commit e7fd9fa
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?php | ||
/** | ||
* @var MapasCulturais\App $app | ||
* @var MapasCulturais\Themes\BaseV2\Theme $this | ||
*/ | ||
|
||
use MapasCulturais\i; | ||
|
||
$this->import(' | ||
entity-field | ||
entity-terms | ||
mc-link | ||
mc-modal | ||
'); | ||
?> | ||
<mc-modal :title="modalTitle" classes="create-modal create-agent-modal" button-label="<?php i::_e('Criar Agente')?>" @open="createEntity()" @close="destroyEntity()"> | ||
<template v-if="entity && !entity.id" #default> | ||
<label><?php i::_e('Crie um agente com informações básicas')?><br><?php i::_e('e de forma rápida')?></label> | ||
<div class="create-modal__fields"> | ||
<entity-field :entity="entity" hide-required :editable="true" label="<?php i::esc_attr_e("Selecione o tipo do agente")?>" prop="type"></entity-field> | ||
<entity-field :entity="entity" hide-required label=<?php i::esc_attr_e("Nome ou título")?> prop="name"></entity-field> | ||
<entity-terms :entity="entity" hide-required :editable="true" :classes="areaClasses" taxonomy='area' title="<?php i::esc_attr_e("Área de Atuação") ?>"></entity-terms> | ||
<entity-terms :entity="entity" hide-required :editable="true" :classes="areaClasses" taxonomy='subarea' title="<?php i::esc_attr_e("Sub área de atuação") ?>"></entity-terms> | ||
<entity-field :entity="entity" hide-required prop="shortDescription" label="<?php i::esc_attr_e("Adicione uma Descrição curta para o Agente")?>"></entity-field> | ||
<entity-field :entity="entity" hide-required v-for="field in fields" :prop="field"></entity-field> | ||
</div> | ||
</template> | ||
|
||
<template v-if="entity?.id" #default> | ||
<label><?php i::_e('Você pode completar as informações do seu agente agora ou pode deixar para depois. ');?></label> | ||
</template> | ||
<template v-if="entity?.id && entity.status==0" #default> | ||
<label><?php i::_e('Você pode completar as informações do seu agente agora ou pode deixar para depois.');?></label><br><br> | ||
<label><?php i::_e('Para completar e publicar seu novo agente, acesse a área <b>Rascunhos</b> em <b>Meus Agentes</b> no <b>Painel de Controle</b>. ');?></label> | ||
</template> | ||
|
||
<template #button="modal"> | ||
<slot :modal="modal"></slot> | ||
</template> | ||
<template v-if="!entity?.id" #actions="modal"> | ||
<button class="button button--primary" @click="createPublic(modal)"><?php i::_e('Criar e Publicar')?></button> | ||
<button class="button button--solid-dark" @click="createDraft(modal)"><?php i::_e('Criar em Rascunho')?></button> | ||
<button class="button button--text button--text-del " @click="modal.close()"><?php i::_e('Cancelar')?></button> | ||
</template> | ||
|
||
<template v-if="entity?.id && entity.status==1" #actions="modal"> | ||
<mc-link :entity="entity" class="button button--primary-outline button--icon"><?php i::_e('Ver Agente');?></mc-link> | ||
<button class="button button--secondarylight button--icon " @click="modal.close()"><?php i::_e('Completar Depois')?></button> | ||
<mc-link :entity="entity" route='edit' class="button button--primary button--icon"><?php i::_e('Completar Informações')?></mc-link> | ||
</template> | ||
<template v-if="entity?.id && entity.status==0" #actions="modal"> | ||
<mc-link :entity="entity" class="button button--primary-outline button--icon"><?php i::_e('Ver Agente');?></mc-link> | ||
<button class="button button--secondarylight button--icon " @click="modal.close()"><?php i::_e('Completar Depois')?></button> | ||
<mc-link :entity="entity" route='edit' class="button button--primary button--icon"><?php i::_e('Completar Informações')?></mc-link> | ||
</template> | ||
</mc-modal> |