Source

elgg_assemblies / views / default / assemblies / forms / edit_assembly.php

The default branch has multiple heads

Full commit
<div class="contentWrapper">
<?php
//if(!empty($vars['entity'])){

	$form_body.= "<p><label>".elgg_echo('date').'<br />'.
		elgg_view('input/datepicker', array('internalname'=>'date'))."</label></p>";
	$form_body.= "<p><label>".elgg_echo('event_calendar:start_time_label').'<br />'.
		elgg_view('input/timepicker', array('internalname'=>'time_ini'))."</label></p>";
	$form_body.= "<p><label>".elgg_echo('event_calendar:end_time_label').'<br />'.
		elgg_view('input/timepicker', array('internalname'=>'time_end'))."</label></p>";

	$form_body.= "<p><label>".elgg_echo("assembly:place").'<br />'.
		elgg_view('input/text', array('internalname'=>'location'))."</label></p>";

	$form_body .= "<label>".elgg_echo("assemblies:assembly:points")."</label><ol>";
	for($i=1;$i<5;$i++){
		$form_body .= '<li><a href="#'.($i).'">'.elgg_echo('assemblies:assembly:point').' '.$i.'</a></li>';
	}
$form_body .= '<a href="">'.elgg_echo("assemblies:assembly:points:add").'</a>';
	$form_body .= "</ol>";
	$form_body .= '<div id="points">';

	for($i=0;$i<5;$i++){
		$form_body .= '<div id="point'.$i.'">';
		$form_body .= '<a name="'.$i.'"></a>';
		$form_body .= ($i!=0)? '<fieldset>':'<fieldset style="display:none">';
		$form_body .= '<legend>'.elgg_echo('assemblies:assembly:point').' '.$i.' <a class="delete" href="#">(X)</a></legend>';
		$form_body .= '<p><label>'.elgg_echo('title').'<br />'.
			elgg_view('input/text', array('internalname'=>'title'.$i)).'</label></p>';
		$form_body .= '<p><label>'.elgg_echo('description').'<br />'.
			elgg_view('input/plaintext', array('internalname'=>'descr'.$i)).'</label></p>';
		$form_body .= '<p><label>'.elgg_echo('tags').'<br />'.
			elgg_view('input/tags', array('internalname'=>'tags'.$i)).'</label></p>';
		$form_body .= elgg_view('input/hidden', array('internalname'=>'removed', 'value'=>'false'));
		$form_body .= '</fieldset>';
		$form_body .= '<div class="recoveryBox">'.
			elgg_echo('assemblies:points:recovery').'<a class="recover" href="">'.
			elgg_echo('assemblies:points:recovery:link').'</a></div></div>';
	}

	$form_body .= '</div><br />';
	$form_body .= '<p><a class="add" href="">'.elgg_echo("assemblies:assembly:points:add").'</a></p>';
	
	$form_body .= "<p><label>".elgg_echo("access").'<br />'.
		elgg_view('input/access', array('internalname'=>'access_id'))."</label></p>";

	$form_body .= elgg_view('input/submit', array('value'=>elgg_echo('create')));
	
	echo elgg_view('input/form', array('action' => "{$vars['url']}action/$action", 
		'body' => $form_body));
//}
?>
</div>
<script type="text/javascript">
	$(function(){
		$('a.delete').click(function(){
			$fieldset = $(this.parentNode.parentNode).fadeTo('slow',0.3).slideUp('medium');
			$fieldset.next().fadeTo('slow',1).fadeIn();
			return false;
		});
		$('a.recover').click(function(){
			$fieldset = $(this).parent().prev().slideDown('medium').fadeTo('slow',1);
			$fieldset.next().hide();
			return false;
		});
		$('a.add').click(function(){
			origin = $('#points').children()[0];
			$('#points').append($(origin).clone()).show();
			return false;
		});
	});
</script>