Skip to content
This repository has been archived by the owner on May 27, 2023. It is now read-only.

Commit

Permalink
bug fix: disable form validate for upload-file, in update a file.
Browse files Browse the repository at this point in the history
  • Loading branch information
fengyqf committed May 20, 2015
1 parent 808d09d commit cd6bdd4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion php/editfile.php
Expand Up @@ -384,16 +384,18 @@ class="tdt"><?php te("Associations");?>:</td> <td><b><?php if ($_GET['id']!="ne
if ($id=="new") {
$tip="";
echo t("Upload a File");
$file_validate_required='true';
}
else{
$tip=t("If you select a new file, it will replace the current one, <br>while keeping its associations.");
echo t("Replace File");
$file_validate_required='false';
}
?>
</h3></td></tr>
<!-- file upload -->
<tr>
<td class="tdt">File:</td> <td><input validate='required:true' name="file" id="file" size="25" type="file"></td>
<td class="tdt">File:</td> <td><input validate='required:<?php echo $file_validate_required;?>' name="file" id="file" size="25" type="file"></td>
</tr>
</table>
<?php echo $tip?>
Expand Down

0 comments on commit cd6bdd4

Please sign in to comment.