anchor.diff:  								
   								
   								%>
  -									<div 
  -										id='<%=renderResponse.getNamespace() + "row-" + dossierPart.getDossierpartId() + StringPool.DASH + index %>' 
  -										index="<%=index %>"
  -										dossier-part="<%=dossierPart.getDossierpartId() %>"
  -										class="opencps dossiermgt dossier-part-row"
  -									>
  +									<div class='<%="opencps dossiermgt dossier-part-row r-" + index%>'>
   										<span class='<%="level-" + level + " opencps dossiermgt dossier-part"%>'>
   											<span class="row-icon">
  -												<i 
  -													id='<%="rowcheck" + dossierPart.getDossierpartId() + StringPool.DASH + index %>' 
  -													class='<%=dossierFile != null &&  dossierFile.getFileEntryId() > 0 ? "fa fa-check-square-o" : "fa fa-square-o" %>' 
  -													aria-hidden="true"
  -												>
  -												</i>
  +												<c:choose>
  +													<c:when test="<%=(partType == PortletConstants.DOSSIER_PART_TYPE_OPTION ||
  +														partType == PortletConstants.DOSSIER_PART_TYPE_OTHER) && level == 0%>"
  +													>
  +														<i class="fa fa-dot-circle-o" aria-hidden="true"></i>
  +													</c:when>
  +													<c:otherwise>
  +													<i 
  +														id='<%="rowcheck" + dossierPart.getDossierpartId() + StringPool.DASH + index %>' 
  +														class='<%=dossierFile != null &&  dossierFile.getFileEntryId() > 0 ? "fa fa-check-square-o" : "fa fa-square-o" %>' 
  +														aria-hidden="true"
  +													>
  +													</i>
  +													</c:otherwise>
  +												</c:choose>
  +												
   											</span>
   											<span class="opencps dossiermgt dossier-part-name">
   												<%=dossierPart.getPartName() %>
  
positive.code: 		<portlet:namespace/>openDossierDialog(portletURL.toString(), '<portlet:namespace />dynamicForm','<%= UnicodeLanguageUtil.get(pageContext, "declaration-online") %>');
  	});
  
  	
  	Liferay.provide(window, '<portlet:namespace/>uploadFile', function(e) {
  		
  		var A = AUI();
  		
  		var instance = A.one(e);
  		
  		var dossierId = instance.attr('dossier');
  		
  		var dossierPartId = instance.attr('dossier-part');
  		
  		var dossierFileId = instance.attr('dossier-file');
  		
  		var index = instance.attr('index');
  		
  		var groupName = instance.attr('group-name');
  		
  		var fileName = instance.attr('file-name');
  		
  		var level = instance.attr('level');
  		
  		var partType = instance.attr('part-type');
  		
  		var templateFileNo = instance.attr('template-no');
  		
  		var fileUpload = A.one('#<portlet:namespace/>fileUpload' + dossierPartId + '-' + index);
  		
  		if(fileUpload && parseInt(fileUpload.val()) > 0){
  			alert('<%=UnicodeLanguageUtil.get(pageContext, "remove-old-file-before-upload")%>');
  			return;
  		}
  		
  		var portletURL = Liferay.PortletURL.createURL('<%= PortletURLFactoryUtil.create(request, WebKeys.DOSSIER_MGT_PORTLET, themeDisplay.getPlid(), PortletRequest.RENDER_PHASE) %>');
  		portletURL.setParameter("mvcPath", "/html/portlets/dossiermgt/frontoffice/upload_dossier_file.jsp");
  		portletURL.setWindowState("<%=LiferayWindowState.POP_UP.toString()%>"); 
  		portletURL.setPortletMode("normal");
  		portletURL.setParameter("dossierId", dossierId);
  		portletURL.setParameter("dossierPartId", dossierPartId);
  		portletURL.setParameter("index", index);
  		portletURL.setParameter("level", level);
  		portletURL.setParameter("groupName", groupName);
  		portletURL.setParameter("fileName", fileName);
  		portletURL.setParameter("templateFileNo", templateFileNo);
  		portletURL.setParameter("dossierFileId", dossierFileId);
  		portletURL.setParameter("partType", partType);
  		<portlet:namespace/>openDossierDialog(portletURL.toString(), '<portlet:namespace />dossierFileId','<%= UnicodeLanguageUtil.get(pageContext, "upload-dossier-file") %>');
  	});
  
  	Liferay.provide(window, '<portlet:namespace/>openDossierDialog', function(uri, id, title) {
  		var dossierFileDialog = Liferay.Util.openWindow(
  			{
  				dialog: {
  					cache: false,
  					cssClass: 'opencps-dossiermgt-upload-dossier-file',
  					modal: true,
  					
  				},
  				cache: false,
  				id: id,
  				title: title,
  				uri: uri
  				
  			},function(evt){
  				
  			}
  		);
  	});
  	
  	Liferay.provide(window, '<portlet:namespace/>renderPrivateDossierGroup', function(dossierPartId, index, groupName) {
  		var A = AUI();
  		var portletURL = Liferay.PortletURL.createURL('<%= PortletURLFactoryUtil.create(request, WebKeys.DOSSIER_MGT_PORTLET, themeDisplay.getPlid(), PortletRequest.RENDER_PHASE) %>');
  			portletURL.setParameter("mvcPath", "/html/portlets/dossiermgt/frontoffice/render_private_dossier_part.jsp");
  			portletURL.setWindowState("<%=LiferayWindowState.EXCLUSIVE.toString()%>"); 
  			portletURL.setPortletMode("normal");
  			portletURL.setParameter("dossierPartId", dossierPartId);
  			portletURL.setParameter("index", index);
  			portletURL.setParameter("groupName", groupName);
  			
  		A.io.request(
  			portletURL.toString(),
  			{
  				on: {
  					success: function(event, id, obj) {
  						var response = this.get('responseData');
  						var tree = A.one('#<portlet:namespace />tree' + dossierPartId);
  		
  						if(tree){
  							tree.append(response);
  							privateDossierGroup.push(groupName);
  						}
  					}
  				}
  			}
  		);
  	},['aui-io','liferay-portlet-url']);
  	
  	Liferay.on('getPrivateDossierGroupSchema',function(event) {
  		
  		var A = AUI();
  		
  		var schema = event.responseData;
  		
  		var groupName = schema.groupName;
  		
  		var dossierPartId = schema.dossierPartId;
  		
  		var index = schema.index;
  		
  		var size = schema.size;
  		
  		A.one('#<portlet:namespace/>curIndex').val(parseInt(index) + parseInt(size));
  		
  		<portlet:namespace/>renderPrivateDossierGroup(dossierPartId, index, groupName);
  		
  	},['aui-io']);
  	
  	Liferay.on('getDynamicFormDataSchema',function(event) {
  		
  		var A = AUI();
  		
  		var schema = event.responseData;
  		
  		var dossierPartId = schema.dossierPartId;
  		
  		var index = schema.index;
  		
  		var formData = schema.formData;
  		
  		var uploadDataSchema = A.one('#<portlet:namespace/>uploadDataSchema' + dossierPartId + '-' + index);
  		
  		var data = uploadDataSchema.val();
  		
  		if(data != ''){
  			data = JSON.parse(data);
  			data.formData = formData;
  		}else{
  			var object = new Object();
  			object.formData = formData;
  			data = object;
  		}
  				
  		uploadDataSchema.val(JSON.stringify(data));
  		
  	});
  	
  	Liferay.on('getUploadDataSchema',function(event) {
  		
  		var A = AUI();
  		 
  		var schema = event.responseData;
  		
  		if(schema){
  
  			var index = schema.index;
  			
  			var displayName = schema.displayName;
  			
  			var dossierPartId = schema.dossierPartId;
  			
  			var level = schema.level;
  			
  			var fileEntryId = schema.fileEntryId;
  			
  			var dossierFileId = schema.dossierFileId;
  			
  			var partType = schema.partType;
  			
  			if(partType == '<%=PortletConstants.DOSSIER_PART_TYPE_OTHER%>' && parseInt(level) == 0){
  				var index = parseInt(A.one('#<portlet:namespace/>curIndex').val()) + 1;
  				var portletURL = Liferay.PortletURL.createURL('<%= PortletURLFactoryUtil.create(request, WebKeys.DOSSIER_MGT_PORTLET, themeDisplay.getPlid(), PortletRequest.RENDER_PHASE) %>');
  					portletURL.setParameter("mvcPath", "/html/portlets/dossiermgt/frontoffice/render_other_dossier_part.jsp");
  					portletURL.setWindowState("<%=LiferayWindowState.EXCLUSIVE.toString()%>"); 
  					portletURL.setPortletMode("normal");
  					portletURL.setParameter("dossierPartId", dossierPartId);
  					portletURL.setParameter("index", index);
  					portletURL.setParameter("displayName", displayName);
  				
  				A.io.request(
  					portletURL.toString(),
  					{
  						on: {
  							success: function(event, id, obj) {
  								var response = this.get('responseData');
  								
  								var tree = A.one('#<portlet:namespace />tree' + dossierPartId);
  								
  								if(tree){
  									tree.append(response);
  								}
  								
  								A.one('#<portlet:namespace/>curIndex').val(index);
  								
  								<portlet:namespace/>rePaintStatus(schema, dossierPartId, dossierFileId, fileEntryId, index);
  							}
  						}
  					}
  				);
  			}
  			
  	
  			if(partType != '<%=PortletConstants.DOSSIER_PART_TYPE_OTHER%>'){
  				
  				<portlet:namespace/>rePaintStatus(schema, dossierPartId, dossierFileId, fileEntryId, index);
  			}			
  		}
  	},['aui-io','liferay-portlet-url']);
  	
  	Liferay.provide(window, '<portlet:namespace/>rePaintStatus', function(schema, dossierPartId, dossierFileId, fileEntryId, index) {
  		var A = AUI();
  		
  		var uploadDataSchema = A.one('#<portlet:namespace/>uploadDataSchema' + dossierPartId + '-' + index);
  		
  		var fileUpload = A.one('#<portlet:namespace/>fileUpload' + dossierPartId + '-' + index);
  		
  		var dossierFile = A.one('#<portlet:namespace/>dossierFile' + dossierPartId + '-' + index);
  		
  		if(fileUpload && parseInt(fileEntryId) > 0){
  			tempFileEntryIds.push(fileEntryId);
  			fileUpload.val(fileEntryId);
  		}
  		
  		if(dossierFile){
  			dossierFile.val(dossierFileId);
  		}
  			 
  		var counterLabel = A.one('.alias-' + dossierPartId + '-' + index);
  			 
  		if(counterLabel){
  			counterLabel.text(1);
  		}
  		
  		if(uploadDataSchema){
  			
  			var rowcheck = A.one('#rowcheck' + dossierPartId + '-' + index);
  			
  			if(uploadDataSchema.val() == ''){
  				uploadDataSchema.val(JSON.stringify(schema));
  			}else{
  				var formData = JSON.parse(uploadDataSchema.val());
  				schema.formData = formData.formData;
  				uploadDataSchema.val(JSON.stringify(schema));
  			}
  			
  			rowcheck.replaceClass('fa-square-o', 'fa-check-square-o');
  		}
  	});
  </aui:script>
  
negative.code: 													value="<%=String.valueOf(dossierFile != null ? dossierFile.getDossierFileId() : 0) %>"
  												/>
  												<portlet:param 
  													name="<%=DossierFileDisplayTerms.LEVEL %>" 
  													value="<%=String.valueOf(level) %>"
  												/>
  												<portlet:param 
  													name="<%=DossierFileDisplayTerms.GROUP_NAME %>" 
  													value="<%=StringPool.BLANK%>"
  												/>
  												<portlet:param 
  													name="<%=DossierFileDisplayTerms.PART_TYPE %>" 
  