<div class="block">
    <div class="content controls">
      <div class="form-row">
        <div class="col-md-2"><label>Código</label></div>
        <div class="col-md-2"><input value="<?if(isset($ds_codigo)){echo $ds_codigo;}?>" type=number name="ds_codigo" id="ds_codigo" class="validate[required]" size=10/></div>

        <div class="col-md-1"><label>Status</label></div>
        <div class="col-md-4">
          <div class="checked inline"><label><input <?if(isset($st_acao) && $st_acao=="1"){echo "checked";}?> type=radio class=validate[required] name=st_acao value="1"/> Ativo</label></div>
          <div class="checked inline"><label><input <?if(isset($st_acao) && $st_acao=="0"){echo "checked";}?> type=radio class=validate[required] name=st_acao value="0"/> Bloqueado </label></div>
        </div>
      </div>

      <div class="form-row">
        <div class="col-md-2"><label>Razão Social</label></div>
        <div class="col-md-10"><input value="<?if(isset($ds_razao)){echo $ds_razao;}?>" type=text name="ds_razao" id="ds_razao" class="validate[required]" maxlength="100"/></div>
      </div>

      <div class="form-row">
        <div class="col-md-2"><label>Nome Fantasia</label></div>
        <div class="col-md-6"><input value="<?if(isset($ds_fantasia)){echo $ds_fantasia;}?>" type=text name="ds_fantasia" id="ds_fantasia" class="validate[required]" maxlength="40"/></div>
      </div>

      <div class="form-row">
        <div class="col-md-2"><label>CEP</label></div>
        <div class="col-md-2">
          <input value="<?if(isset($ds_cep)){echo $ds_cep;}?>" type=text name="ds_cep" id="ds_cep" maxlenght="8" size="4" class="mask_cep">
        </div>
      </div>


      <div class="form-row">
        <div class="col-md-2"><label>Endereço</label></div>
        <div class="col-md-10"><input value="<?if(isset($ds_endereco)){echo $ds_endereco;}?>" type=text name="ds_endereco" id="ds_endereco" class="validate[required] getCep_ds_logradouro" maxlength="100"/></div>
      </div>

	  <div class="form-row">
      	<div class="col-md-2"><label>Número</label></div>
        <div class="col-md-1"><input value="<?if(isset($ds_numero)){echo $ds_numero;}?>" type=text name="ds_numero" id="ds_numero" class="" maxlength="20"/></div>
        <div class="col-md-1">&nbsp;</div>
        <div class="col-md-1"><label>Bairro</label></div>
        <div class="col-md-7"><input value="<?if(isset($ds_bairro)){echo $ds_bairro;}?>" type=text name="ds_bairro" id="ds_bairro" class="getCep_ds_bairro" maxlength="255"/></div>
      </div>
      
      <div class="form-row">
        <div class="col-md-2"><label>Complemento</label></div>
        <div class="col-md-10"><input value="<?if(isset($ds_complemento)){echo $ds_complemento;}?>" type=text name="ds_complemento" id="ds_complemento" class="validate[required]" maxlength="60"/></div>
      </div>

    <div class="row clear">&nbsp;</div>
    <div class="form-row">
      <div class="col-md-2"><label>Município</label></div>
      <div class="col-md-2">
        <div class="input-group">
          <input value="<?if(isset($id_municipio)){echo $id_municipio;}?>" class="getCep_id_municipio" type=number name="id_municipio" id="id_municipio" maxlenght="10" size="4">
            <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-parameter="" data-value="#id_municipio" data-description="#ds_municipio" data-title="Selecione:">
            <span class="fa fa-search"></span></a>
            </div>
         </div>
      </div>
      <div class="col-md-2"><input name="ds_municipio" id="ds_municipio" class="getCep_ds_municipio" readonly></div>
	 
	  <div class="col-md-1"><label>UF</label></div>
	  <div class="col-md-1"><input value="<?if(isset($ds_uf)){echo $ds_uf;}?>" name="ds_uf" id="ds_uf" class="getCep_ds_uf" maxlenght="2"></div>
    </div>

    <div class="form-row">
      <div class="col-md-2"><label>Cx.Postal</label></div>
      <div class="col-md-1"><input value="<?if(isset($ds_cx_postal)){echo $ds_cx_postal;}?>" type=number name="ds_cx_postal" id="ds_cx_postal"/></div>
      <div class="col-md-3">&nbsp;</div>
      <div class="col-md-1"><label>Tipo</label></div>
      <div class="col-md-2">
              <select name="tp_tipo" id="tp_tipo">
                <option value="F" <?if(isset($tp_tipo) && $tp_tipo=="F"){echo "checked";}?>>F - Fisico</option>
                <option value="J" <?if(isset($tp_tipo) && $tp_tipo=="J"){echo "checked";}?>>J - Juridico</option>
                <option value="X" <?if(isset($tp_tipo) && $tp_tipo=="X"){echo "checked";}?>>X - Outros</option>
              </select>
      </div>
    </div>

    <div class="form-row">
      <div class="col-md-2"><label>CNPJ</label></div>
      <div class="col-md-4"><input value="<?if(isset($ds_cpf_cnpj)){echo $ds_cpf_cnpj;}?>" name="ds_cpf_cnpj" id="ds_cpf_cnpj" class="mask_cnpj"/></div>

      <div class="col-md-1"><label>RG</label></div>
      <div class="col-md-4"><input value="<?if(isset($ds_rg)){echo $ds_rg;}?>" type=number name="ds_rg" id="ds_rg"></div>
    </div>

    <div class="form-row">
      <div class="col-md-2"><label>DDI</label></div>
      <div class="col-md-1"><input value="<?if(isset($ds_ddi)){echo $ds_ddi;}?>" type=number name="ds_ddi" id="ds_ddi" maxlength="02"></div>
      <div class="col-md-2"><label>DDD</label></div>
      <div class="col-md-1"><input value="<?if(isset($ds_ddd)){echo $ds_ddd;}?>" type=number name="ds_ddd" id="ds_ddd" maxlength="02"></div>
    </div>

    <div class="form-row">
      <div class="col-md-2"><label>Telefone</label></div>
      <div class="col-md-2"><input value="<?if(isset($ds_telefone)){echo $ds_telefone;}?>" type=number name="ds_telefone" id="ds_telefone" maxlength="09" class="mask_nr_tel"></div>

      <div class="col-md-2">&nbsp;</div>
      <div class="col-md-2"><label>Fax</label></div>
      <div class="col-md-2"><input value="<?if(isset($ds_fax)){echo $ds_fax;}?>" type=text name="ds_fax" id="ds_fax" class="mask_nr_tel"/></div>
    </div>

    <div class="form-row">
      <div class="col-md-2"><label>Celular</label></div>
      <div class="col-md-2"><input value="<?if(isset($ds_celular)){echo $ds_celular;}?>" type=text name="ds_celular" id="ds_celular"></div>
    </div>

    <div class="form-row">
      <div class="col-md-2"><label>Operadora</label></div>
      <div class="col-md-2">
        <div class="input-group">
          <input value="<?if(isset($id_operadora)){echo $id_operadora;}?>" type=text name="id_operadora" id="id_operadora" >
          <div class="input-group-addon">
          <a href="erpc_operadoras_telefonia_helper.php" class='input-helper' data-remote="false" data-toggle="modal" data-target="#helper-modal-div" data-value="#id_operadora" data-description="#ds_operadora" data-title="Selecione:">
          <span class="fa fa-search"></span></a>
        </div>
        </div>
      </div>
      <div class="col-md-4"><input name="ds_operadora" id="ds_operadora" readonly/></div>
    </div>

    <div class="form-row">
      <div class="col-md-2"><label>Insc. Estadual</label></div>
      <div class="col-md-3"><input value="<?if(isset($ds_ie)){echo $ds_ie;}?>" type=number name="ds_ie" id="ds_ie"/></div>

      <div class="col-md-1">&nbsp;</div>
      <div class="col-md-2"><label>Insc. Municipal</label></div>
      <div class="col-md-3"><input value="<?if(isset($ds_im)){echo $ds_im;}?>" type=number name="ds_im" id="ds_im"/></div>
     </div>

     <div class="form-row">
       <div class="col-md-2"><label>Departamento</label></div>
       <div class="col-md-3"><input value="<?if(isset($ds_departamento)){echo $ds_departamento;}?>" type=text name="ds_departamento" id="ds_departamento" maxlength="40"/></div>
       <div class="col-md-1">&nbsp;</div>

       <div class="col-md-2"><label>E-mail</label></div>
       <div class="col-md-3"><input value="<?if(isset($ds_email)){echo $ds_email;}?>" type=text name="ds_email" id="ds_email" maxlength="40"/></div>
     </div>

    <div class="form-row">
      <div class="col-md-2"><label>Home Page</label></div>
      <div class="col-md-3"><input value="<?if(isset($ds_homepage)){echo $ds_homepage;}?>" name="ds_homepage" id="ds_homepage" maxlength="100"/></div>

      <div class="col-md-1">&nbsp;</div>
      <div class="col-md-2"><label>Nr.Telex</label></div>
      <div class="col-md-1"><input value="<?if(isset($ds_telex)){echo $ds_telex;}?>" type=number name="ds_telex" id="ds_telex" maxlength="20"/></div>
    </div>

    <div class="form-row">
      <div class="col-md-2"><label>CBO</label></div>
      <div class="col-md-1"><input value="<?if(isset($ds_cod_cbo)){echo $ds_cod_cbo;}?>" type=number name="ds_cod_cbo" id="ds_cod_cbo"/></div>

      <div class="col-md-1">&nbsp;</div>
      <div class="col-md-2"><label>CNAE</label></div>
      <div class="col-md-1"><input value="<?if(isset($ds_cod_cnae)){echo $ds_cod_cnae;}?>" type=number name="ds_cod_cnae" id="ds_cod_cnae"/></div>
    </div>

</div>
</div>

    <!-- modal do helper -->
    <div class="row-clear">&nbsp;</div>
    <div class="modal modal-white modal-draggable fade" id="helper-modal-div" tabindex="-1" role="dialog" aria-labelledby="helper-modal-label" aria-hidden="true">
      <div class="modal-dialog modal-lg">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="helper-modal-label">Helper</h4>
          </div>
          <div class="modal-body">
            ...
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal" id="modalCancel">Cancelar</button>
            <button type="button" class="btn btn-primary" data-dismiss="modal" id="modalOk" disabled="disabled">Selecionar</button>
          </div>
        </div>
      </div>
    </div>
