<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title th:text="#{nbscloud.files.rename.title} + ${filename}"/>

    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link th:if="${darkMode}" rel="stylesheet" th:href="@{/css/darkModeColors.css}"/>
    <link th:if="${!darkMode}" rel="stylesheet" th:href="@{/css/lightModeColors.css}"/>
    <link rel="stylesheet" th:href="@{/css/main.css}"/>
    <link rel="stylesheet" th:href="@{/css/files_main.css}"/>
    <link rel="shortcut icon" th:href="@{/favicon.ico}"/>
</head>
<body>
<div id="main-container">
    <div th:replace="includes/header :: header"/>
    <form id="rename-form" action="#" th:action="@{/files/doRename}" th:object="${form}"
          method="post" enctype="multipart/form-data">
        <label for="filename" th:text="#{nbscloud.files.rename.label.filename}"/>
        <input type="text" id="filename" th:field="*{filename}"/>
        <label for="targetDir" th:text="#{nbscloud.files.rename.label.targetDir}"/>
        <!-- We can't use th:field here because of th:selected, they don't work together -->
        <select size="25" id="targetDir" name="targetDir">
            <option th:each="targetDir : ${targetDirs}"
                    th:value="${targetDir}"
                    th:text="${targetDir}"
                    th:selected="${targetDir.equals(currentLocation)}"/>
        </select>
        <input type="hidden" id="originalPath" th:field="*{originalFilename}"/>
        <input type="submit" th:value="#{nbscloud.files.rename.submit}" />
    </form>
    <div th:replace="includes/footer :: footer"/>
</div>
</body>
</html>