From eb7f51f6f5e201e64cb0e22263f292ce738309b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Thu, 5 Mar 2020 16:05:06 +0200 Subject: [PATCH] Focus the "name" input in the "Add Project" modal. --- static/js/add_project_modal.js | 5 +++++ templates/accounts/add_project_modal.html | 3 ++- templates/accounts/profile.html | 1 + templates/front/projects.html | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 static/js/add_project_modal.js diff --git a/static/js/add_project_modal.js b/static/js/add_project_modal.js new file mode 100644 index 00000000..737c99d2 --- /dev/null +++ b/static/js/add_project_modal.js @@ -0,0 +1,5 @@ +$(function () { + $("#add-project-modal").on('shown.bs.modal', function () { + $("#add-project-name").focus(); + }) +}); \ No newline at end of file diff --git a/templates/accounts/add_project_modal.html b/templates/accounts/add_project_modal.html index 44ebbe7d..d34c0e46 100644 --- a/templates/accounts/add_project_modal.html +++ b/templates/accounts/add_project_modal.html @@ -12,10 +12,11 @@

Name your project

+ autocomplete="off" />

 

diff --git a/templates/accounts/profile.html b/templates/accounts/profile.html index 3b821ede..186828ed 100644 --- a/templates/accounts/profile.html +++ b/templates/accounts/profile.html @@ -205,6 +205,7 @@ {% compress js %} + {% endcompress %} {% endblock %} diff --git a/templates/front/projects.html b/templates/front/projects.html index 42ffde80..a820968d 100644 --- a/templates/front/projects.html +++ b/templates/front/projects.html @@ -58,6 +58,6 @@ {% compress js %} - + {% endcompress %} {% endblock %}