148 lines
6.5 KiB
HTML
148 lines
6.5 KiB
HTML
<!-- (c) 2005-2012 by Martin Willisegger -->
|
|
<!-- -->
|
|
<!-- Project : NagiosQL -->
|
|
<!-- Component : User template -->
|
|
<!-- Website : http://www.nagiosql.org -->
|
|
<!-- Date : $LastChangedDate: 2012-03-27 12:47:56 +0200 (Tue, 27 Mar 2012) $ -->
|
|
<!-- Author : $LastChangedBy: martin $ -->
|
|
<!-- Version : 3.2.0 -->
|
|
<!-- Revision : $LastChangedRevision: 1308 $ -->
|
|
<!-- BEGIN header -->
|
|
<div id="content_main">
|
|
<div id="content_title">{TITLE}</div>
|
|
<!-- END header -->
|
|
<!-- BEGIN datainsert -->
|
|
<script language="JavaScript" type="text/JavaScript">
|
|
<!--
|
|
// Abort form
|
|
function abort() {
|
|
this.location.href = "{ACTION_INSERT}";
|
|
}
|
|
// Send form
|
|
function LockButton() {
|
|
if (checkForm() == false) {
|
|
return false;
|
|
} else {
|
|
document.frmUserInsert.submit();
|
|
document.frmUserInsert.subForm.disabled = true;
|
|
}
|
|
}
|
|
// Check form entries
|
|
function checkForm() {
|
|
// Are all required fields filled in?
|
|
var fields1 = "tfValue1,tfValue2";
|
|
var msg1 = "{FILL_ALLFIELDS}";
|
|
var msg2 = "{FILL_ILLEGALCHARS}";
|
|
var msg3 = "{FILL_PASSWD_NOT_EQUAL}";
|
|
var msg4 = "{FILL_PASSWORD}";
|
|
var msg5 = "{FILL_PWDSHORT}";
|
|
var header = "{LANG_FORMCHECK}";
|
|
var form = document.frmUserInsert;
|
|
var check = false;
|
|
check = checkfields(fields1,form,myFocusObject);
|
|
if (check == false) {
|
|
msginit(msg1,header,1);
|
|
return false;
|
|
}
|
|
// Check for illegal chars
|
|
if (form.tfValue1.value.match(/[^a-zA-Z0-9.@_-]/)) {
|
|
msginit(msg2+" {LANG_USERNAME}",header,1);
|
|
form.tfValue1.focus()
|
|
return false;
|
|
}
|
|
// The passwords do not match
|
|
if(form.tfValue3.value != form.tfValue4.value) {
|
|
msginit(msg3,header,1);
|
|
form.tfValue3.focus();
|
|
return false;
|
|
}
|
|
// One password is missing
|
|
if((form.tfValue3.value == "") && (form.hidId.value == "")) {
|
|
msginit(msg4,header,1);
|
|
form.tfValue3.focus();
|
|
return false;
|
|
}
|
|
// The password is too short
|
|
if((form.tfValue3.value != "") && (form.tfValue3.value.length <= 5)) {
|
|
msginit(msg5,header,1);
|
|
form.tfValue3.focus();
|
|
return false;
|
|
}
|
|
}
|
|
//-->
|
|
</script>
|
|
<form name="frmUserInsert" method="post" action="{ACTION_INSERT}">
|
|
<table border="0" cellpadding="0" class="content_formtable">
|
|
<tr>
|
|
<td>{LANG_USERNAME} *</td>
|
|
<td colspan="2"><input name="tfValue1" type="text" id="tfValue1" tabindex="1" value="{DAT_USERNAME}" {NAME_DISABLE} class="inpmust" ><input name="tfValue5" type="hidden" id="tfValue5" value="{DAT_USERNAME}"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>{LANG_DESCRIPTION} *</td>
|
|
<td colspan="2"><input name="tfValue2" type="text" id="tfValue2" tabindex="2" value="{DAT_ALIAS}" size="40" style="width:350px" class="inpmust" ></td>
|
|
</tr>
|
|
<tr>
|
|
<td>{LANG_PASSWORD} {PASSWORD_MUST_STAR}</td>
|
|
<td colspan="2"><input name="tfValue3" type="password" id="tfValue3" value="" tabindex="3" {PASSWORD_MUST} ></td>
|
|
</tr>
|
|
<tr>
|
|
<td>{LANG_CONFIRM_PASSWORD} {PASSWORD_MUST_STAR}</td>
|
|
<td colspan="2"><input name="tfValue4" type="password" id="tfValue4" value="" tabindex="4" {PASSWORD_MUST} ></td>
|
|
</tr>
|
|
<tr>
|
|
<td>{LANG_LANGUAGE}</td>
|
|
<td>
|
|
<select name="selValue1" id="selValue1" class="selectborder">
|
|
<!-- BEGIN language_name -->
|
|
<option value="{DAT_LANGUAGE_NAME_ID}" {DAT_LANGUAGE_NAME_SEL}>{DAT_LANGUAGE_NAME}</option>
|
|
<!-- END language_name -->
|
|
</select>
|
|
</td>
|
|
<td class="content_tbl_row4"><img src="{IMAGE_PATH}tip.gif" alt="{LANG_HELP}" title="{LANG_HELP}" width="18" height="18" onclick="dialoginit('user','language','all','Info')" class="infobutton_1"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>{LANG_STANDARD_DOMAIN}</td>
|
|
<td>
|
|
<select name="selValue2" id="selValue2" class="selectborder">
|
|
<!-- BEGIN std_domain -->
|
|
<option value="{DAT_STD_DOMAIN_ID}" {DAT_STD_DOMAIN_SEL}>{DAT_STD_DOMAIN}</option>
|
|
<!-- END std_domain -->
|
|
</select>
|
|
</td>
|
|
<td class="content_tbl_row4"><img src="{IMAGE_PATH}tip.gif" alt="{LANG_HELP}" title="{LANG_HELP}" width="18" height="18" onclick="dialoginit('user','standarddomain','all','Info')" class="infobutton_1"></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="content_tbl_row1">{LANG_ADMIN_ENABLE}</td>
|
|
<td class="content_tbl_row2"><input name="chbValue1" type="checkbox" class="checkbox" id="chbValue1" value="1" {ADMINENABLE_CHECKED} {ADMINENABLE_DISABLE}></td>
|
|
<td style="width:145px;"><img src="{IMAGE_PATH}tip.gif" alt="{LANG_HELP}" title="{LANG_HELP}" width="18" height="18" onclick="dialoginit('user','adminenable','all','Info')" class="infobutton_1"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>{LANG_WEBSERVER_AUTH}</td>
|
|
<td><input name="chbValue2" type="checkbox" class="checkbox" id="chbValue2" value="1" {WSAUTH_CHECKED} {WSAUTH_DISABLE}></td>
|
|
<td><img src="{IMAGE_PATH}tip.gif" alt="{LANG_HELP}" title="{LANG_HELP}" width="18" height="18" onclick="dialoginit('user','webserverauth','all','Info')" class="infobutton_1"></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3"> </td>
|
|
</tr>
|
|
<tr>
|
|
<td>{LANG_ACTIVE}</td>
|
|
<td colspan="2"><input name="chbActive" type="checkbox" class="checkbox" id="chbActive" value="1" {ACT_CHECKED} {ACT_DISABLE}>
|
|
<input name="modus" type="hidden" id="modus" value="{MODUS}">
|
|
<input name="hidId" type="hidden" id="hidId" value="{DAT_ID}">
|
|
<input name="hidLimit" type="hidden" id="hidLimit" value="{LIMIT}">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3"> </td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3"><input name="subForm" type="button" id="subForm" value="{LANG_SAVE}" onClick="LockButton()" {DISABLE_SAVE}> <input name="subAbort" type="button" id="subAbort" onClick="abort()" value="{LANG_ABORT}"><span class="required_info">* {LANG_REQUIRED}</span></td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
</div>
|
|
<div id="msgcontainer"></div>
|
|
<div id="infodialog">
|
|
<div id="dialogcontent" class="bd"></div>
|
|
</div>
|
|
<!-- END datainsert --> |