-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathedit.php
67 lines (46 loc) · 2.38 KB
/
edit.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
/**
* Arquivo usado somente para quem está criando a oportunidade em mode de edição
*/
$action = preg_replace("#^(\w+/)#", "", $this->template);
$this->jsObject['isEditable'] = true;
$this->bodyProperties['ng-app'] = "entity.app";
$this->bodyProperties['ng-controller'] = "EntityController";
$this->jsObject['angularAppDependencies'][] = 'entity.module.opportunity';
$this->addEntityToJs($entity);
$this->addOpportunityToJs($entity->opportunity);
$this->addOpportunitySelectFieldsToJs($entity->opportunity);
$this->addRegistrationToJs($entity);
$this->includeAngularEntityAssets($entity);
$_params = [
'entity' => $entity,
'action' => $action,
'opportunity' => $entity->opportunity
];
// CONSULTA AO BANCO PARA SABER SE TEM REGISTRO
$opMetaSpace = $app->repo('OpportunityMeta')->findBy(['owner' => $entity->opportunity->id, 'key' => 'useSpaceRelationIntituicao']);
?>
<?php $this->part('editable-entity', array('entity'=>$entity, 'action'=>$action));?>
<article class="main-content registration" ng-controller="OpportunityController">
<?php $this->part('singles/registration--header', $_params); ?>
<article ng-controller="RegistrationFieldsController" >
<?php $this->applyTemplateHook('form','begin');?>
<?php $this->part('singles/registration-edit--header', $_params) ?>
<?php $this->part('singles/registration-edit--categories', $_params) ?>
<div ng-controller="OpportunityController">
<?php $this->part('singles/registration-edit--agents', $_params);?>
</div>
<?php $this->part('singles/registration-edit--spaces', array('params' => $_params, 'query' => $opMetaSpace) ) ?>
<?php // Desabilitando este template por enquanto, pois não é a melhor forma de apresentar para o usuário que está se inscrevendo ?>
<?php //$this->part('singles/registration-edit--seals', $_params) ?>
<?php $this->part('singles/registration-edit--fields', $_params) ?>
<?php if(!$entity->preview): ?>
<?php $this->part('singles/registration-edit--send-button', $_params) ?>
<?php endif; ?>
<?php $this->applyTemplateHook('form','end'); ?>
</article>
</article>
<article id="sidebars">
<?php $this->part('singles/registration--sidebar--left', $_params) ?>
<?php $this->part('singles/registration--sidebar--right', $_params) ?>
</article>