From c76aaac5425f6622884dedd9e93078b5415721ee Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 18 Aug 2016 12:41:49 +0200 Subject: [PATCH] don't make columns with empty names --- www/poll/main.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/www/poll/main.js b/www/poll/main.js index 49c276eec..1db27f16d 100644 --- a/www/poll/main.js +++ b/www/poll/main.js @@ -300,8 +300,13 @@ define([ $('#adduser').click(function () { if (!module.isEditable) { return; } var id = coluid(); - makeUser(module.rt.proxy, id); - makeUserEditable(id, true).focus(); + + var msg = "Enter a name"; // TODO translate + Cryptpad.prompt(msg, "", function (name) { + if (name === null) { return; } + makeUser(module.rt.proxy, id, name).val(name); + makeUserEditable(id, true).focus(); + }); }); $('#addoption').click(function () {