You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

103 lines
5.1 KiB

{capture name="display"}
<table align="center" width="100%" border="0" cellspacing="0" cellpadding="2" class="formCad">
<tr align="center" valign="middle" >
<td height="50" colspan="2" class="formHed">
<img src="imgSite/usuarios.gif" width="32" height="32" align="absmiddle"> <span class="formHed">Cadastro de Site</span> </td>
</tr>
<tr>
<th align="left">Id</th>
<td>{$idSite}</td>
</tr>
<tr>
<th width="120" align="left">Configura<EFBFBD><EFBFBD>es</th>
<td>
<input name="config" type="radio" value="1" id="asterisk" {if $porta == 0} checked {/if}> Central
<input name="config" type="radio" value="2" id="banco" {if $porta != 0} checked {/if}> Banco de dados
</td>
</tr>
<tr>
<th width="120" align="left">Nome</th>
<td><input name="descricao" type="text" id="descricao" value="{$descricao}" size="60" maxlength="60" ></td>
</tr>
<tr>
<th align="left">Servidor</th>
<td><input name="host" type="text" id="host" value="{$host}" maxlength="20" {$msgLogin}></td>
</tr>
<tr>
<th align="left">Usu&aacute;rio</th>
<td><input name="usuario" type="text" id="usuario" value="{$usuario}" maxlength="50" {$msgMatricula}></td>
</tr>
<tr>
<th align="left">Senha</th>
<td><input name="senha" type="password" id="senha" value="{$senha}" maxlength="50"></td>
</tr>
<tr>
<th align="left" id="db">Base de Dados </th>
<td id="colDB">
{if $porta && $porta != '00000'}
<input name="basedados" type="text" id="basedados" value="{$basedados}" size="60" maxlength="50">
{else}
<select name="basedados" id="basedados1">
<option value="1.4" {if $basedados == "1.4"}selected{/if}>Inferior a 1.7.0</option>
<option value="13" {if $basedados == "13"}selected{/if}>Superior/Igual a 1.7.0</option>
</select>
{/if}
</td>
</tr>
<tr id="port">
<th align="left">Porta</th>
<td><input name="porta" type="text" id="porta2" value="{$porta}" maxlength="4"></td>
</tr>
<tr id="status">
<th align="left">Status</th>
<td><input name="status" type="checkbox" id="status" value="1" {$status}></td>
</tr>
<tr>
<td><input name="idSite" type="hidden" id="idSite" value="{$idSite}">
<input name="formAction" type="hidden" id="formAction" value="{$formAction}"></td>
<td><input name="formAcaoDesc" type="submit" id="formAcaoDesc" value="{$formAcaoDesc}">
<input name="btClose" type="submit" id="btClose" value="Fechar" onClick="window.close();"></td>
</tr>
<tr align="center">
<td style="height:40px;" colspan="2"><span id="msgErro" style="height:60px; width:100%; font-size:11px; font-weight:bold; color: {if $msgErro}#FF0000;{else}#0000FF{/if}">{if $msgErro}{$msgErro}{else}{if $msg}{$msg}{else}&nbsp;{/if}{/if}</span></td>
</tr>
</table>
{literal}
<script>
$(function () {
if ($("#asterisk").attr('checked') == "checked") {
$("#port").hide();
$("#status").hide();
$("#db").text('Vers<EFBFBD>o');
$("#porta2").val('00000');
}
$("input[name='config']").change(function () {
if ($('#asterisk').prop('checked') === true) {
$("#basedados").remove();
$("#port").hide();
$("#status").hide();
$("#db").text('Vers<EFBFBD>o');
$("#porta2").val('00000');
$("#colDB").append("<select name=\"basedados\" id=\"basedados1\">");
$("#basedados1").append("<option value=\"1.4\"{/literal}{if $basedados == "1.4"} selected{/if}{literal}>Inferior a 1.7.0</option>");
$("#basedados1").append("<option value=\"13\"{/literal}{if $basedados == "13"} selected{/if}{literal}>Superior/Igual a 1.7.0</option>");
$("#basedados1").append("</select>");
$("#basedados1").val('0');
}
if($('#banco').prop('checked') === true) {
$("#port").show();
$("#status").show();
$("#porta2").val('5432');
$("#db").text('Base de dados');
$("#basedados1").remove();
$("#colDB").append("<input name=\"basedados\" type=\"text\" id=\"basedados\" value=\"{/literal}{$basedados}{literal}\" size=\"60\" maxlength=\"50\">");
}
});
});
</script>
{/literal}
{/capture}