<?php echo form_open('aviso/edit/'.$aviso['id'], 'enctype="multipart/form-data"'); ?>

	<div class="form-group">
		<label for="asunto"><span class="text-danger">*</span>Asunto</label>
		<input type="text" id="asunto" name="asunto" class="form-control" value="<?php echo ($this->input->post('asunto') ? $this->input->post('asunto') : $aviso['asunto']); ?>" />
	</div>
	<div class="form-group">
		<label for="descripcion"><span class="text-danger">*</span>Descripción</label>
		<input type="text" id="descripcion" name="descripcion" class="form-control" value="<?php echo ($this->input->post('descripcion') ? $this->input->post('descripcion') : $aviso['descripcion']); ?>" />
	</div>
	<div class="form-group">
		<label for="userfile"><span class="text-danger">*</span>Imagen</label>
		<?php 
			if (!is_null($aviso['imagen'])) {
			?>
				<br>
				<div class="avatar avatar-xxl">
					<img src="<?php echo $aviso['imagen']; ?>" alt="..." class="avatar-img rounded">
				</div>
				<br><br>
			<?php	
			}
		?>
		<input type="file" id="userfile" name="userfile" class="form-control"/>
		<span class="text-danger">
		<?php 
			if (isset($uploadError) && !is_null($uploadError)) {
				echo $uploadError;
			}
		?>
		<input type="hidden" name="imagen" value="<?php echo ($this->input->post('imagen') ? $this->input->post('imagen') : $aviso['imagen']); ?>" />
	</div>

		<input type="hidden" name="id_condominio" value="<?php echo ($this->input->post('id_condominio') ? $this->input->post('id_condominio') : $aviso['id_condominio']); ?>" />
		<input type="hidden" name="id_autor" value="<?php echo ($this->input->post('id_autor') ? $this->input->post('id_autor') : $aviso['id_autor']); ?>" />
		<input type="hidden" name="fecha_registro" value="<?php echo ($this->input->post('fecha_registro') ? $this->input->post('fecha_registro') : $aviso['fecha_registro']); ?>" />
		<input type="hidden" name="fecha_modificacion" value="<?php echo ($this->input->post('fecha_modificacion') ? $this->input->post('fecha_modificacion') : $aviso['fecha_modificacion']); ?>" />
		<input type="hidden" name="estado" value="<?php echo ($this->input->post('estado') ? $this->input->post('estado') : $aviso['estado']); ?>" />
	
	<div class="form-group">
		<button type="submit" class="btn btn-primary">Guardar</button>
	</div>
	
<?php echo form_close(); ?>