- Generalize the select element
- Options in select area are displayed with their descriptions
- SecuredCookie parameter is displayed within the select element
This commit is contained in:
Thomas CHEMINEAU 2010-03-18 15:22:10 +00:00
parent 3bf4c14d1c
commit 415cf5a167
5 changed files with 48 additions and 35 deletions

View File

@ -49,6 +49,8 @@ example/skins/default/folder_delete.png
example/skins/default/folder_edit.png
example/skins/default/help.png
example/skins/default/hframe.png
example/skins/default/images/1downarrow_16x16.png
example/skins/default/images/1rightarrow_16x16.png
example/skins/default/images/ui-bg_diagonals-thick_18_b81900_40x40.png
example/skins/default/images/ui-bg_diagonals-thick_20_666666_40x40.png
example/skins/default/images/ui-bg_flat_10_000000_40x100.png

View File

@ -332,19 +332,19 @@ function authParams(id) {
}
});
formateSelect('authText',[
'Apache',
'CAS',
'DBI',
'LA',
'LDAP',
'Multi',
'Null',
'OpenID',
'Proxy',
'Remote',
'SAML',
'SSL',
'Twitter'
'Apache:Apache',
'CAS:Central Authentication Service (CAS)',
'DBI:Database (DBI)',
'LA:Liberty Alliance',
'LDAP:LDAP',
'Multi:Multi',
'Null:None',
'OpenID:OpenID',
'Proxy:Proxy',
'Remote:Remote',
'SAML:SAML v2',
'SSL:SSL',
'Twitter:Twitter'
],t[0]);
display('authParams',lmtext(id));
}
@ -352,14 +352,14 @@ function userdbParams(id) {
currentId=id;
$('#authOptions').hide();
formateSelect('authText',[
'DBI',
'Env',
'LDAP',
'Multi',
'Null',
'Proxy',
'Remote',
'SAML'
'DBI:Database (DBI)',
'Env:Environment',
'LDAP:LDAP',
'Multi:Multi',
'Null:None',
'Proxy:Proxy',
'Remote:Remote',
'SAML:SAML v2'
],lmdata(id));
display('authParams',lmtext(id));
}
@ -367,9 +367,9 @@ function passworddbParams(id) {
currentId=id;
$('#authOptions').hide();
formateSelect('authText',[
'DBI',
'LDAP',
'Null'
'DBI:Database (DBI)',
'LDAP:LDAP',
'Null:None'
],lmdata(id));
display('authParams',lmtext(id));
}
@ -469,8 +469,12 @@ function samlService(id) {
}
function securedCookieValues(id){
currentId=id;
$('#securedCookie'+lmdata(id)).attr('checked',1);
display('securedCookie',lmtext(id));
formateSelect('select',[
'0:'+text4securedCookie0,
'1:'+text4securedCookie1,
'2:'+text4securedCookie2
],lmdata(id));
display('select',lmtext(id));
}
function vhost(id){
currentId=id;
@ -734,9 +738,10 @@ function downloadFile(id){
function formateSelect(id,values,selectedValue) {
var options='';
for(i=0;i<values.length;i++){
options+='<option value="'+values[i]+'"';
if(selectedValue==values[i]){options+=' selected';}
options+='>'+values[i]+'</option>';
var t=values[i].split(':');
options+='<option value="'+t[0]+'"';
if(selectedValue==t[0]){options+=' selected';}
options+='>'+t[1]+'</option>';
}
$('#'+id).empty().append(options);
}

View File

@ -25,6 +25,9 @@
var text4newSamlMetaData='<lang en="SAML Metadatas name" fr="Nom des métadatas SAML" />';
var text4newSamlAttribute='<lang en="Attribute name" fr="Nom de l\'attribut" />';
var text4newFilename='<lang en="Filename" fr="Nom du fichier" />';
var text4securedCookie0='<lang en="Non secured cookie" fr="Cookie non sécurisé"/>';
var text4securedCookie1='<lang en="Secured cookie (HTTPS)" fr="Cookie sécurisé (HTTPS)"/>';
var text4securedCookie2='Double cookie (HTTP and HTTPS)';
//]]></script>
<script src="<TMPL_VAR NAME="DIR">/manager.js" type="text/JavaScript"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
@ -206,11 +209,13 @@
</table>
</div>
<!-- Specific to securedCookie (TODO push in _Struct.pm) -->
<div id="content_securedCookie" class="hidden">
<input id="securedCookie0" type="radio" name="securedCookie" value="0" onclick="setlmdata('li_L3NlY3VyZWRDb29raWU1','0')" /> <lang en="Non secured cookie" fr="Cookie non sécurisé"/><br/>
<input id="securedCookie1" type="radio" name="securedCookie" value="1" onclick="setlmdata('li_L3NlY3VyZWRDb29raWU1','1')" /> <lang en="Secured cookie (HTTPS)" fr="Cookie sécurisé (HTTPS)"/><br/>
<input id="securedCookie2" type="radio" name="securedCookie" value="2" onclick="setlmdata('li_L3NlY3VyZWRDb29raWU1','2')" /> Double cookie (HTTP and HTTPS)<br/>
<!-- Select -->
<div id="content_select" class="hidden">
<select id="select"></select>
<br /><br />
<button onclick="setlminputdata(currentId,select);return false;" class="ui-state-default ui-corner-all">
<lang en="Apply" fr="Appliquer" />
</button>
</div>
<!-- Integer -->

View File

@ -223,6 +223,7 @@ sub confNode {
textarea => '',
bool => 0,
filearea => '',
select => '',
}->{$type};
$self->lmLog( "Type $type unknown", 'warn' ) unless ( defined $h );
}

View File

@ -312,7 +312,7 @@ sub struct {
domain => 'text:/domain:domain:text',
cda => 'bool:/cda',
securedCookie =>
'int:/securedCookie:securedCookie:securedCookieValues',
'select:/securedCookie:securedCookie:securedCookieValues',
cookieExpiration => 'text:/cookieExpiration',
},