Vistas (por el momento solo genero add y edit que son iguales)
Código PHP:
<?php
$config_form = array(
'aseguradora' => array(
'name' => 'aseguradora',
'id' => 'aseguradora',
'value' => set_value('aseguradora', ''),
'maxlenght' => '120',
),
'direccion' => array(
'name' => 'direccion',
'id' => 'direccion',
'value' => set_value('direccion', ''),
'maxlenght' => '0',
),
'logo' => array(
'name' => 'logo',
'id' => 'logo',
'value' => set_value('logo', ''),
'maxlenght' => '100',
),
'url_portal' => array(
'name' => 'url_portal',
'id' => 'url_portal',
'value' => set_value('url_portal', ''),
'maxlenght' => '255',
),
'activo' => array(
'name' => 'activo',
'id' => 'activo',
'value' => '1',
'checked' => set_checkbox('activo', '1'),
),
);
?>
<?php echo validation_errors(); ?>
<?php echo form_open($form_action); ?>
<table>
<tr>
<td><?php echo form_label($this->lang->line('label.aseguradora')); ?></td>
<td><?php echo form_input($config_form['aseguradora']); ?></td>
</tr>
<tr>
<td><?php echo form_label($this->lang->line('label.direccion')); ?></td>
<td><?php echo form_input($config_form['direccion']); ?></td>
</tr>
<tr>
<td><?php echo form_label($this->lang->line('label.logo')); ?></td>
<td><?php echo form_input($config_form['logo']); ?></td>
</tr>
<tr>
<td><?php echo form_label($this->lang->line('label.url_portal')); ?></td>
<td><?php echo form_input($config_form['url_portal']); ?></td>
</tr>
<tr>
<td><?php echo form_label($this->lang->line('label.activo')); ?></td>
<td><?php echo form_checkbox($config_form['activo']); ?></td>
</tr>
<tr>
<td colspan="2">
<?php echo form_submit('mysubmit', 'Submit!'); ?></td>
</tr>
</table>
</form>