]> git.immae.eu Git - perso/Immae/Projets/Nodejs/Surfer.git/blobdiff - app/index.html
Set autofocus and add basic error handling
[perso/Immae/Projets/Nodejs/Surfer.git] / app / index.html
index f6561a3755c93749e14327961aba70fb4e3a617f..803568c569698f0f59a4ab1b09e7d9e1ef65acf9 100644 (file)
@@ -60,8 +60,9 @@
                 </div>
                 <div class="modal-body">
                     <form v-on:submit.prevent="createDirectory(createDirectoryData)">
-                        <div class="form-group">
-                            <input type="text" class="form-control" v-model="createDirectoryData" placeholder="Name">
+                        <div class="form-group" v-bind:class="{ 'has-error': createDirectoryError }">
+                            <input type="text" class="form-control" v-model="createDirectoryData" id="inputDirectoryName" placeholder="Name" autofocus="true">
+                            <label class="control-label" for="inputDirectoryName">{{ createDirectoryError }}</label>
                         </div>
                         <button type="submit" style="display: none;"></button>
                     </form>