mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-18 02:59:27 +00:00
- do not ask for a filename if _strictFormCheck is set to false
- do not erase file selection fields if a new document is added
This commit is contained in:
parent
bb3ce66aaf
commit
8a754b5f63
|
@ -51,12 +51,12 @@ function checkForm()
|
||||||
msg = "";
|
msg = "";
|
||||||
//if (document.form1.userfile[].value == "") msg += "<?php printMLText("js_no_file");?>\n";
|
//if (document.form1.userfile[].value == "") msg += "<?php printMLText("js_no_file");?>\n";
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if (isset($settings->_strictFormCheck) && $settings->_strictFormCheck) {
|
||||||
|
?>
|
||||||
if(!document.form1.name.disabled){
|
if(!document.form1.name.disabled){
|
||||||
if (document.form1.name.value == "") msg += "<?php printMLText("js_no_name");?>\n";
|
if (document.form1.name.value == "") msg += "<?php printMLText("js_no_name");?>\n";
|
||||||
}
|
}
|
||||||
<?php
|
|
||||||
if (isset($settings->_strictFormCheck) && $settings->_strictFormCheck) {
|
|
||||||
?>
|
|
||||||
if (document.form1.comment.value == "") msg += "<?php printMLText("js_no_comment");?>\n";
|
if (document.form1.comment.value == "") msg += "<?php printMLText("js_no_comment");?>\n";
|
||||||
if (document.form1.keywords.value == "") msg += "<?php printMLText("js_no_keywords");?>\n";
|
if (document.form1.keywords.value == "") msg += "<?php printMLText("js_no_keywords");?>\n";
|
||||||
<?php
|
<?php
|
||||||
|
@ -72,7 +72,10 @@ function checkForm()
|
||||||
|
|
||||||
function addFiles()
|
function addFiles()
|
||||||
{
|
{
|
||||||
document.getElementById("files").innerHTML += '<br><input type="File" name="userfile[]" size="60">';
|
var li = document.createElement('li');
|
||||||
|
li.innerHTML = '<input type="File" name="userfile[]" size="60">';
|
||||||
|
document.getElementById('files').appendChild(li);
|
||||||
|
// document.getElementById("files").innerHTML += '<br><input type="File" name="userfile[]" size="60">';
|
||||||
document.form1.name.disabled=true;
|
document.form1.name.disabled=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,8 +99,8 @@ $docAccess = $folder->getApproversList();
|
||||||
</table><br>
|
</table><br>
|
||||||
|
|
||||||
<form action="../op/op.AddDocument.php" enctype="multipart/form-data" method="post" name="form1" onsubmit="return checkForm();">
|
<form action="../op/op.AddDocument.php" enctype="multipart/form-data" method="post" name="form1" onsubmit="return checkForm();">
|
||||||
<input type="Hidden" name="folderid" value="<?php print $folderid; ?>">
|
<input type="hidden" name="folderid" value="<?php print $folderid; ?>">
|
||||||
<input type="Hidden" name="showtree" value="<?php echo showtree();?>">
|
<input type="hidden" name="showtree" value="<?php echo showtree();?>">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php printMLText("sequence");?>:</td>
|
<td><?php printMLText("sequence");?>:</td>
|
||||||
|
@ -111,9 +114,9 @@ $docAccess = $folder->getApproversList();
|
||||||
<td><?php printMLText("local_file");?>:</td>
|
<td><?php printMLText("local_file");?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="javascript:addFiles()"><?php printMLtext("add_multiple_files") ?></a>
|
<a href="javascript:addFiles()"><?php printMLtext("add_multiple_files") ?></a>
|
||||||
<div id="files">
|
<ol id="files">
|
||||||
<input type="File" name="userfile[]" size="60">
|
<li><input type="File" name="userfile[]" size="60"></li>
|
||||||
</div>
|
</ol>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user