%TMPL:INCLUDE{"twiki"}%
%TMPL:INCLUDE{"rename"}%
%TMPL:DEF{"titleaction"}%%MAKETEXT{"(move attachment)"}% %TMPL:END%



%TMPL:DEF{"webaction"}% *%MAKETEXT{"Move file attachment"}%* %TMPL:END%



%TMPL:DEF{"bodyclassname"}%patternNoViewPage patternRenamePage%TMPL:END%



%TMPL:DEF{"topicactionbuttons"}%<input type="submit" class="twikiSubmit" value=' %MAKETEXT{"Move"}% ' /> %MAKETEXT{"or"}% %TMPL:P{"canceltopicaction"}%%TMPL:END%



%TMPL:DEF{"movewebhelp"}%%MAKETEXT{"To delete an attachment move it to web [_1], topic [_2]." args="*%TRASHWEB%*, *TrashAttachment*"}%%TMPL:END%



%TMPL:DEF{"namehelp"}%%MAKETEXT{"The new topic chosen must already exist."}%%TMPL:END%



%TMPL:DEF{"pagetitle"}%
---+ %MAKETEXT{"Move or Delete File [_1]" args="<code>%FILENAME%</code>"}%
%TMPL:END%



%TMPL:DEF{"toweb"}%
<tr>
<th>%MAKETEXT{"To web:"}%</th>
<td class="patternMainCol"><select name="newweb" onchange="if (document.rename.newweb.value == 'Trash') { document.rename.newtopic.value = 'TrashAttachment'; }"> %WEBLIST{"<option $marker value=$qname>$name</option>" webs="%TRASHWEB%,public" selection="%WEB%" separator=" "}%  </select></td>
<td class="patternMainCol patternHelpCol">%TMPL:P{"movewebhelp"}%</td>
</tr>
%TMPL:END%



%TMPL:DEF{"totopic"}%
<tr>
<th>%MAKETEXT{"Topic name:"}%</th>
<td class="patternMainCol"><input name="newtopic" value="%TOPIC%" /></td>
<td class="patternMainCol patternHelpCol">%TMPL:P{"namehelp"}%</td>
</tr>
%TMPL:END%



%TMPL:DEF{"content"}%
<form name="rename" action="%SCRIPTURLPATH{"rename"}%/%WEB%/%TOPIC%">
%TMPL:P{"pagetitle"}%
<div class="patternVersatileTable">
<table>
<tr>
<th>%MAKETEXT{"Change from:"}%</th>
<td class="patternOldCol"><b><nop>%WEB%.%TOPIC%</b></td>
<td class="patternOldCol patternHelpCol"></td>
</tr>
%TMPL:P{"toweb"}%
%TMPL:P{"totopic"}%
</table>
</div>
<input type="hidden" name="attachment" value="%FILENAME%" />
<div class="twikiHelp">
   * %MAKETEXT{"The attachment and any history will be moved to the new topic."}%
   * %MAKETEXT{"An error page will be shown if either of the topics are locked by another user."}%
   * %MAKETEXT{"Note that any URLs that refer to the attachment will be broken after this move."}%
</div>
%TMPL:P{"topicaction"}%
</form>%TMPL:END%