Nav Bar do usuário deslogado.

Organização

testando

An error occurred while processing the template.
Java method "com.sun.proxy.$Proxy136.getOrganization(long)" threw an exception when invoked on com.sun.proxy.$Proxy136 object "com.liferay.portal.service.impl.OrganizationLocalServiceImpl@51e5b32a"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: organization = OrganizationLocalServi...  [in template "34764#34807#null" at line 14, column 17]
----
1<#assign  
2	OrganizationLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.OrganizationLocalService") 
3/> 
4 
5<#assign  
6	viewerHasPrivileges = false 
7	userId = themeDisplay.getUserId() 
8/> 
9 
10<#if userId?? > 
11	<#assign  
12		orgId = _CUSTOM_FIELD_organization.getData()?number 
13		viewerHasPrivileges = OrganizationLocalService.hasUserOrganization(userId, orgId) 
14		organization = OrganizationLocalService.getOrganization(orgId) 
15	/> 
16</#if> 
17 
18<#assign  
19	nome = organization.getName()!"" 
20 	imagem = (viewerHasPrivileges || DDMStructure_Field84114755.getData()!="0")?string(DDMStructure_CampoDeTexto18329557.getData()!"","") 
21	tipo = (viewerHasPrivileges || DDMStructure_Numrico28474992.getData()!="0")?string(DDMStructure_Text61401294.getData()!"","") 
22	tipo = tipo?replace("\n", "") 
23	tipo = tipo?replace("\t", "")	 
24	tipo = tipo?replace("\r", "") 
25	pais = (viewerHasPrivileges || DDMStructure_Field45654872.getData()!="0")?string(DDMStructure_Text47038833.getData()!"","") 
26	cidade = (viewerHasPrivileges || DDMStructure_Field81614178.getData()!="0")?string(DDMStructure_Text38119908.getData()!"","") 
27	estado = (viewerHasPrivileges || DDMStructure_Field89862022.getData()!="0")?string(DDMStructure_Text87845472.getData()!"","")!"" 
28 
29	site = (viewerHasPrivileges || DDMStructure_Field62760436.getData()!="0")?string(DDMStructure_Text98734375.getData()!"","") 
30	instagram = "" 
31	linkedin = (viewerHasPrivileges || DDMStructure_Field18557678.getData()!="0")?string(DDMStructure_Text82629110.getData()!"","")  
32	facebook = "" 
33 
34	sobre = (DDMStructure_Field80037203.getData()!="0")?string(DDMStructure_Text54730891.getData()!"","") 
35	competencias = (DDMStructure_Numrico42321087.getData()!="0")?string(DDMStructure_Text51537691.getData()!"","") 
36	setores = (DDMStructure_Field04200031.getData()!="0")?string("yes","") 
37 
38	instituicao = (viewerHasPrivileges || DDMStructure_Numrico42321087.getData()!="0")?string(DDMStructure_Text31001996.getData()!"","") 
39	tipoDeEntidade = (viewerHasPrivileges || DDMStructure_Numrico28474992.getData()!="0")?string(DDMStructure_Text53411607.getData()!"","") 
40	 
41 
42
43 
44<div class="bioec_org_info_container"> 
45	 
46	<#if viewerHasPrivileges> 
47	<!--<div class="botoesSidebarMobile mb-5"> 
48		<button class="bioec_secondary_button" data-toggle="modal" data-target="#bioec-org-delete-modal"> 
49		EXCLUIR ORGANIZAÇÃO 
50		</button> 
51		<button class="bioec_primary_button" data-toggle="modal" data-target="#bioec-org-edit-modal"> 
52		EDITAR 
53		</button> 
54	</div> --> 
55	</#if> 
56	 
57	<div id="profilePic"> 
58			<#if imagem?trim == ""> 
59			<div class="profilePic-container"> 
60				<i class="fa fa-user"></i> 
61				<a id="btnEditOrgModal" type="button" data-toggle="modal" data-target="#bioec-org-edit-modal"> 
62					<i class="fa fa-edit"></i> 
63				</a> 
64			</div> 
65			<#else> 
66			<div id="ProfilePic_Frame"> 
67				<img src="${imagem}" /> 
68				<a id="btnEditOrgModal" type="button" data-toggle="modal" data-target="#bioec-org-edit-modal"> 
69				<i class="fa fa-edit"></i> 
70			</a> 
71			</div> 
72			</#if> 
73			 
74		</div> 
75	 
76	<#if nome!=""> 
77		<label class="bioec_org_info_label">Nome da Organização</label> 
78		<div class="bioec_org_info_content">${nome}</div> 
79	</#if> 
80	 
81	<#if tipo!=""> 
82		<label class="bioec_org_info_label">Tipo de Organização</label> 
83		<div class="bioec_org_info_content">${tipo}</div> 
84	</#if> 
85	 
86	<#if instituicao!="" && tipo == "Grupo de Pesquisa/Universidade"> 
87		<label class="bioec_org_info_label">Instituição</label> 
88		<div class="bioec_org_info_content">${instituicao}</div> 
89	</#if> 
90	 
91	<#if tipoDeEntidade!="" && tipo == "Investidor/Agência de Fomento"> 
92		<label class="bioec_org_info_label">Tipo de Entidade</label> 
93		<div class="bioec_org_info_content">${tipoDeEntidade}</div> 
94	</#if> 
95	 
96	<#if cidade!=""> 
97		<label class="bioec_org_info_label">Cidade</label> 
98		<div class="bioec_org_info_content">${cidade}</div> 
99	</#if> 
100	 
101	<#if estado!=""> 
102		<label class="bioec_org_info_label">Estado</label> 
103		<div class="bioec_org_info_content">${estado}</div> 
104	</#if> 
105	 
106	<#if pais!=""> 
107		<label class="bioec_org_info_label">País</label> 
108		<div class="bioec_org_info_content">${pais}</div> 
109	</#if> 
110 
111	<div class="bioec_org_info_social_container"> 
112		<#if site != ""> 
113			<a href="${site}" target="_blank" rel="noopener noreferrer"> 
114				<i class="fa-solid fa-laptop"></i> 
115			</a> 
116		</#if> 
117		 
118		<#if instagram != ""> 
119			<a href="${instagram}" target="_blank" rel="noopener noreferrer"> 
120				<i class="fa-brands fa-instagram"></i> 
121			</a> 
122		</#if> 
123		 
124		<#if linkedin != ""> 
125			<a href="${linkedin}" target="_blank" rel="noopener noreferrer"> 
126				<i class="fa-brands fa-linkedin-in"></i> 
127			</a> 
128		</#if> 
129		 
130		<#if facebook != ""> 
131			<a href="${facebook}" target="_blank" rel="noopener noreferrer"> 
132				<i class="fa-brands fa-facebook"></i> 
133			</a> 
134		</#if> 
135		 
136	</div> 
137	 
138	<#if false && viewerHasPrivileges> 
139		<button data-toggle="modal" data-target="#privacyModal" class="bioec_primary_button"> 
140		CONFIGURAÇÕES DE PRIVACIDADE 
141		</button> 
142	</#if> 
143</div> 
144 
145<style> 
146.bioec_org_info_container { 
147    display: flex; 
148    flex-direction: column; 
149    background-color: #E8ECEF; 
150    height: 100%; 
151    padding: 40px 24px 40px 0; 
152
153 
154.bioec_org_info_img_placeholder { 
155    align-self: center; 
156    height: 120px; 
157    width: 120px; 
158    background-color: #595A5F; 
159    border-radius: 50%; 
160    display: flex; 
161    align-items: center; 
162    justify-content: center; 
163    color: var(--white-1); 
164    font-size: 72px; 
165		cursor: default; 
166
167 
168.bioec_org_info_label { 
169    display: block; 
170    font-weight: 700; 
171    font-size: 20px; 
172    line-height: 150%; 
173    color: #5B5C61; 
174    margin-bottom: 8px; 
175    margin-top: 24px; 
176    cursor: text; 
177
178 
179.bioec_org_info_content { 
180    display: block; 
181    font-weight: 400; 
182    font-size: 16px; 
183    line-height: 150%; 
184    color: #5B5C61; 
185    border-bottom: 1px solid #BEBEBE; 
186    padding-bottom: 4px; 
187
188 
189.bioec_org_info_social_container { 
190    display: flex; 
191    flex-direction: row; 
192    align-items: center; 
193    justify-content: center; 
194    margin: 40px 0; 
195
196 
197.bioec_org_info_social_container a { 
198    font-size: 35px; 
199    color: #5B5C61; 
200    margin: 0 15px; 
201
202 
203.botoesSidebarMobile{ 
204display: none; 
205justify-content: flex-end; 
206gap: 20px; 
207
208#profilePic { 
209    display: flex; 
210    justify-content: center; 
211    width: 120px; 
212    height: 120px; 
213    margin: auto; 
214		position: relative; 
215
216 
217#profilePic a:hover {  
218	text-decoration: none; 
219
220 
221#profilePic a#btnEditOrgModal { 
222	text-decoration: none; 
223	position: absolute; 
224        right: 0; 
225        bottom: 0; 
226        color: var(--white); 
227        background-color: var(--color-3); 
228        height: 40px; 
229        width: 40px; 
230        border-radius: 50%; 
231        border: none; 
232        outline: none; 
233        display: flex; 
234        align-items: center; 
235        justify-content: center; 
236        padding: 0; 
237        font-size: 18px; 
238	 
239
240 
241#ProfilePic_Frame { 
242    border-radius: 50%; 
243    width: 100%; 
244    height: 100%; 
245		overflow: hidden; 
246
247 #ProfilePic_Frame img { 
248	width: 100%; 
249  height: 100%; 
250  object-fit: cover; 
251
252 
253.profilePic-container { 
254	color: #FFF; 
255	background-color: #595A5F; 
256	border-radius: 50%; 
257	position: relative; 
258	display: flex; 
259	align-items: center; 
260	justify-content: center; 
261	padding: 35px; 
262	width: 100%; 
263  height: 100%; 
264	font-size: 70px; 
265
266 
267 
268@media (max-width: 1200px) { 
269	.bioec_org_info_container { 
270		padding: 40px 24px; 
271
272
273 
274@media (max-width: 994px) { 
275.botoesSidebarMobile{ 
276display: flex; 
277
278
279</style> 
An error occurred while processing the template.
Java method "com.sun.proxy.$Proxy136.getOrganization(long)" threw an exception when invoked on com.sun.proxy.$Proxy136 object "com.liferay.portal.service.impl.OrganizationLocalServiceImpl@51e5b32a"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: organization = OrganizationLocalServi...  [in template "34764#34807#null" at line 20, column 17]
----
1<#assign  
2	OrganizationLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.OrganizationLocalService") 
3	JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") 
4/> 
5 
6<#assign  
7	hasPrivileges = false 
8	userId = themeDisplay.getUserId() 
9/> 
10 
11<#assign  
12	orgTypes = ["Entidade Governamental","Associação","Outras ICT's","Comunidade Tradicional/Cooperativa","Startup", 
13	"Entidade do Terceiro Setor","Investidor/Agência de Fomento","Grupo de Pesquisa/Universidade","Empresa"] 
14/> 
15 
16<#if userId?? > 
17<#assign  
18	  orgId = _CUSTOM_FIELD_organization.getData()?number  
19		hasPrivileges = OrganizationLocalService.hasUserOrganization(userId, orgId) 
20		organization = OrganizationLocalService.getOrganization(orgId) 
21/> 
22</#if> 
23 
24<#if hasPrivileges> 
25	<#assign  
26		organization = OrganizationLocalService.getOrganization(_CUSTOM_FIELD_organization.getData()?number) 
27		articleId = organization.getExpandoBridge().getAttribute("journal-article") 
28		journalArticle = JournalArticleLocalService.getArticle(themeDisplay.getLayout().getGroupId(),articleId?c)  
29		articleXml = journalArticle.getDocument().getRootElement() 
30 
31		setoresXml = articleXml.selectNodes("dynamic-element[@name='Text40807358']") 
32		setores = "" 
33	/> 
34	<#list setoresXml as setor> 
35		<#assign setores =  setores + "'" + setor.getStringValue()?trim + "'," > 
36	</#list> 
37 
38    <button class="bioec_secondary_button mx-3" data-toggle="modal" style="display: flex;margin-left: auto !important;margin-right: auto !important;margin-top: 24px;" data-target="#bioec-org-delete-modal">EXCLUIR ORGANIZAÇÃO</button> 
39	<!-- <div class="mt-4 d-md-flex d-none align-items-center justify-content-end"> 
40		<button class="bioec_primary_button bioec_editar" data-toggle="modal" data-target="#bioec-org-edit-modal">EDITAR</button> 
41	</div> --> 
42	 
43	<#-- MODAL DE EXLUIR ORGANIZAÇÃO --> 
44	<div id="bioec-org-delete-modal" class="modal fade" style="display: none;" role="dialog" aria-hidden="true"> 
45		<div class="modal-dialog" role="document"> 
46			<div class="modal-content px-4 py-3"> 
47				<div class="modal-header"> 
48					<h5 class="modal-title">Excluir organização</h5> 
49					<button type="button" class="close" data-dismiss="modal" aria-label="Close"> 
50						<span aria-hidden="true">&times;</span> 
51					</button> 
52				</div> 
53				<div class="d-flex justify-content-end py-3"> 
54					<button type="button" class="bioec_secondary_button mx-3" data-dismiss="modal">CANCELAR</button> 
55        	<button type="button" class="bioec_primary_button" onclick="deleteOrg()" >CONTINUAR</button> 
56				</div> 
57			</div> 
58		</div> 
59	</div> 
60	 
61 
62     
63			<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" /> 
64			<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.3/jquery.min.js" integrity="sha512-STof4xm1wgkfm7heWqFJVn58Hm3EtS31XFaagaa8VMReCXAkQnJZ+jEy8PCC/iT18dFy95WcExNHFTqLyp72eQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> 
65			<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script> 
66			<link 
67						rel="stylesheet" 
68						href="https://cdnjs.cloudflare.com/ajax/libs/croppie/2.6.5/croppie.min.css" 
69						integrity="sha512-zxBiDORGDEAYDdKLuYU9X/JaJo/DPzE42UubfBw9yg8Qvb2YRRIQ8v4KsGHOx2H1/+sdSXyXxLXv5r7tHc9ygg==" 
70						crossorigin="anonymous" 
71						referrerpolicy="no-referrer" 
72						/> 
73 
74			<script 
75							src="https://cdnjs.cloudflare.com/ajax/libs/croppie/2.6.5/croppie.min.js" 
76							integrity="sha512-Gs+PsXsGkmr+15rqObPJbenQ2wB3qYvTHuJO6YJzPe/dTLvhy0fmae2BcnaozxDo5iaF8emzmCZWbQ1XXiX2Ig==" 
77							crossorigin="anonymous" 
78							referrerpolicy="no-referrer" 
79			></script> 
80 
81 
82<style> 
83 
84				.bioec_profile-form h1 { 
85					font-weight: 400; 
86					font-size: 39px; 
87					line-height: 150%; 
88					color: #5B5C61; 
89
90 
91				.bioec_profile-form-control { 
92					margin-bottom: 40px; 
93
94 
95				.bioec_profile-form-control label { 
96					color: #5B5C61; 
97					font-size: 20px; 
98					font-weight: 700; 
99					line-height: 30px; 
100					margin-bottom: 8px; 
101
102 
103				.bioec_profile-form-control label[required]::before { 
104					content: "*"; 
105					color: #ff0000; 
106					margin-right: 0.4rem; 
107
108 
109				.bioec_profile-form-control input, 
110				.bioec_profile-form-control select { 
111					border-radius: 0; 
112					outline: none; 
113					border: none; 
114					border-bottom: 1px solid #BEBEBE; 
115					font-size: 16px; 
116					font-weight: 400; 
117					line-height: 24px; 
118					color: #5B5C61; 
119					width: 100%; 
120					background-color: transparent; 
121						padding: 2px; 
122						margin: 0; 
123
124 
125				.submit-attempted .bioec_profile-form-control input:invalid, 
126				.submit-attempted .bioec_profile-form-control select:invalid { 
127						border-bottom: 1px solid #ff0000; 
128
129 
130				.bioec_profile-flex-container { 
131					display: flex; 
132					flex-direction: row; 
133					justify-content: space-between; 
134					flex-wrap: wrap; 
135
136 
137				.bioec_profile-flex-container .bioec_profile-form-control { 
138					width: 50%; 
139					padding-right: 1.5rem; 
140
141 
142				.bioec_profile-form-control textarea { 
143					font-size: 16px; 
144					font-weight: 400; 
145					line-height: 24px; 
146					color: #5B5C61; 
147					width: 100%; 
148					background-color: transparent; 
149					border-radius: 0; 
150					border: 1px solid #BEBEBE; 
151					resize: none; 
152					outline: none; 
153					margin-top: 24px; 
154
155 
156				.modal-header h1{ 
157				color: #5B5C61; 
158				margin-bottom: 0px; 
159				font-size: 25px; 
160				line-height: 58.5px; 
161				font-weight: 400; 
162
163 
164				@media (max-width: 768px) { 
165					.bioec_profile-flex-container .bioec_profile-form-control { 
166						margin-bottom: 1.5rem; 
167						width: 100%; 
168						padding-right: 0rem; 
169
170
171</style> 
172 
173<script> 
174 
175function deleteOrg() { 
176  Liferay.Util.openToast({message: "Enviando requisição",type: "info",title: ""});  
177 	fetch(Liferay.ThemeDisplay.getPortalURL() + "/o/profile-management/organization/${_CUSTOM_FIELD_organization.getData()}",  
178
179			method: "DELETE", 
180			headers: { 
181				"x-csrf-token": Liferay.authToken, 
182				"Content-Type": "application/json", 
183        "Accept": "application/json" 
184
185		}) 
186		.then( Liferay.Util.openToast({ 
187            message: "Estamos processando seu arquivo. Favor aguarde por alguns segundos e redireciorameos você automaticamente.", 
188            type: "success", 
189            title: "", 
190            toastProps: { 
191                autoClose: 2000 
192
193        })) 
194		.then(setTimeout(() => { window.location.href = Liferay.ThemeDisplay.getPortalURL() + "/meu-perfil#deleteOrg" }, 2000)) 
195		 
196		 
197 
198
199 
200		 
201	 
202</script> 
203	 
204</#if> 
An error occurred while processing the template.
Java method "com.sun.proxy.$Proxy136.getOrganization(long)" threw an exception when invoked on com.sun.proxy.$Proxy136 object "com.liferay.portal.service.impl.OrganizationLocalServiceImpl@51e5b32a"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: organization = OrganizationLocalServi...  [in template "34764#34807#null" at line 20, column 17]
----
1<#assign  
2	OrganizationLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.OrganizationLocalService") 
3	JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") 
4/> 
5 
6<#assign  
7	hasPrivileges = false 
8	userId = themeDisplay.getUserId() 
9/> 
10 
11<#assign  
12	orgTypes = ["Entidade Governamental","Associação","Outras ICT's","Comunidade Tradicional/Cooperativa","Startup", 
13	"Entidade do Terceiro Setor","Investidor/Agência de Fomento","Grupo de Pesquisa/Universidade","Empresa"] 
14/> 
15 
16<#if userId?? > 
17<#assign  
18	  orgId = _CUSTOM_FIELD_organization.getData()?number  
19		hasPrivileges = OrganizationLocalService.hasUserOrganization(userId, orgId) 
20		organization = OrganizationLocalService.getOrganization(orgId) 
21/> 
22</#if> 
23 
24<#if hasPrivileges> 
25	<#assign  
26		organization = OrganizationLocalService.getOrganization(_CUSTOM_FIELD_organization.getData()?number) 
27		articleId = organization.getExpandoBridge().getAttribute("journal-article") 
28		journalArticle = JournalArticleLocalService.getArticle(themeDisplay.getLayout().getGroupId(),articleId?c)  
29		articleXml = journalArticle.getDocument().getRootElement() 
30 
31		setoresXml = articleXml.selectNodes("dynamic-element[@name='Text40807358']") 
32		setores = "" 
33	/> 
34	<#list setoresXml as setor> 
35		<#assign setores =  setores + "'" + setor.getStringValue()?trim + "'," > 
36	</#list> 
37 
38	<div class="mt-4 d-md-flex d-none align-items-center justify-content-end" style="display:none!important;" > 
39		<button class="bioec_secondary_button mx-3" data-toggle="modal" data-target="#bioec-org-delete-modal"  >EXCLUIR ORGANIZAÇÃO</button> 
40		<button class="bioec_primary_button bioec_editar" data-toggle="modal" data-target="#bioec-org-edit-modal" >EDITAR</button> 
41	</div> 
42	 
43 
44	 
45 
46 
47	<#-- MODAL DE EXLUIR ORGANIZAÇÃO --> 
48	<div id="bioec-org-delete-modal" class="modal fade" style="display: none;" role="dialog" aria-hidden="true"> 
49		<div class="modal-dialog" role="document"> 
50			<div class="modal-content px-4 py-3"> 
51				<div class="modal-header"> 
52					<h5 class="modal-title">Excluir organização</h5> 
53					<button type="button" class="close" data-dismiss="modal" aria-label="Close"> 
54						<span aria-hidden="true">&times;</span> 
55					</button> 
56				</div> 
57				<div class="d-flex justify-content-end py-3"> 
58					<button type="button" class="bioec_secondary_button mx-3" data-dismiss="modal">CANCELAR</button> 
59        	<button type="button" class="bioec_primary_button" onclick="deleteOrg()" >CONTINUAR</button> 
60				</div> 
61			</div> 
62		</div> 
63	</div> 
64	 
65	<#-- MODAL DE EDIÇÃO --> 
66	<div id="bioec-org-edit-modal" class="modal fade" style="display: none;"  tabindex="-1" role="dialog" aria-hidden="true"> 
67		<div class="modal-dialog modal-lg" role="document"> 
68			<div class="modal-content px-4 py-3"> 
69			 
70			 <div class="modal-header">  
71			 <h1>Sobre a organização</h1>  
72					 <button type="button" class="close" data-dismiss="modal" aria-label="Close" onclick="closeAndReset()"> 
73						<span aria-hidden="true">&times;</span> 
74					</button> 
75				</div> 
76					  
77			<div class="modal-body"> 
78        <form id="organization-form" class="bioec_profile-form"> 
79<#assign imagemOrg = DDMStructure_CampoDeTexto18329557.getData() > 
80 
81           <div class="d-flex justify-content-center my-5" style=" 
82							flex-direction: column; 
83							align-items: center; 
84						"> 
85								<div id="orgPicContainer" class="bioec_form-picture-container" ${(imagemOrg != "")?string("style='background-image: url("+ imagemOrg +")'","")} > 
86										<i id="user-icon" class="fa fa-user"></i> 
87										<button type="button" onclick="openFileSelectImagem()"> 
88												<i class="fa fa-edit"></i> 
89										</button>  
90								</div> 
91								<input name="imagem" id="file-input" class="d-none" type="file" onchange="encodeImageAsURL(this)" accept="image/*"/> 
92								<input class="d-none" id="inputOrgBase64OrgModal" /> 
93								<button type="button" onclick="removeImageOrgModal(this)" id="removerImagemOrgModal" ${(imagemOrg != "")?string("", "class='d-none'")}> 
94									<i class="fa fa-trash"></i> Remover imagem 
95								</button>   
96						</div> 
97 
98            <div class="bioec_profile-flex-container"> 
99                <div class="bioec_profile-form-control"> 
100                    <label required>Tipo de Organização</label> 
101                    <select id="tipo-de-organizacao" name="tipo" required title="Selecionar" value="${DDMStructure_Text61401294.getData()}"> 
102                        <option value="" disabled selected>Selecionar</option> 
103                        <#list orgTypes as type> 
104													<option value="${type}" ${(type==DDMStructure_Text61401294.getData())?string("selected","")} >${type}</option> 
105												</#list> 
106                    </select> 
107                </div> 
108 
109                <div class="bioec_profile-form-control"> 
110                    <div id="org-tipo-6" class="d-none"> 
111                        <label>Tipo de entidade</label> 
112                        <input name="investimento" type="text" id="tipodeentidadeOrganizacao" value="${DDMStructure_Text53411607.getData()}" /> 
113                    </div> 
114                    <div id="org-tipo-7" class="d-none"> 
115                        <label>Instituição</label> 
116                        <input name="instituicao" type="text" id="instituicaoOrganizacao" value="${DDMStructure_Text31001996.getData()}" /> 
117                    </div> 
118                </div> 
119								 
120                <div class="bioec_profile-form-control"> 
121                    <label required for="nomeOrganizacao">Nome da Organização</label> 
122                    <input id="nomeOrganizacao" name="nome" type="text" required value="${organization.getName()}" /> 
123                </div> 
124						 
125                <div class="bioec_profile-form-control"> 
126                    <label for="cidadeOrganizacao">Cidade</label> 
127                    <input id="cidadeOrganizacao" name="cidade" type="text" value="${DDMStructure_Text38119908.getData()}" /> 
128                </div> 
129							 
130                <div class="bioec_profile-form-control"> 
131                    <label for="estadoOrganizacao">Estado</label> 
132                    <input id="estadoOrganizacao" name="estado" type="text" value="${DDMStructure_Text87845472.getData()}" /> 
133                </div> 
134				 
135								 
136                <div class="bioec_profile-form-control"> 
137                    <label for="paisOrganizacao">País</label> 
138                    <input id="paisOrganizacao" name="pais" type="text" value="${DDMStructure_Text47038833.getData()}" /> 
139                </div> 
140								 
141            </div> 
142 
143            <h1 class="my-5">Informações digitais</h1> 
144 
145            <div class="bioec_profile-flex-container"> 
146                <div class="bioec_profile-form-control"> 
147                    <label for="siteOrganizacao">Site</label> 
148                    <input id="siteOrganizacao" name="site" type="url" value="${DDMStructure_Text98734375.getData()}" /> 
149                </div> 
150                <div class="bioec_profile-form-control"> 
151                    <label for="linkedinOrganizacao">Linkedin</label> 
152                    <input id="linkedinOrganizacao" name="linkedin" type="url" value="${DDMStructure_Text82629110.getData()}" /> 
153                </div> 
154                <#-- <div class="bioec_profile-form-control"> 
155                    <label>Instagram</label> 
156                    <input name="instagram" type="url" value="${Text28208517.getData()}" /> 
157                </div> 
158                <div class="bioec_profile-form-control"> 
159                    <label>Facebook</label> 
160                    <input name="facebook" type="url" value="${Text71851201.getData()}" /> 
161                </div> --> 
162            </div> 
163 
164            <h1 class="my-5">Campo de atuação</h1> 
165 
166            <div> 
167                <div class="bioec_profile-form-control"> 
168                    <label required for="sobreOrganizacao">Sobre a organização</label> 
169                    <textarea id="sobreOrganizacao" name="sobre" rows="5" >${DDMStructure_Text54730891.getData()}</textarea> 
170                </div> 
171 
172                <div class="bioec_profile-form-control"> 
173                    <label required for="competenciasOrganizacao">Competências tecnológicas</label> 
174                    <textarea id="competenciasOrganizacao" name="competencias" rows="5" >${DDMStructure_Text51537691.getData()}</textarea> 
175                </div> 
176								 
177                <div class="bioec_profile-form-control"> 
178                    <label required>Setores de atuação</label> 
179                    <select id="setores-de-atuacao" name="setores" multiple="multiple" style="width: 100%"> 
180                        <option value="Agroindústria">Agroindústria</option> 
181                        <option value="Água Potável e Saneamento">Água Potável e Saneamento</option> 
182                        <option value="Alimentos e Bebidas">Alimentos e Bebidas</option> 
183                        <option value="Análise de Ciclo de Vida">Análise de Ciclo de Vida</option> 
184                        <option value="Biotecnologia">Biotecnologia</option> 
185                        <option value="Educação">Educação</option> 
186                        <option value="Energia e Biocombustíveis">Energia e Biocombustíveis</option> 
187                        <option value="Higiene Pessoal, Perfumaria e Cosméticos">Higiene Pessoal, Perfumaria e Cosméticos</option> 
188                        <option value="Inovação">Inovação</option> 
189                    </select> 
190                </div> 
191								 
192							<!--	<h1 class="mt-5 mb-4">Você na organização</h1> 
193 
194								<div class="bioec_profile-flex-container"> 
195										<div class="bioec_profile-form-control"> 
196												<label>Cargo/Função</label> 
197												<input name="cargo" type="text" value="Administrador" /> 
198										</div> 
199								</div> --> 
200								 
201            </div> 
202 
203            <div class="d-flex justify-content-center my-5"> 
204                <button type="button" data-dismiss="modal" class="bioec_secondary_button mx-3" onclick="closeAndReset()">CANCELAR</a> 
205                <button type="button" class="bioec_primary_button mx-3" onclick="submitOrganization()">SALVAR</button> 
206            </div> 
207						 
208        </form> 
209				</div> 
210				</div> 
211				</div> 
212    </div> 
213		 
214			<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" /> 
215			<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.3/jquery.min.js" integrity="sha512-STof4xm1wgkfm7heWqFJVn58Hm3EtS31XFaagaa8VMReCXAkQnJZ+jEy8PCC/iT18dFy95WcExNHFTqLyp72eQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> 
216			<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script> 
217 
218<script> 
219 
220 
221function toggleSpecialFields(value) { 
222	if(value == "Investidor/Agência de Fomento") { 
223		$("#org-tipo-6").removeClass("d-none") 
224		$("#org-tipo-7").addClass("d-none") 
225	} else if(value == "Grupo de Pesquisa/Universidade") { 
226		$("#org-tipo-7").removeClass("d-none") 
227		$("#org-tipo-6").addClass("d-none") 
228	} else { 
229		$("#org-tipo-6").addClass("d-none") 
230		$("#org-tipo-7").addClass("d-none") 
231
232
233 
234$("#tipo-de-organizacao").change((obj) => { 
235	const v = obj.target.value 
236	toggleSpecialFields(v) 
237}); 
238 
239toggleSpecialFields(document.getElementById("tipo-de-organizacao").value) 
240 
241$(document).ready(() => { 
242	$("#setores-de-atuacao").select2({ 
243		language: { 
244			noResults: () => "Nenhum resultado encontrado", 
245		}, 
246		selectionCssClass: "bioec_multi_select", 
247	}); 
248	$("#setores-de-atuacao").val([${setores}]); 
249	$("#setores-de-atuacao").trigger('change'); 
250	 
251	let urlSearchParams = new URLSearchParams(window.location.search); 
252	 
253	if( urlSearchParams.has('popup_editar') == 1){ 
254		$('.bioec_editar').click(); 
255		urlSearchParams.delete('popup_editar');		 
256		if (history.replaceState) { 
257        let searchString = urlSearchParams.toString().length > 0 ? '?' + urlSearchParams.toString() : ''; 
258        let newUrl = window.location.protocol + "//" + window.location.host + window.location.pathname +  searchString + window.location.hash; 
259        history.replaceState(null, '', newUrl); 
260
261
262}); 
263 
264function validImageSize(base64="") { 
265	const decoded = atob(base64.substring(base64.indexOf(',') + 1)); 
266	const sizeMB = decoded.length / 1e+6; 
267	console.log("MB: " + decoded.length / 1e+6); 
268	if(sizeMB > 10) { 
269		Liferay.Util.openToast({ 
270			message: "O tamanho da imagem não deve ultrapassar 10 MB.", 
271			type: "danger", 
272			title: "", 
273			toastProps: { 
274				autoClose: 5000 
275
276    }) 
277		return false 
278
279	return true 
280
281 
282	function encodeImageAsURL(element) { 
283  	let file = element.files[0]; 
284    let reader = new FileReader(); 
285    reader.onloadend = () => { 
286			if(reader.result)   { 
287				if(!validImageSize(reader.result)) return; 
288				try { 
289				console.log("hi!") 
290					const pic_container = document.getElementById("orgPicContainer") 
291					const base64_input = document.getElementById("inputOrgBase64OrgModal") 
292					base64_input.value = reader.result 
293					pic_container.style.backgroundImage = 'url(' + reader.result + ')' 
294					const removeImageButton = document.getElementById( 
295						"removerImagemOrgModal" 
296					); 
297					const user_icon = document.getElementById("user-icon") 
298					user_icon.style.display = "none"; 
299					removeImageButton.classList.remove("d-none"); 
300				} catch (error) { 
301					console.error(error) 
302
303
304
305		reader.readAsDataURL(file); 
306
307	 
308	function removeImageOrgModal(element) { 
309		try { 
310			const file_input = document.getElementById("file-input"); 
311			const pic_container = document.getElementById("orgPicContainer") 
312			const base64_input = document.getElementById("inputOrgBase64OrgModal"); 
313 
314			file_input.value = null; 
315			base64_input.value = ""; 
316			pic_container.style.backgroundImage = null; 
317			 
318			const user_icon = document.getElementById("user-icon") 
319					user_icon.style.display = "block"; 
320 
321			const removeImageButton = document.getElementById("removerImagemOrgModal"); 
322			removeImageButton.classList.add("d-none"); 
323		} catch (error) { 
324			console.error(error); 
325
326
327 
328function openFileSelectImagem() { 
329	document.getElementById("file-input").click(); 
330
331 
332function initUrl(input, defaulthost) { 
333	const value = input.value; 
334	if(!value) { 
335		input.value = defaulthost; 
336
337
338 
339function submitForm() { 
340console.log("Tentativa de envio") 
341const form = document.getElementById("organization-form") 
342form.classList.add("submit-attempted") 
343
344 
345function closeAndReset() { 
346	document.getElementById("organization-form").reset(); 
347
348				 
349</script> 
350 
351<style> 
352 
353				.bioec_profile-form #removerImagemOrgModal {  
354					background: none; 
355					cursor: pointer; 
356					border: none; 
357					outline: none; 
358					color: #5b5c61; 
359					font-size: 16px; 
360					font-weight: 900; 
361					line-height: 24px; 
362					letter-spacing: 0em; 
363					width: fit-content; 
364					margin-left: 16px;  
365					margin-top: 22px; 
366
367 
368 
369				.bioec_profile-form h1 { 
370					font-weight: 400; 
371					font-size: 39px; 
372					line-height: 150%; 
373					color: #5B5C61; 
374
375 
376				.bioec_profile-form-control { 
377					margin-bottom: 40px; 
378
379 
380				.bioec_profile-form-control label { 
381					color: #5B5C61; 
382					font-size: 20px; 
383					font-weight: 700; 
384					line-height: 30px; 
385					margin-bottom: 8px; 
386
387 
388				.bioec_profile-form-control label[required]::before { 
389					content: "*"; 
390					color: #ff0000; 
391					margin-right: 0.4rem; 
392
393 
394				.bioec_profile-form-control input, 
395				.bioec_profile-form-control select { 
396					border-radius: 0; 
397					outline: none; 
398					border: none; 
399					border-bottom: 1px solid #BEBEBE; 
400					font-size: 16px; 
401					font-weight: 400; 
402					line-height: 24px; 
403					color: #5B5C61; 
404					width: 100%; 
405					background-color: transparent; 
406						padding: 2px; 
407						margin: 0; 
408
409 
410				.submit-attempted .bioec_profile-form-control input:invalid, 
411				.submit-attempted .bioec_profile-form-control select:invalid { 
412						border-bottom: 1px solid #ff0000; 
413
414 
415				.bioec_profile-flex-container { 
416					display: flex; 
417					flex-direction: row; 
418					justify-content: space-between; 
419					flex-wrap: wrap; 
420
421 
422				.bioec_profile-flex-container .bioec_profile-form-control { 
423					width: 50%; 
424					padding-right: 1.5rem; 
425
426 
427				.bioec_profile-form-control textarea { 
428					font-size: 16px; 
429					font-weight: 400; 
430					line-height: 24px; 
431					color: #5B5C61; 
432					width: 100%; 
433					background-color: transparent; 
434					border-radius: 0; 
435					border: 1px solid #BEBEBE; 
436					resize: none; 
437					outline: none; 
438					margin-top: 24px; 
439
440 
441				.bioec_form-picture-container { 
442						color: var(--white); 
443						background-color: #595A5F; 
444						border-radius: 50%; 
445						position: relative; 
446						display: flex; 
447						align-items: center; 
448						justify-content: center; 
449						padding: 35px; 
450						width: 180px; 
451						height: 180px; 
452						font-size: 100px; 
453						background-size: cover; 
454
455 
456				.bioec_form-picture-container[style] > i { 
457						display: none; 
458
459 
460				.bioec_form-picture-container button { 
461						position: absolute; 
462						right: 0; 
463						bottom: 0; 
464						color: var(--white); 
465						background-color: var(--color-3); 
466						height: 40px; 
467						width: 40px; 
468						border-radius: 50%; 
469						border: none; 
470						outline: none; 
471						display: flex; 
472						align-items: center; 
473						justify-content: center; 
474						padding: 0; 
475						font-size: 18px 
476
477 
478				.bioec_multi_select { 
479					font-size: 16px; 
480					font-weight: 400; 
481					line-height: 24px; 
482					color: #5B5C61; 
483					width: 100%; 
484					background-color: transparent; 
485					border-radius: 0 !important; 
486					border: 1px solid #BEBEBE !important; 
487					resize: none; 
488					outline: none; 
489					padding: 12px !important; 
490
491 
492				.bioec_multi_select .select2-selection__choice { 
493					background-color: transparent !important; 
494					margin-left: 12px !important; 
495						margin-top: 0px !important; 
496
497				 
498				.modal-header h1{ 
499				color: #5B5C61; 
500				margin-bottom: 0px; 
501				font-size: 25px; 
502				line-height: 58.5px; 
503				font-weight: 400; 
504
505 
506				@media (max-width: 768px) { 
507					.bioec_profile-flex-container .bioec_profile-form-control { 
508						margin-bottom: 1.5rem; 
509						width: 100%; 
510						padding-right: 0rem; 
511
512
513</style> 
514 
515<script> 
516 
517function deleteOrg() { 
518  Liferay.Util.openToast({message: "Enviando requisição",type: "info",title: ""});  
519 	fetch(Liferay.ThemeDisplay.getPortalURL() + "/o/profile-management/organization/${_CUSTOM_FIELD_organization.getData()}",  
520
521			method: "DELETE", 
522			headers: { 
523				"x-csrf-token": Liferay.authToken, 
524				"Content-Type": "application/json", 
525        "Accept": "application/json" 
526
527		}) 
528		.then( Liferay.Util.openToast({ 
529            message: "Estamos processando seu arquivo. Favor aguarde por alguns segundos e redireciorameos você automaticamente.", 
530            type: "success", 
531            title: "", 
532            toastProps: { 
533                autoClose: 2000 
534
535        })) 
536		.then(setTimeout(() => { window.location.href = Liferay.ThemeDisplay.getPortalURL() + "/meu-perfil#deleteOrg" }, 2000)) 
537		 
538		 
539 
540
541 
542		 
543function submitOrganization() { 
544  Liferay.Util.openToast({ 
545    message: "Enviando requisição", 
546    type: "info", 
547    title: "", 
548  }); 
549  console.log("submitOrganization"); 
550  let site = document.getElementById("siteOrganizacao").value; 
551  let linkedin = document.getElementById("linkedinOrganizacao").value; 
552 
553  if (site != "") { 
554    if ( 
555      !site.startsWith("https://") && 
556      !site.startsWith("http://") && 
557      !site.startsWith("https://www") && 
558      !site.startsWith("http://www") 
559    ) { 
560      Liferay.Util.openToast({ 
561        message: 
562          "O campo 'site' precisa começar com 'https://', 'http://', 'https://www' ou 'http://www' para ser válido", 
563        type: "danger", 
564        title: "", 
565        toastProps: { 
566          autoClose: 5000, 
567        }, 
568      }); 
569      return; 
570
571
572 
573  if (linkedin != "") { 
574    if ( 
575      !linkedin.startsWith("https://www.linkedin.com") && 
576      !site.startsWith("http://www.linkedin.com") && 
577      !linkedin.startsWith("https://linkedin.com") && 
578      !site.startsWith("http://linkedin.com") 
579    ) { 
580      Liferay.Util.openToast({ 
581        message: 
582          "O campo 'linkedin' precisa começar com 'https://www.linkedin.com' ou 'http://www.linkedin.com' com ou sem os 'www.' para ser válido", 
583        type: "danger", 
584        title: "", 
585        toastProps: { 
586          autoClose: 5000, 
587        }, 
588      }); 
589      return; 
590
591
592 
593  fetch( 
594    Liferay.ThemeDisplay.getPortalURL() + 
595      "/o/profile-management/organization/${_CUSTOM_FIELD_organization.getData()}", 
596
597      method: "PUT", 
598      headers: { 
599        "x-csrf-token": Liferay.authToken, 
600        "Content-Type": "application/json", 
601      }, 
602      body: JSON.stringify({ 
603        imagem: document.getElementById("inputOrgBase64OrgModal").value, 
604        tipo: document.getElementById("tipo-de-organizacao").value, 
605        nome: document.getElementById("nomeOrganizacao").value.trim(), 
606        cidade: document.getElementById("cidadeOrganizacao").value, 
607        estado: document.getElementById("estadoOrganizacao").value, 
608        pais: document.getElementById("paisOrganizacao").value, 
609        site: document.getElementById("siteOrganizacao").value, 
610        linkedin: document.getElementById("linkedinOrganizacao").value, 
611        sobre: document.getElementById("sobreOrganizacao").value, 
612        setores: $("#setores-de-atuacao").select2("val"), 
613        competencias: document.getElementById("competenciasOrganizacao").value, 
614        tipodeentidade: document.getElementById("tipodeentidadeOrganizacao") 
615          .value, 
616        instituicao: document.getElementById("instituicaoOrganizacao").value, 
617      }), 
618
619
620    .then( 
621      (response) => 
622        new Promise((resolve, reject) => { 
623          resolve({ 
624            status: response.status, 
625            ok: response.ok, 
626          }).then((r) => console.log(r)); 
627          reject({}).then((c) => console.log(c)); 
628        }) 
629
630    .then((res) => { 
631      if (res.status == "200") { 
632        Liferay.Util.openToast({ 
633          message: "Perfil alterado com sucesso.", 
634          type: "success", 
635          title: "", 
636          toastProps: { 
637            autoClose: 5000, 
638          }, 
639        }); 
640        location.reload(); 
641      } else if(res.status == "302"){ 
642			Liferay.Util.openToast({ 
643            message: "Cadastre uma organização com SITE diferente.", 
644            type: "danger", 
645            title: "Site inserido já existe", 
646            toastProps: { 
647                autoClose: 5000 
648
649        })  
650	} else if(res.status == "409"){ 
651			Liferay.Util.openToast({ 
652            message: "Cadastre uma organização com Nome da Organização diferente.", 
653            type: "danger", 
654            title: "Nome da Organização cadastrada já existe", 
655            toastProps: { 
656                autoClose: 5000 
657
658        }) 
659	}  
660    }) 
661    .catch((e) => console.log(e)); 
662
663 
664		 
665</script> 
666	 
667</#if> 
  • Sobre
  • Infraestruturas
  • Demandas
  • Ofertas
  • Publicações
Sobre drop zone
An error occurred while processing the template.
Java method "com.sun.proxy.$Proxy136.getOrganization(long)" threw an exception when invoked on com.sun.proxy.$Proxy136 object "com.liferay.portal.service.impl.OrganizationLocalServiceImpl@51e5b32a"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: organization = OrganizationLocalServi...  [in template "34764#34807#null" at line 15, column 17]
----
1<#assign  
2	OrganizationLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.OrganizationLocalService")  
3	JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") 
4/> 
5 
6<#assign  
7	viewerHasPrivileges = false 
8	userId = themeDisplay.getUserId() 
9/> 
10 
11<#if userId?? > 
12	<#assign  
13		orgId = _CUSTOM_FIELD_organization.getData()?number 
14		viewerHasPrivileges = OrganizationLocalService.hasUserOrganization(userId, orgId) 
15		organization = OrganizationLocalService.getOrganization(orgId) 
16	/> 
17</#if> 
18 
19 
20<#if viewerHasPrivileges || DDMStructure_Field04200031.getData() != "0"> 
21<#assign  
22	organization = OrganizationLocalService.getOrganization(_CUSTOM_FIELD_organization.getData()?number) 
23	articleId = organization.getExpandoBridge().getAttribute("journal-article") 
24	journalArticle = JournalArticleLocalService.getArticle(themeDisplay.getLayout().getGroupId(),articleId?c)  
25	articleXml = journalArticle.getDocument().getRootElement() 
26	 
27	setores = articleXml.selectNodes("dynamic-element[@name='Text67772680']") 
28/> 
29<#else> 
30<#assign setores = ["privado"] /> 
31</#if> 
32 
33<#assign  
34 
35	sobre = (viewerHasPrivileges || DDMStructure_Field80037203.getData()!="0")?string(DDMStructure_Text54730891.getData()!"","") 
36	competencias = (viewerHasPrivileges || DDMStructure_Field75645729.getData()!="0")?string(DDMStructure_Text51537691.getData()!"","") 
37	 
38
39 
40<div> 
41 
42				<#if viewerHasPrivileges || DDMStructure_Field80037203.getData()!="0" > 
43					<div class="bioec_org_sobre"> 
44							<label>Sobre a organização</label> 
45							<div class="bioec_org_sobre_container"> 
46								<#if sobre != ""> 
47									${sobre} 
48								<#else> 
49									<div class="bioec_org_sobre_vazio"> 
50											Nenhuma descrição foi adicionada neste perfil ainda 
51									</div> 
52								</#if> 
53							</div> 
54					</div> 
55				</#if> 
56				 
57				<#if viewerHasPrivileges || DDMStructure_Field75645729.getData()!="0" > 
58					<div class="bioec_org_sobre"> 
59							<label>Competências tecnológicas</label> 
60							<div class="bioec_org_sobre_container"> 
61									<#if competencias != ""> 
62										${competencias} 
63									<#else> 
64										<div class="bioec_org_sobre_vazio"> 
65												Nenhuma descrição foi adicionada neste perfil ainda 
66										</div> 
67									</#if> 
68							</div> 
69					</div> 
70				</#if> 
71					 
72				<#if viewerHasPrivileges || DDMStructure_Field04200031.getData()!="0" > 
73					<div class="bioec_org_sobre"> 
74							<label>Setor(es) de atuação</label> 
75							<div class="bioec_org_sobre_container"> 
76							<#if setores[0]!="privado"> 
77									<#if setores?size == 1 && setores[0].getStringValue()?trim == "" > 
78										<div class="bioec_org_sobre_vazio"> 
79												Nenhum setor foi adicionado neste perfil ainda 
80										</div> 
81									<#else> 
82										<#if setores?size != 0 > 
83											<ul> 
84												<#list setores as setor> 
85													<li>${setor.getStringValue()}</li> 
86												</#list> 
87											</ul> 
88										<#else> 
89											<div class="bioec_org_sobre_vazio"> 
90													Nenhum setor foi adicionado neste perfil ainda 
91											</div> 
92										</#if> 
93									</#if> 
94								<#else> 
95								<div class="bioec_org_sobre_vazio"> 
96									Nenhum setor foi adicionado neste perfil ainda 
97								</div> 
98								</#if> 
99							</div> 
100					</div> 
101				</#if> 
102				 
103</div> 
104 
105<style> 
106.bioec_org_sobre label { 
107	color: #5B5C61; 
108	font-weight: 700; 
109	margin-bottom: 10px; 
110	font-size: 20px; 
111	line-height: 30px; 
112
113 
114.bioec_org_sobre_container { 
115	font-size: 16px; 
116	border: 1px solid #BEBEBE; 
117	padding: 24px; 
118	color: #5B5C61; 
119	margin-bottom: 40px; 
120
121 
122.bioec_org_sobre_vazio { 
123	color: #5B5C61; 
124	font-size: 16px; 
125	text-align: center; 
126	font-weight: 700; 
127
128 
129.bioec_org_sobre_container ul { 
130	color: #5B5C61; 
131	margin: 0; 
132
133</style> 
An error occurred while processing the template.
Java method "com.sun.proxy.$Proxy136.getOrganization(long)" threw an exception when invoked on com.sun.proxy.$Proxy136 object "com.liferay.portal.service.impl.OrganizationLocalServiceImpl@51e5b32a"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: organization = OrganizationLocalServi...  [in template "34764#34807#null" at line 22, column 9]
----
1<#assign  
2	viewerHasPrivileges = false 
3	userId = themeDisplay.getUserId() 
4/> 
5<#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 
6<#if userId?? > 
7	<#assign  
8		OrganizationLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.OrganizationLocalService") 
9	/> 
10	<#assign  
11		orgId = _CUSTOM_FIELD_organization.getData()?number 
12		viewerHasPrivileges = OrganizationLocalService.hasUserOrganization(userId, orgId) 
13	/> 
14</#if> 
15 
16<#assign  
17	UserLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.UserLocalService") 
18/> 
19<#assign  
20	orgId = _CUSTOM_FIELD_organization.getData()?number 
21	users = UserLocalService.getOrganizationUsers(orgId) 
22	organization = OrganizationLocalService.getOrganization(orgId) 
23	nomeDaOrg = organization.getName()!"" 
24/> 
25 
26<div class="bioec_org_admins"> 
27		<label>Administradores desse perfil</label> 
28 
29		<#list users as user> 
30		<#assign userArticleId = user.getExpandoBridge().getAttribute("journal-article")!"0" > 
31		 
32		<#assign urlWC = ""> 
33		<#if userArticleId != "0" && userArticleId != ""> 
34		<#assign userArticle = JournalArticleLocalService.getLatestArticle(themeDisplay.getLayout().getGroupId(), userArticleId?string) > 
35		<#assign urlWC = userArticle.getUrlTitle()!""> 
36		</#if> 
37		 
38		 
39			<#assign  
40				nome = user.getFullName() 
41			/> 
42			<div class="bioec_org_admin_container"> 
43				<div class="bioec_org_admin_img_placeholder"> 
44					<i class="fa-solid fa-user"></i> 
45				</div> 
46				<div class="bioec_org_admin_content"> 
47					<b><a style="color: #5B5C61;" href="<#if urlWC != ''>/w/${urlWC}</#if>">${nome}</a></b> 
48					Administrador 
49				</div> 
50				<#if viewerHasPrivileges> 
51				<div class="bioec_org_admin_buttons_container"> 
52					<#if userId != user.getUserId() > 
53						<button class="bioec_org_admin_button d-none" data-toggle="modal" data-target="#bioec-admin-modal"> 
54							<i class="fa-solid fa-pen-to-square"></i> 
55						</button> 
56						<button class="bioec_org_admin_button" onclick="removeAdminFromOrg(${user.getUserId()})"> 
57							<i class="fa-solid fa-trash-can"></i> 
58						</button> 
59					</#if> 
60				</div> 
61				</#if> 
62			</div> 
63		</#list> 
64 
65	<#if viewerHasPrivileges> 
66		<div class="bioec_org_flex_end"> 
67			<#if (1 < users?size)> 
68			<button class="bioec_secondary_button mx-3 mb-4 mb-md-0" data-toggle="modal" data-target="#bioec-leave-modal">DEIXAR DE SER ADMINISTRADOR</button> 
69			</#if> 
70			<button class="bioec_primary_button bioec_modal-adicionar" data-toggle="modal" data-target="#bioec-admin-modal">ADICIONAR ADMINISTRADOR</button> 
71		</div> 
72 
73		<#-- MODAL DE ADICIONAR ADMINISTRADOR --> 
74		<div id="bioec-admin-modal" class="modal fade" style="display: none;" role="dialog" aria-hidden="true"> 
75			<div class="modal-dialog modal-lg" role="document"> 
76				<div class="modal-content"> 
77					<div class="py-3 px-4 d-flex justify-content-between bioec_modal-line"> 
78						<div class="bioec_modal-title">Adicionar administrador</div> 
79						<button type="button" class="close" data-dismiss="modal" aria-label="Close"> 
80							<i class="fa-solid fa-xmark"></i> 
81						</button> 
82					</div> 
83					<div class="bioec_modal-form"> 
84						<div class="py-3 px-4 bioec_modal-line"> 
85							<h1>${title.getData()}</h1> 
86							<div class="bioec_modal-form-control">  
87								<label>E-mail do administrador</label>  
88								<input id="admin-email" type="text" placeholder="Digite aqui" value="" >  
89							</div> 
90							<div class="bioec_modal-form-control d-none">  
91								<label>Cargo/Função</label>  
92								<input id="admin-role" type="text" placeholder="Digite aqui" value="" >  
93							</div> 
94						</div> 
95						<div class="py-3 px-4 d-flex justify-content-end"> 
96							<button type="button" class="bioec_secondary_button mx-3" data-dismiss="modal">CANCELAR</button> 
97							<button type="button" class="bioec_primary_button" onclick="addAdminToOrg()">CONTINUAR</button> 
98						</div> 
99					</div> 
100				</div> 
101			</div> 
102		</div> 
103		 
104		<#-- MODAL DE DEIXAR ORGANIZAÇÃO --> 
105		<div id="bioec-leave-modal" class="modal fade" style="display: none;" role="dialog" aria-hidden="true"> 
106			<div class="modal-dialog modal-lg" role="document"> 
107				<div class="modal-content px-4 py-4"> 
108					<div class="d-flex justify-content-between"> 
109						<h5 class="modal-title">Deixar de ser administrador</h5> 
110						<button type="button" class="close" data-dismiss="modal" aria-label="Close"> 
111							<span aria-hidden="true">&times;</span> 
112						</button> 
113					</div> 
114					<div class="my-3"> 
115						<div class="mb-3"> 
116							${title.getData()} 
117						</div> 
118						Ao clicar em continuar, a organização será removida do seu perfil. Caso possua outros administradores, ela continuará nos perfis desses usuários. 
119					</div> 
120					<div class="d-flex justify-content-end"> 
121						<button type="button" class="bioec_secondary_button mx-3" data-dismiss="modal">CANCELAR</button> 
122						<button type="button" class="bioec_primary_button" onclick="quitOrganization()" >CONTINUAR</button> 
123					</div> 
124				</div> 
125			</div> 
126		</div> 
127		 
128	</#if> 
129</div> 
130 
131<script> 
132 
133$(document).ready(() => { 
134		let urlSearchParams = new URLSearchParams(window.location.search); 
135	 
136		if( urlSearchParams.has('popup_adicionar_admin') == 1){ 
137		$('.bioec_modal-adicionar').click(); 
138		urlSearchParams.delete("popup_adicionar_admin"); 
139		if (history.replaceState) { 
140        let searchString = urlSearchParams.toString().length > 0 ? '?' + urlSearchParams.toString() : ''; 
141        let newUrl = window.location.protocol + "//" + window.location.host + window.location.pathname +  searchString + window.location.hash; 
142        history.replaceState(null, '', newUrl); 
143
144
145}); 
146 
147 
148 
149 
150function quitOrganization() { 
151			const url = Liferay.ThemeDisplay.getPortalURL() + "/o/profile-management/organization/${_CUSTOM_FIELD_organization.getData()}/user/" + ${userId} 
152		fetch(url, { 
153			method: 'DELETE', 
154			"headers": { 
155				"x-csrf-token": Liferay.authToken, 
156				"Content-Type": "application/json" 
157
158		}) 
159			.then(res => { 
160			if(res.status == "200"){ 
161				Liferay.Util.openToast({ 
162						message: "Você deixou de ser Administrador", 
163						type: "success", 
164						title: "", 
165						toastProps: { 
166								autoClose: 5000 
167
168				}) 
169			location.reload(); 
170			} else {throw "err";} 
171		}) 
172		.catch(() => showErrorToast("Não foi possível adicionar o administrador. Verifique o email e tente novamente")) 
173
174 
175function removeAdminFromOrg(userId) { 
176	console.log(userId) 
177	if(userId) { 
178		const url = Liferay.ThemeDisplay.getPortalURL() + "/o/profile-management/organization/${_CUSTOM_FIELD_organization.getData()}/user/" + userId 
179		fetch(url, { 
180			method: 'DELETE', 
181			"headers": { 
182				"x-csrf-token": Liferay.authToken, 
183				"Content-Type": "application/json" 
184
185		}) 
186		.then(res => { 
187			if(res.status == "200"){ 
188				Liferay.Util.openToast({ 
189					message: "Administrador deletado com sucesso.", 
190					type: "success", 
191					title: "", 
192					toastProps: { 
193							autoClose: 5000 
194
195			}) 
196			location.reload(); 
197			} else {throw "err";} 
198		}) 
199		.catch(() => showErrorToast("Não foi possível adicionar o administrador. Verifique o email e tente novamente")) 
200
201
202 
203function addAdminToOrg() { 
204	const userEmail = document.getElementById("admin-email").value 
205	console.log(userEmail) 
206	if(userEmail) { 
207		const url = Liferay.ThemeDisplay.getPortalURL() + "/o/profile-management/organization/${_CUSTOM_FIELD_organization.getData()}/user/" + userEmail 
208		fetch(url, { 
209			method: 'POST', 
210			"headers": { 
211				"x-csrf-token": Liferay.authToken, 
212				"Content-Type": "application/json" 
213
214		}) 
215		.then(res => { 
216			if(res.status == "200"){ 
217				Liferay.Util.openToast({ 
218						message: "Administrador adicionado com sucesso.", 
219						type: "success", 
220						title: "", 
221						toastProps: { 
222								autoClose: 5000 
223
224				}) 
225			location.reload(); 
226				gtag('event', 'admnistrador_registrado', { 
227				"orgName" : "${nomeDaOrg}" 
228				}); 
229			} else {throw "err";} 
230		}) 
231		.catch(() => showErrorToast("Não foi possível adicionar o administrador. Verifique o email e tente novamente")) 
232
233
234 
235const showErrorToast = message => { 
236        Liferay.Util.openToast({ 
237            message, 
238            type: "danger", 
239            title: "", 
240            toastProps: { 
241                autoClose: 5000, 
242                style: { top: 0 }, 
243
244        }) 
245
246	 
247</script> 
248 
249<style> 
250	.bioec_org_admins { 
251		margin-bottom: 40px; 
252
253 
254	.bioec_org_admins label { 
255		color: #5B5C61; 
256		font-weight: 700; 
257		margin-bottom: 10px; 
258		font-size: 20px; 
259		line-height: 30px; 
260
261 
262	.bioec_org_admin_container { 
263		border: 1px solid #BEBEBE; 
264		padding: 24px; 
265			margin-bottom: 25px; 
266			display: flex; 
267			flex-direction: row; 
268			align-items: center; 
269
270 
271	.bioec_org_flex_end { 
272			display: flex; 
273			flex-direction: row; 
274			align-items: center; 
275			justify-content: end; 
276
277 
278	.bioec_org_admin_img_placeholder { 
279			align-self: center; 
280			height: 48px; 
281			width: 48px; 
282			background-color: #595A5F; 
283			border-radius: 50%; 
284			display: flex; 
285			align-items: center; 
286			justify-content: center; 
287			color: var(--white-1); 
288			font-size: 28px; 
289
290 
291	.bioec_org_admin_content { 
292			font-size: 16px; 
293			color: #5B5C61; 
294			flex: 1; 
295			margin: 0 12px; 
296
297 
298	.bioec_org_admin_content b { 
299			display: block; 
300
301 
302	.bioec_org_admin_button { 
303			color: var(--white-1); 
304			background-color: #595A5F; 
305			border-radius: 8px; 
306			border: none; 
307			outline: none; 
308			width: 34px; 
309			height: 34px; 
310			font-size: 16px; 
311			padding: 0px; 
312			margin-left: 12px; 
313
314 
315	.bioec_org_admin_buttons_container { 
316			display: flex; 
317			flex-direction: row; 
318
319	 
320	.bioec_modal-title { 
321		font-weight: 700; 
322		font-size: 20px; 
323		color: #5B5C61; 
324
325	 
326	.bioec_modal-line { 
327		border-bottom: 1px solid #E8ECEF; 
328
329	 
330	.bioec_modal-form h1 { 
331		font-weight: 400; 
332		font-size: 24px; 
333		line-height: 150%; 
334		color: #5B5C61; 
335		margin-bottom: 40px; 
336
337 
338	.bioec_modal-form-control { 
339		margin-bottom: 24px; 
340
341 
342	.bioec_modal-form-control label { 
343		color: #5B5C61; 
344		font-size: 20px; 
345		font-weight: 700; 
346		line-height: 30px; 
347		margin-bottom: 8px; 
348
349 
350				.bioec_modal-form-control label[required]::before { 
351					content: "*"; 
352					color: #ff0000; 
353					margin-right: 0.4rem; 
354
355 
356				.bioec_modal-form-control input { 
357					border-radius: 0; 
358					outline: none; 
359					border: none; 
360					border-bottom: 1px solid #BEBEBE; 
361					font-size: 16px; 
362					font-weight: 400; 
363					line-height: 24px; 
364					color: #5B5C61; 
365					width: 100%; 
366					background-color: transparent; 
367					padding: 2px; 
368					margin: 0; 
369
370 
371	@media (max-width: 767px) { 
372			.bioec_org_admin_buttons_container { 
373					flex-direction: column; 
374
375			.bioec_org_admin_button { 
376					margin-bottom: 12px; 
377
378			.bioec_org_flex_end { 
379					flex-direction: column; 
380					align-items: center; 
381
382
383</style> 
Infraestruturas drop zone
Portlet is temporarily unavailable.
Demandas drop zone
Portlet is temporarily unavailable.
Ofertas drop zone
Portlet is temporarily unavailable.
Publicações drop zone
Portlet is temporarily unavailable.
  • Sobre
  • Infraestruturas
  • Demandas
  • Ofertas
  • Publicações
Portlet is temporarily unavailable.
Portlet is temporarily unavailable.
Portlet is temporarily unavailable.
Portlet is temporarily unavailable.
Portlet is temporarily unavailable.