initial commit from rev. 632

This commit is contained in:
Erik Amaru Ortiz
2010-12-02 23:34:41 +00:00
commit 0525681d79
5410 changed files with 864427 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<dynaForm menu="authSources/authSources_Options" width="100%">
<AUTH_SOURCE_UID type="private" showInTable="0"/>
<AUTH_SOURCE_NAME type="text" colWidth="200" titleAlign="left" align="left">
<en>Name</en>
</AUTH_SOURCE_NAME>
<AUTH_SOURCE_PROVIDER type="text" colWidth="150" titleAlign="left" align="left">
<en>Provider</en>
</AUTH_SOURCE_PROVIDER>
<AUTH_SOURCE_SERVER_NAME type="text" colWidth="150" titleAlign="left" align="left">
<en>Server Name</en>
</AUTH_SOURCE_SERVER_NAME>
<AUTH_SOURCE_PORT type="text" colWidth="40" titleAlign="left" align="left">
<en>Port</en>
</AUTH_SOURCE_PORT>
<EDIT type="link" colWidth="40" value="@G::LoadTranslation(ID_EDIT)" link="authSources_Edit?sUID=@#AUTH_SOURCE_UID" onclick=""><en></en></EDIT>
<DELETE type="link" colWidth="40" value="@G::LoadTranslation(ID_DELETE)" link="#" onclick="authSourcesDelete(@QAUTH_SOURCE_UID);return false;"><en></en></DELETE>
<IMPORT_USERS type="link" colWidth="40" value="@G::LoadTranslation(ID_IMPORT_USERS)" link="authSources_SearchUsers?sUID=@#AUTH_SOURCE_UID" onclick=""/>
</dynaForm>

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<dynaForm type="xmlmenu">
<MNU_ADD type="link" link="authSources_SelectType" colAlign="left" colWidth="35">
<en>New</en>
</MNU_ADD>
<PAGED_TABLE_ID type="private"/>
<JS type="javascript" replaceTags="1"><![CDATA[
var authSourcesDelete = function(sUID) {
new leimnud.module.app.confirm().make({
label:'@G::LoadTranslation(ID_MSG_CONFIRM_DELETE_AUTH_SOURCE)',
action:function() {
ajax_function(@G::encryptlink('authSources_Delete'), '', 'AUTH_SOURCE_UID=' + sUID, 'POST');
@#PAGED_TABLE_ID.refresh();
}.extend(this)
});
};
]]></JS>
</dynaForm>

View File

@@ -0,0 +1,39 @@
<form id="{$form_id}" name="{$form_name}" action="{$form_action}" class="{$form_className}" method="post" encType="multipart/form-data" style="margin:0px;" onsubmit='return validateForm("{$form_objectRequiredFields}".parseJSON());'> <div class="borderForm" style="width:{$form_width}; padding-left:0; padding-right:0; border-width:{$form_border};">
<div class="boxTop"><div class="a"></div><div class="b"></div><div class="c"></div></div>
<div class="content" style="height:{$form_height};" >
<table width="99%">
<tr>
<td valign='top'>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td class='FormTitle' colspan="2" align="">{$form.TITLE}</td>
</tr>
<tr style="display: none">
<td colspan="2">{$form.AUTH_SOURCE_UID}</td>
</tr>
<tr>
<td class='FormLabel' width="{$form_labelWidth}">{$KEYWORD}</td>
<td class='FormFieldContent' >{$form.KEYWORD}</td>
</tr>
<tr>
<td class='FormButton' colspan="2" align="center">{$form.btnSearch} &nbsp; {$form.BTN_CANCEL} </td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center">
<span id="spanUsers" />
</td>
</tr>
<tr>
<td class='FormButton' colspan="2" align="center">{$form.btnImport}</td>
</tr>
</table>
</div>
<div class="boxBottom"><div class="a"></div><div class="b"></div><div class="c"></div></div>
</div>
<script type="text/javascript">
{$form.JS}
</script>
</form>

View File

@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8"?>
<dynaForm name="authSources/authSources_SearchUsers" type="xmlform" enableTemplate="1" width="800" labelWidth="250">
<TITLE type="title">
<en>Search for user</en>
</TITLE>
<AUTH_SOURCE_UID type="hidden"/>
<KEYWORD type="text" size="50" maxlength="50" required="0">
<en>Keyword</en>
</KEYWORD>
<btnSearch type="button" onclick="searchUsers();">
<en>Search</en>
</btnSearch>
<btnImport type="button" onclick="importUsers(this.form);">
<en>Import</en>
</btnImport>
<BTN_CANCEL type="button" onclick="cancel();">
<en>Cancel</en>
</BTN_CANCEL>
<JS type="javascript"><![CDATA[
getField('btnImport').style.visibility = 'hidden';
var searchUsers = function() {
var oRPC = new leimnud.module.rpc.xmlhttp({
url : 'authSources_Ajax',
args: 'action=searchUsers&sUID=' + getField('AUTH_SOURCE_UID').value + '&sKeyword=' + getField('KEYWORD').value
});
oRPC.callback = function(rpc){
document.getElementById('spanUsers').innerHTML = rpc.xmlhttp.responseText;
if (document.getElementById('aUsers[0]')) {
getField('btnImport').style.visibility = 'visible';
}
else {
getField('btnImport').style.visibility = 'hidden';
}
var scs = rpc.xmlhttp.responseText.extractScript();
scs.evalScript();
}.extend(this);
oRPC.make();
};
var importUsers = function(oForm) {
var bContinue = false;
var i = 0;
var oAux;
while (oAux = document.getElementById('aUsers[' + i + ']')) {
if (oAux.checked) {
bContinue = true;
}
i++;
}
if (bContinue) {
oForm.submit();
}
else {
//alert(666);
}
};
var selectAll = function(bChecked) {
var oAux;
var i = 0;
while (oAux = document.getElementById('aUsers[' + i + ']')) {
oAux.checked = true;
i++;
}
};
function cancel(){
window.location = 'authSources_List';
}
]]></JS>
</dynaForm>

View File

@@ -0,0 +1,32 @@
<form id="{$form_id}" name="{$form_name}" action="{$form_action}" class="{$form_className}" method="post" encType="multipart/form-data" style="margin:0px;" onsubmit='return validateForm("{$form_objectRequiredFields}".parseJSON());'>
<div class="borderForm" style="padding-left: 0pt; padding-right: 0pt; width:400">
<div class="boxTop"><div class="a"></div><div class="b"></div><div class="c"></div></div>
<div class="content" style="">
<table width="99%">
<tbody><tr>
<td valign="top">
<input class="notValidateThisFields" name="__notValidateThisFields__" id="__notValidateThisFields__" value="" type="hidden">
<input name="DynaformRequiredFields" id="DynaformRequiredFields" value="{$form_objectRequiredFields}" type="hidden">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody><tr>
<td class="FormTitle" colspan="2" align="">{$form.TITLE}</td>
</tr>
<tr>
<td class="FormLabel" width="{$form_labelWidth}"><font color="red">* </font>{$AUTH_SOURCE_PROVIDER}</td>
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.AUTH_SOURCE_PROVIDER} </td> //-->
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.AUTH_SOURCE_PROVIDER}</td>
</tr>
<tr>
<td class="FormButton" colspan="2" align="">{$form.btnContinue} &nbsp; {$form.BTN_CANCEL}</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
<div class="FormRequiredTextMessage"><font color="red">* </font>{php}echo (G::LoadTranslation('ID_REQUIRED_FIELD'));{/php}</div> </div>
<div class="boxBottom"><div class="a"></div><div class="b"></div><div class="c"></div></div>
</div>
<script type="text/javascript">
{$form.JS}
</script>
</form>

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<dynaForm name="authSources/authSources_SelectType" type="xmlform" enableTemplate="1">
<TITLE type="title">
<en>Available Authentication Source Types</en>
</TITLE>
<AUTH_SOURCE_PROVIDER type="dropdown" size="20" maxlength="20" required="1" sqlConnection="dbarray">
SELECT sType, sLabel FROM authSourceTypes
<en>Provider</en>
</AUTH_SOURCE_PROVIDER>
<btnContinue type="submit">
<en>Continue</en>
</btnContinue>
<BTN_CANCEL type="button" onclick="cancel();">
<en>Cancel</en>
</BTN_CANCEL>
<JS type="javascript" replacetags="1"><![CDATA[
function cancel(){
window.location = 'authSources_List';
}
]]></JS>
</dynaForm>

View File

@@ -0,0 +1,103 @@
<form id="{$form_id}" name="{$form_name}" action="{$form_action}" class="{$form_className}" method="post" encType="multipart/form-data" style="margin:0px;" onsubmit='return validateForm("{$form_objectRequiredFields}".parseJSON());'>
<div class="borderForm" style="padding-left: 0pt; padding-right: 0pt; width:60%">
<div class="boxTop"><div class="a"></div><div class="b"></div><div class="c"></div></div>
<div class="content" style="">
<table width="99%">
<tbody><tr>
<td valign="top">
<input class="notValidateThisFields" name="__notValidateThisFields__" id="__notValidateThisFields__" value="" type="hidden">
<input name="DynaformRequiredFields" id="DynaformRequiredFields" value="{$form_objectRequiredFields}" type="hidden">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody><tr>
<td class="FormTitle" colspan="2" align="">{$form.TITLE}</td>
</tr>
<tr style="display: none;">
<td colspan="2">{$form.AUTH_SOURCE_UID}</td>
</tr>
<tr>
<td class="FormLabel" width="{$form_labelWidth}"><font color="red">* </font>{$AUTH_SOURCE_NAME}</td>
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.AUTH_SOURCE_NAME} </td> //-->
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.AUTH_SOURCE_NAME}</td>
</tr>
<tr style="display: none;">
<td colspan="2">{$form.AUTH_SOURCE_PROVIDER}</td>
</tr>
<tr>
<td class="FormLabel" width="{$form_labelWidth}">{$LDAP_TYPE}</td>
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.LDAP_TYPE} </td> //-->
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.LDAP_TYPE}</td>
</tr>
<tr>
<td class="FormLabel" width="{$form_labelWidth}"><font color="red">* </font>{$AUTH_SOURCE_SERVER_NAME}</td>
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.AUTH_SOURCE_SERVER_NAME} </td> //-->
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.AUTH_SOURCE_SERVER_NAME}</td>
</tr>
<tr>
<td class="FormLabel" width="{$form_labelWidth}"><font color="red">* </font>{$AUTH_SOURCE_PORT}</td>
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.AUTH_SOURCE_PORT} </td> //-->
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.AUTH_SOURCE_PORT}</td>
</tr>
<tr>
<td class="FormLabel" width="{$form_labelWidth}">{$AUTH_SOURCE_ENABLED_TLS}</td>
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.AUTH_SOURCE_ENABLED_TLS} </td> //-->
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.AUTH_SOURCE_ENABLED_TLS}</td>
</tr>
<tr>
<td class="FormLabel" width="{$form_labelWidth}">{$AUTH_SOURCE_VERSION}</td>
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.AUTH_SOURCE_VERSION} </td> //-->
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.AUTH_SOURCE_VERSION}</td>
</tr>
<tr>
<td class="FormLabel" width="{$form_labelWidth}"><font color="red">* </font>{$AUTH_SOURCE_BASE_DN}</td>
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.AUTH_SOURCE_BASE_DN} </td> //-->
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.AUTH_SOURCE_BASE_DN}</td>
</tr>
<tr>
<td class="FormLabel" width="{$form_labelWidth}">{$AUTH_ANONYMOUS}</td>
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.AUTH_ANONYMOUS} </td> //-->
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.AUTH_ANONYMOUS}</td>
</tr>
<tr>
<td class="FormLabel" width="{$form_labelWidth}">{$AUTH_SOURCE_SEARCH_USER}</td>
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.AUTH_SOURCE_SEARCH_USER} </td> //-->
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.AUTH_SOURCE_SEARCH_USER}</td>
</tr>
<tr>
<td class="FormLabel" width="{$form_labelWidth}">{$AUTH_SOURCE_PASSWORD}</td>
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.AUTH_SOURCE_PASSWORD} </td> //-->
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.AUTH_SOURCE_PASSWORD}</td>
</tr>
<tr>
<td class="FormLabel" width="{$form_labelWidth}"><font color="red">* </font>{$AUTH_SOURCE_IDENTIFIER_FOR_USER}</td>
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.AUTH_SOURCE_IDENTIFIER_FOR_USER} </td> //-->
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.AUTH_SOURCE_IDENTIFIER_FOR_USER}</td>
</tr>
<tr>
<td class="FormLabel" width="{$form_labelWidth}"><font color="red">* </font>{$AUTH_SOURCE_OBJECT_CLASSES}</td>
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.AUTH_SOURCE_OBJECT_CLASSES} </td> //-->
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.AUTH_SOURCE_OBJECT_CLASSES}</td>
</tr>
<tr>
<td class="FormLabel" width="{$form_labelWidth}">{$AUTH_SOURCE_ADDITIONAL_FILTER}</td>
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.AUTH_SOURCE_ADDITIONAL_FILTER} </td> //-->
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.AUTH_SOURCE_ADDITIONAL_FILTER}</td>
</tr>
<tr>
<td class="FormLabel" width="{$form_labelWidth}"><font color="red">* </font>{$AUTH_SOURCE_ATTRIBUTES}</td>
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.AUTH_SOURCE_ATTRIBUTES} </td> //-->
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.AUTH_SOURCE_ATTRIBUTES}</td>
</tr>
<tr>
<td class="FormButton" colspan="2" align="">{$form.btnSave} &nbsp; {$form.BTN_CANCEL}</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
<div class="FormRequiredTextMessage"><font color="red">* </font>{php}echo (G::LoadTranslation('ID_REQUIRED_FIELD'));{/php}</div> </div>
<div class="boxBottom"><div class="a"></div><div class="b"></div><div class="c"></div></div>
</div>
<script type="text/javascript">
{$form.JS}
</script>
</form>

View File

@@ -0,0 +1,116 @@
<?xml version="1.0" encoding="UTF-8"?>
<dynaForm name="authSources/ldap_Edit" type="xmlform" enableTemplate="1">
<TITLE type="title">
<en>Authentication Source Information</en>
</TITLE>
<AUTH_SOURCE_UID type="hidden"/>
<AUTH_SOURCE_NAME type="text" size="50" maxlength="50" required="1">
<en>Name</en>
</AUTH_SOURCE_NAME>
<AUTH_SOURCE_PROVIDER type="hidden" defaultValue="ldap"/>
<LDAP_TYPE type="dropdown" required="0">
<en>Type<option name="ldap">LDAP</option><option name="ad">Active Directory</option></en>
</LDAP_TYPE>
<AUTH_SOURCE_SERVER_NAME type="text" size="50" maxlength="50" required="1">
<en>Server Name</en>
</AUTH_SOURCE_SERVER_NAME>
<AUTH_SOURCE_PORT type="text" size="5" maxlength="5" required="1" defaultValue="389" validate="Int">
<en>Port</en>
</AUTH_SOURCE_PORT>
<AUTH_SOURCE_ENABLED_TLS type="dropdown">
<en>Enabled TLS<option name="">No</option><option name="1">Yes</option></en>
</AUTH_SOURCE_ENABLED_TLS>
<AUTH_SOURCE_VERSION type="dropdown" required="0" defaultValue="3">
<en>Version<option name="2">2</option><option name="3">3</option></en>
</AUTH_SOURCE_VERSION>
<AUTH_SOURCE_BASE_DN type="text" size="50" maxlength="128" required="1">
<en>Base DN</en>
</AUTH_SOURCE_BASE_DN>
<AUTH_ANONYMOUS type="dropdown">
<en>Anonymous<option name="">No</option><option name="1">Yes</option></en>
</AUTH_ANONYMOUS>
<AUTH_SOURCE_SEARCH_USER type="text" size="50" maxlength="128" required="0">
<en>Search User</en>
</AUTH_SOURCE_SEARCH_USER>
<AUTH_SOURCE_PASSWORD type="password" size="20" maxlength="32" required="0">
<en>Password</en>
</AUTH_SOURCE_PASSWORD>
<AUTH_SOURCE_IDENTIFIER_FOR_USER type="text" size="20" maxlength="20" required="1" defaultValue="uid">
<en>Identifier for a imported user</en>
</AUTH_SOURCE_IDENTIFIER_FOR_USER>
<AUTH_SOURCE_OBJECT_CLASSES type="textarea" cols="50" rows="5" required="1" defaultValue="*">
<en>Object Classes</en>
</AUTH_SOURCE_OBJECT_CLASSES>
<AUTH_SOURCE_ADDITIONAL_FILTER type="text" size="50" maxlength="200" required="0" defaultValue="">
<en>Additional Filter</en>
</AUTH_SOURCE_ADDITIONAL_FILTER>
<AUTH_SOURCE_ATTRIBUTES type="textarea" cols="50" rows="5" required="1">
<en>Attributes</en>
</AUTH_SOURCE_ATTRIBUTES>
<btnSave type="submit">
<en>Save</en>
</btnSave>
<BTN_CANCEL type="button" onclick="cancel();">
<en>Cancel</en>
</BTN_CANCEL>
<JS type="javascript"><![CDATA[
var dynaformOnload = function() {
leimnud.event.add(getField('AUTH_ANONYMOUS'), 'change', hideShowSearchUser);
leimnud.event.add(getField('LDAP_TYPE'), 'change', hideShowSuggest);
hideShowSearchUser();
hideShowSuggest();
};
var hideShowSearchUser = function() {
if (getField('AUTH_ANONYMOUS').value == '1') {
hideRowById('AUTH_SOURCE_SEARCH_USER');
hideRowById('AUTH_SOURCE_PASSWORD');
}
else {
showRowById('AUTH_SOURCE_SEARCH_USER');
showRowById('AUTH_SOURCE_PASSWORD');
}
};
var hideShowSuggest = function() {
if (getField('AUTH_SOURCE_UID').value == '') {
var AUTH_SOURCE_ATTRIBUTES = getField('AUTH_SOURCE_ATTRIBUTES');
switch (getField('LDAP_TYPE').value) {
case 'ldap':
AUTH_SOURCE_ATTRIBUTES.value = 'cn' + "\n" + 'uid' + "\n" + 'givenname' + "\n" + 'sn' + "\n" + 'mail' + "\n" + 'mobile';
break;
case 'ad':
AUTH_SOURCE_ATTRIBUTES.value = 'cn' + "\n" + 'samaccountname' + "\n" + 'givenname' + "\n" + 'sn' + "\n" + 'userprincipalname' + "\n" + 'telephonenumber';
break;
}
}
};
function cancel(){
window.location = 'authSources_List';
}
]]></JS>
</dynaForm>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<dynaForm width="100%" rowsPerPage="1000">
<Checkbox type="text" colWidth="120" titleAlign="left" align="left" enableHtml="1" onclick="return false;">
<en><![CDATA[<span onclick="selectAll();">[SELECT-ALL]</span>]]></en>
</Checkbox>
<FullName type="text" colWidth="170" titleAlign="left" align="left">
<en>Name</en>
</FullName>
<Email type="text" colWidth="50" titleAlign="left" align="left">
<en>E-Mail</en>
</Email>
<DistinguishedName type="text" colWidth="330" titleAlign="left" align="left">
<en>Distinguished Name</en>
</DistinguishedName>
</dynaForm>