From 91de1661bbdf9843b638d3a689df16cf5b507e04 Mon Sep 17 00:00:00 2001
From: Antonin <antonin.murtin@gmail.com>
Date: Fri, 30 Oct 2015 21:50:44 +0100
Subject: [PATCH] Inlining a change event

---
 js/app/create_poll.js | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/js/app/create_poll.js b/js/app/create_poll.js
index 4a77ab58..ebd87448 100644
--- a/js/app/create_poll.js
+++ b/js/app/create_poll.js
@@ -36,9 +36,8 @@ $(document).ready(function () {
     /**
      * Hide/Show password options
      */
-    var usePassword = $("#use_password");
-    usePassword.change(function(){
-        if (usePassword.prop("checked")) {
+    $("#use_password").change(function(){
+        if ($(this).prop("checked")) {
             $("#password_options").removeClass("hidden");
         } else {
             $("#password_options").addClass("hidden");
-- 
GitLab