summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b20af44)
If you want to copy or rename/move a file or a directory or save a file using a
different name, the form field for the new filename is prefilled with the old
one. Additionally, the entered path is no more relative to the directory of the
original file.
# Dev-Editor's main program
#
# Author: Patrick Canterino <patrick@patshaping.de>
# Dev-Editor's main program
#
# Author: Patrick Canterino <patrick@patshaping.de>
-# Last modified: 2005-06-14
+# Last modified: 2006-08-24
if($newfile ne '' && $newfile !~ /^\s+$/)
{
if($newfile ne '' && $newfile !~ /^\s+$/)
{
- $curdir = upper_path($file) if($curdir eq '');
my $path = $curdir.'/'.$newfile;
# Extract file and directory name...
my $path = $curdir.'/'.$newfile;
# Extract file and directory name...
$tpl->parse_if_block('users',1);
$tpl->parse_if_block('users',1);
- # ID's of user and group
+ # IDs of user and group
$tpl->fillin('UID',$uid);
$tpl->fillin('GID',$gid);
$tpl->fillin('UID',$uid);
$tpl->fillin('GID',$gid);
<input type="hidden" name="file" value="{FILE}">
<p>Copy directory '{FILE}' to:<br>
<input type="hidden" name="file" value="{FILE}">
<p>Copy directory '{FILE}' to:<br>
-{DIR} <input type="text" name="newfile"></p>
+<input type="text" name="newfile" value="{FILE}"></p>
<p><input type="submit" value="Copy directory!"></p>
</form>
<p><input type="submit" value="Copy directory!"></p>
</form>
<input type="hidden" name="file" value="{FILE}">
<p>Copy file '{FILE}' to:<br>
<input type="hidden" name="file" value="{FILE}">
<p>Copy file '{FILE}' to:<br>
-{DIR} <input type="text" name="newfile"> <input type="checkbox" name="confirmed" id="overwrite"><label for="overwrite">Overwrite existing file</label></p>
+<input type="text" name="newfile" value="{FILE}"> <input type="checkbox" name="confirmed" id="overwrite"><label for="overwrite">Overwrite existing file</label></p>
<p><input type="submit" value="Copy file!"></p>
</form>
<p><input type="submit" value="Copy file!"></p>
</form>
<p><textarea name="filecontent" rows="25" cols="120">{CONTENT}</textarea></p>
<p><textarea name="filecontent" rows="25" cols="120">{CONTENT}</textarea></p>
-<p><input type="checkbox" name="saveas" id="newfile" value="1"><label for="newfile">Save as new file: {DIR} </label><input type="text" name="newfile" value="" onchange="if(this.form.newfile.value != '') this.form.saveas.checked = true; else this.form.saveas.checked = false;"></p>
+<p><input type="checkbox" name="saveas" id="newfile" value="1"><label for="newfile">Save as new file: </label><input type="text" name="newfile" value="{FILE}" onchange="if(this.form.newfile.value != '') this.form.saveas.checked = true; else this.form.saveas.checked = false;"></p>
<p><input type="submit" value="Save file and end editing"> <input type="submit" name="continue" value="Save file and continue editing"> <input type="reset" value="Discard changes"></p>
</form>
<p><input type="submit" value="Save file and end editing"> <input type="submit" name="continue" value="Save file and continue editing"> <input type="reset" value="Discard changes"></p>
</form>
<input type="hidden" name="file" value="{FILE}">
<p>Move/Rename file '{FILE}' to:<br>
<input type="hidden" name="file" value="{FILE}">
<p>Move/Rename file '{FILE}' to:<br>
-{DIR} <input type="text" name="newfile"> <input type="checkbox" name="confirmed" id="overwrite"><label for="overwrite">Overwrite existing file</label></p>
+<input type="text" name="newfile" value="{FILE}"> <input type="checkbox" name="confirmed" id="overwrite"><label for="overwrite">Overwrite existing file</label></p>
<p><input type="submit" value="Move/Rename file!"></p>
</form>
<p><input type="submit" value="Move/Rename file!"></p>
</form>