function make_field($data = array(), $tipo = 'input') { $field = ''; switch ($tipo) { case TIPO_HORAS: $field .= select_horas($data['name'], INTERVALO_SELECT_PADRAO, $data['value'], $data['extras']); break; case TIPO_SELECT: $field .= form_dropdown($data['name'], $data['options'], $data['value']); } return $field; }
<th width="30%"> <label for="txtFimDia"><?php echo $this->lang->line('agenda.form.fim'); ?> </label> </th> <td> <input type="text" size="20" name="fim" class="input-text DATEFIELD" value="" id="txtFimDia" maxlength="10" maxsize="10" /> </td> </tr> <tr class="campoFim"> <th width="30%"> </th> <td> <?php echo select_horas('hora_fim', 15, array($hora_fim), 'id="selHoraFim"'); ?> </td> </tr> </tbody> </table> </fieldset> </div> <div class="col-33 center"> <fieldset> <table> <tbody> <tr>
echo form_open('configs/processar', array('id' => 'frmCfgGerais', 'class' => "form-horizontal")); ?> <fieldset> <legend><?php echo $this->lang->line('configs.gerais.title'); ?> </legend> <div class="form-group"> <label for="inputEmail3" class="col-sm-2 control-label"><?php echo $this->lang->line('configs.inicio_expediente'); ?> </label> <div class="form-group col-xs-4"> <?php echo select_horas('inicio_expediente', INTERVALO_SELECT_PADRAO, $config_array[CONFIG_INICIO_EXPEDIENTE]['valor'], 'class="form-control"'); ?> </div> </div> <div class="form-group"> <label for="inputEmail3" class="col-sm-2 control-label"><?php echo $this->lang->line('configs.intervalo_campo_horas'); ?> </label> <div class="form-group col-xs-4"> <?php $opt_intervalo = array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '10' => '10', '12' => '12', '15' => '15', '20' => '20', '30' => '30', '60' => '60'); echo form_dropdown($config_array[CONFIG_INTERVALO_CAMPO_HORAS]['nome'], $opt_intervalo, $config_array[CONFIG_INTERVALO_CAMPO_HORAS]['valor'], 'class="form-control"'); ?> </div>
<th width="30%"><label for="txtFimDia"><?php echo $this->lang->line('agenda.form.fim'); ?> </label> </th> <td><input type="text" size="20" name="fim" class="input-text DATEFIELD" value="<?php echo $fim; ?> " id="txtFimDia" maxlength="10" maxsize="10" /></td> </tr> <tr class="campoFim"> <th width="30%"></th> <td><?php echo select_horas('hora_fim', $configs[CONFIG_INTERVALO_CAMPO_HORAS]['valor'], array($hora_fim), 'id="selHoraFim"'); ?> </td> </tr> </tbody> </table> </fieldset> </div> <div class="col-50 f-right"> <fieldset> <table> <tbody> <tr>