anchor.diff:  	}
   	%>
   	 
  -	 <liferay-ui:panel title="activity-constraints" collapsible="true" defaultState="<%=actCondefaultState %>">
  -	   
  -	    <script type="text/javascript">
  -
  -
  -		    
  -		    function setStarDateState(){
  -		    	AUI().use('node',function(A) {
  -			    	var enabled = document.getElementById('<%=renderResponse.getNamespace() %>startdate-enabledCheckbox').checked; 
  -		    		var selector = 'form[name="<%=renderResponse.getNamespace() %>fm"]';
  -		    		
  -		    		if(enabled) {
  -		    			A.all("#startDate").one(".aui-datepicker-button-wrapper").show();
  -		    			A.all("#startDate").one("#startDateSpan").removeClass('aui-helper-hidden');
  -		    		}else {
  -		    			A.all("#startDate").one(".aui-datepicker-button-wrapper").hide();
  -		    			A.all("#startDate").one("#startDateSpan").addClass('aui-helper-hidden');
  -		    		}
  -		    	});
  -		    }
  -		    
  -		    function setStopDateState(){
  -		    	AUI().use('node',function(A) {
  -			    	var enabled = document.getElementById('<%=renderResponse.getNamespace() %>stopdate-enabledCheckbox').checked; 
  -
  -		    		var selector = 'form[name="<%=renderResponse.getNamespace() %>fm"]';
  -		    		
  -		    		if(enabled) {
  -		    			A.all("#endDate").one(".aui-datepicker-button-wrapper").show();
  -		    			A.all("#endDate").one("#endDateSpan").removeClass('aui-helper-hidden');
  -		    		}else {
  -		    			A.all("#endDate").one(".aui-datepicker-button-wrapper").hide();
  -		    			A.all("#endDate").one("#endDateSpan").addClass('aui-helper-hidden');
  -		    		}
  -		    	});
  -		    }
  -
  -	    </script>
  +	<div id="<portlet:namespace />restrictions" style="display:none">
  +		<liferay-ui:panel title="activity-constraints" collapsible="true" defaultState="<%=actCondefaultState %>">
  +		    <script type="text/javascript">
  +	
  +	
  +			    
  +			    function setStarDateState(){
  +			    	AUI().use('node',function(A) {
  +				    	var enabled = document.getElementById('<%=renderResponse.getNamespace() %>startdate-enabledCheckbox').checked; 
  +			    		var selector = 'form[name="<%=renderResponse.getNamespace() %>fm"]';
  +			    		
  +			    		if(enabled) {
  +			    			A.all("#startDate").one(".aui-datepicker-button-wrapper").show();
  +			    			A.all("#startDate").one("#startDateSpan").removeClass('aui-helper-hidden');
  +			    		}else {
  +			    			A.all("#startDate").one(".aui-datepicker-button-wrapper").hide();
  +			    			A.all("#startDate").one("#startDateSpan").addClass('aui-helper-hidden');
  +			    		}
  +			    	});
  +			    }
  +			    
  +			    function setStopDateState(){
  +			    	AUI().use('node',function(A) {
  +				    	var enabled = document.getElementById('<%=renderResponse.getNamespace() %>stopdate-enabledCheckbox').checked; 
  +	
  +			    		var selector = 'form[name="<%=renderResponse.getNamespace() %>fm"]';
  +			    		
  +			    		if(enabled) {
  +			    			A.all("#endDate").one(".aui-datepicker-button-wrapper").show();
  +			    			A.all("#endDate").one("#endDateSpan").removeClass('aui-helper-hidden');
  +			    		}else {
  +			    			A.all("#endDate").one(".aui-datepicker-button-wrapper").hide();
  +			    			A.all("#endDate").one("#endDateSpan").addClass('aui-helper-hidden');
  +			    		}
  +			    	});
  +			    }
  +	
  +		    </script>
   		<div id="startDate">
   			<aui:field-wrapper label="start-date">
   				<% if (!larntype.hasMandatoryDates()) { %>
  
positive.code:             }
  		}
  	});
  	A.one('#<portlet:namespace/>resModuleId').scrollIntoView();
  });
  
  
  
negative.code: 		<aui:button  type="cancel" value="canceledition" />
  	</aui:button-row>
  </aui:form>
   <liferay-ui:success key="activity-saved-successfully" message="activity-saved-successfully" />
  <%
  	if (isCourse){
  	%>
  		<script type="text/javascript">
  			AUI().ready(function(A) {
  				if(A.one('#<portlet:namespace/>mandatorylabel')){
  					A.one('#<portlet:namespace/>mandatorylabel').setStyle('display', 'block');
  				}
  				if(A.one('#<portlet:namespace/>resModuleId')){
  					A.one('#<portlet:namespace/>resModuleId').show();
  				}
  				if(A.one('#<portlet:namespace/>restrictions')){
  					A.one('#<portlet:namespace/>restrictions').setStyle('display', 'block');
  				}
  				if(A.one('#<portlet:namespace/>activity')){
  					A.one('#<portlet:namespace/>activity').setStyle('display', 'block');
  				}
  			});
  		</script>
  	<%
  	}
  %>