Fix #1549
This commit is contained in:
parent
8fde9a58a2
commit
4108189f4f
|
@ -38,30 +38,33 @@ getFields($fields);
|
||||||
?>
|
?>
|
||||||
<h3><?php __("Protect a folder"); ?></h3>
|
<h3><?php __("Protect a folder"); ?></h3>
|
||||||
<hr id="topbar"/>
|
<hr id="topbar"/>
|
||||||
<br />
|
<br/>
|
||||||
<p>
|
<p>
|
||||||
<?php __("Enter the name of the folder you want to protect. It must already exists."); ?>
|
<?php __("Enter the name of the folder you want to protect. It must already exists."); ?>
|
||||||
</p>
|
</p>
|
||||||
<?php
|
<?php
|
||||||
if (isset($error) && $error) {
|
if (isset($error) && $error) {
|
||||||
echo "<p class=\"alert alert-danger\">$error</p>";
|
echo "<p class=\"alert alert-danger\">$error</p>";
|
||||||
include_once("foot.php");
|
include_once("foot.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
} ?>
|
||||||
?>
|
|
||||||
<form method="post" action="hta_doadd.php" name="main" id="main">
|
<form method="post" action="hta_doadd.php" name="main" id="main">
|
||||||
<table border="1" cellspacing="0" cellpadding="4" class='tedit'>
|
<table border="1" cellspacing="0" cellpadding="4" class='tedit'>
|
||||||
<tr>
|
<tr>
|
||||||
<th><label for="dir"><?php __("Folder"); ?></label></th>
|
<th><label for="dir"><?php __("Folder"); ?></label></th>
|
||||||
<td><input type="text" class="int" name="dir" id="dir" value="<?php (isset($dir)) ? : $dir="";ehe($dir); ?>" maxlength="255" />
|
<td>
|
||||||
<?php display_browser( ehe($dir,0) , "main.dir" ); ?>
|
<input type="text" class="int" name="dir" id="dir" value="<?php (isset($dir)) ? : $dir="";ehe($dir); ?>" maxlength="255" />
|
||||||
</td>
|
<?php display_browser( ehe($dir,0) , "main.dir" ); ?>
|
||||||
</tr>
|
</td>
|
||||||
</table>
|
</tr>
|
||||||
<br />
|
</table>
|
||||||
<input type="submit" class="inb lock" value="<?php __("Protect this folder"); ?>" />
|
<br />
|
||||||
|
<input type="submit" class="inb lock" value="<?php __("Protect this folder"); ?>" onClick="return false_if_empty('dir', '<?php echo addslashes(_("Can't have empty directory."));?>');" />
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
document.forms['main'].dir.focus();
|
document.forms['main'].dir.focus();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php include_once("foot.php"); ?>
|
<?php include_once("foot.php"); ?>
|
||||||
|
|
|
@ -35,6 +35,12 @@ $fields = array (
|
||||||
);
|
);
|
||||||
getFields($fields);
|
getFields($fields);
|
||||||
|
|
||||||
|
if(empty($dir)) {
|
||||||
|
$error=_("No directory specified");
|
||||||
|
include("hta_list.php");
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
if(!$hta->CreateDir($dir)) {
|
if(!$hta->CreateDir($dir)) {
|
||||||
$error=$err->errstr();
|
$error=$err->errstr();
|
||||||
include("hta_add.php");
|
include("hta_add.php");
|
||||||
|
|
Loading…
Reference in New Issue