<?php
include 'header.php';
include 'erpc_regiao_toolbar.php';

require_once 'inc/regiao.php';

$regiao = regiao_create();


?>

<form method="post" action="erpc_regiao_ws.php">
  <div class="block">
    <div class="header">
      <h2>Região - Adicionar</h2>
    </div>
    <div class="content controls">
      <?php
      //echo '<pre>' . var_export($_SESSION, true) . '</pre>';
      displayMessagesAndErrors();
      ?>
      <div class="form-row">
        <div class="col-md-3">
          <label>ID</label>
        </div>
        <div class="col-md-9">
          <input readonly type="text" id="regiao[id]" name="regiao[id]" class="form-control" value="<?= htmlentities($regiao['id'], ENT_QUOTES, 'utf-8'); ?>" />
        </div>
      </div>
      <div class="form-row">
        <div class="col-md-3">
          <label for="regiao[ds_regiao]">Região</label>
        </div>
        <div class="col-md-9">
          <input type="text" id="regiao[ds_regiao]" name="regiao[ds_regiao]" class="form-control" value="<?= htmlentities($regiao['ds_regiao'], ENT_QUOTES, 'utf-8'); ?>" />
        </div>
      </div>
      
        <div class="form-row">
            <div class="col-md-3"><label>Municípios</label></div>
            <div class="col-md-2">
                <div class="input-group">
                  <input required id="regiao[id_municipio]" name="regiao[id_municipio]" value="" />
            
                  <div class="input-group-addon">
                    <a href="erpc_municipios_helper.php" class='input-helper' data-remote="false" data-toggle="modal" data-target="#helper-modal-div" data-value="input[name='regiao[id_municipio]']" data-description="input[name='regiao[ds_municipio]']" data-title="Selecione:" value="">
                    <span class="fa fa-search"></span></a>
                  </div>
                </div>
              </div>
              <div class="col-md-7"><input readonly name="regiao[ds_municipio]" id="regiao[ds_municipio]"/></div>
        </div>
      
      <div class="form-row">
        <div class="col-md-3">
          <label for="regiao[ds_bairro]">Bairro</label>
        </div>
        <div class="col-md-9">
          <input type="text" id="regiao[ds_bairro]" name="regiao[ds_bairro]" class="form-control" value="<?= htmlentities($regiao['ds_bairro'], ENT_QUOTES, 'utf-8'); ?>" />
        </div>
      </div>
      <div class="form-row">
        <div class="col-md-3">
          <label for="regiao[ds_endereco]">Endereço</label>
        </div>
        <div class="col-md-9">
          <input type="text" id="regiao[ds_endereco]" name="regiao[ds_endereco]" class="form-control" value="<?= htmlentities($regiao['ds_endereco'], ENT_QUOTES, 'utf-8'); ?>" />
        </div>
      </div>
      <div class="form-row">
        <div class="col-md-12 text-right">
          <button id="btn-voltar" class="btn btn-default btn-cleanx">Voltar</button>
          <button name="btn-add" class="btn btn-primary btn-cleanx">Adicionar</button>
        </div>
      </div>

  </div>
</form>
<?php include 'inc/helper_modal_div.php'; ?>
<?php include 'footer.php'; ?>


<script type="text/javascript" src="js/acme.js"></script>



























