]> git.p6c8.net - devedit.git/commitdiff
Small improvement for the JavaScript code which activates the checkbox for
authorpcanterino <>
Sun, 4 Jul 2004 13:52:19 +0000 (13:52 +0000)
committerpcanterino <>
Sun, 4 Jul 2004 13:52:19 +0000 (13:52 +0000)
saving under a different file name:
If the field for the file name is empty, the checkbox will be deactivated.

templates/editfile.htm

index 74b6bebea0567afdfd5e6c0cdc4a5fdb69d28815..017630d8169137dce3318eef9bb42f47fe7fee44 100644 (file)
@@ -28,7 +28,7 @@
 <tr>
 <td width="50%" align="center">
 <input type="hidden" name="file" value="{FILE}">
-<input type="checkbox" name="saveas" value="1"> Save as new file: {DIR} <input type="text" name="newfile" value="" onchange="this.form.saveas.checked=true"></td>
+<input type="checkbox" name="saveas" value="1"> Save as new file: {DIR} <input type="text" name="newfile" value="" onchange="if(this.form.newfile.value != '') this.form.saveas.checked = true; else this.form.saveas.checked = false;"></td>
 <td width="50%" align="center"><input type="checkbox" name="encode_iso" value="1"> Encode ISO-8859-1 special chars</td>
 </tr>
 <tr>

patrick-canterino.de