Cache les champs de modif de mot de passe lors de l'edition d'un compte FTP -> évite que les gens pense modifier le mot de passe alors que c'est pas le cas

Retire un debug du listage de folder
This commit is contained in:
Alan Garcia 2013-01-24 13:23:55 +00:00
parent 836d37b76a
commit 52a812e09d
3 changed files with 25 additions and 6 deletions

View File

@ -117,7 +117,7 @@ function retour() {
</script>
</head>
<body onload="popupfile();">
<h3><?php __("Searching for a folder ($bid)"); ?></h3>
<h3><?php __("Searching for a folder"); ?></h3>
<?php
$ar=browseforfolder($file);

View File

@ -73,19 +73,23 @@ if (isset($error) && $error) {
<th><label for="dir"><?php __("Folder"); ?></label></th>
<td>
<input type="text" class="int" name="dir" id="dir" value="<?php empty($dir)?@ehe("/".$r[0]["dir"]):@ehe($dir); ?>" size="20" maxlength="64" />
<?php display_browser( empty($dir)?("/".$r[0]["dir"]):$dir , "main.dir" ); ?>
<?php display_browser( empty($dir)?("/".( isset($r[0]["dir"])?$r[0]["dir"]:'') ):$dir , "main.dir" ); ?>
<p><?php __("This is the root folder for this FTP user. i.e. this FTP user can access to this forlder and all its sub-folders."); ?></p>
</td>
</tr>
<tr>
<tr id='ftp_tr_pass1'>
<th><label for="pass"><?php __("Password"); ?></label></th>
<td><input type="password" class="int" name="pass" id="pass" size="20" maxlength="64" value=""/><?php display_div_generate_password(DEFAULT_PASS_SIZE,"#pass","#passconf"); ?></td>
</tr>
<tr>
<tr id='ftp_tr_pass2'>
<th><label for="passconf"><?php __("Confirm password"); ?></label></th>
<td><input type="password" class="int" name="passconf" id="passconf" size="20" maxlength="64" value=""/></td>
</tr>
<tr id='ftp_tr_editpass' style='display: none;'>
<th><label for="pass"><?php __("Password"); ?></label></th>
<td><a href="javascript:ftp_edit_pass_toggle();"><?php __("Click here if you want to edit password");?></a></td>
</tr>
<tr class="trbtn">
<td colspan="2">
<input type="submit" class="inb" name="submit" value="<?php __("Save"); ?>" />
@ -98,5 +102,19 @@ if (isset($error) && $error) {
<script type="text/javascript">
document.forms['main'].login.focus();
document.forms['main'].setAttribute('autocomplete', 'off');
function ftp_edit_pass_toggle() {
$('#ftp_tr_pass1').toggle();
$('#ftp_tr_pass2').toggle();
$('#ftp_tr_editpass').toggle();
}
</script>
<?php include_once("foot.php"); ?>
<?php
if (isset($id) && ! empty($id)) {
echo '<script type="text/javascript">ftp_edit_pass_toggle();</script>';
}
include_once("foot.php");
?>

View File

@ -94,8 +94,9 @@ function help(hid) {
}
function browseforfolder(caller) {
eval("file=document."+caller+".value");
eval("file=document."+caller+".value");
w=window.open("browseforfolder.php?caller="+caller+"&file="+file,"browseforfolder","width=300,height=400,scrollbars,left=100,top=100");
alert("Please contact you administrator (the method 'browseforfolderdeprecated' is normaly deprecated).");
}
function CheckAll() {