diff --git a/customize.dist/pages/index.js b/customize.dist/pages/index.js index 3257126e9..8ea334667 100644 --- a/customize.dist/pages/index.js +++ b/customize.dist/pages/index.js @@ -31,7 +31,7 @@ define([ [ 'code', Msg.type.code], [ 'slide', Msg.type.slide], [ 'sheet', Msg.type.sheet], - [ 'poll', Msg.type.poll], + [ 'form', Msg.type.form], [ 'kanban', Msg.type.kanban], [ 'whiteboard', Msg.type.whiteboard], [ 'drive', Msg.type.drive] diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index 60b0571c8..cc13661b6 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -2081,6 +2081,7 @@ define([ if (p === 'file') { return; } if (p === 'accounts') { return; } if (p === 'calendar') { return; } + if (p === 'poll') { return; } // Replaced by forms if (!common.isLoggedIn() && AppConfig.registeredOnlyTypes && AppConfig.registeredOnlyTypes.indexOf(p) !== -1) { return; } return true; diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js index aea222188..b65e8ccf5 100644 --- a/www/common/drive-ui.js +++ b/www/common/drive-ui.js @@ -2557,6 +2557,7 @@ define([ if (type === 'file') { return; } if (type === 'accounts') { return; } if (type === 'calendar') { return; } + if (type === 'poll') { return; } // replaced by forms if (!APP.loggedIn && AppConfig.registeredOnlyTypes && AppConfig.registeredOnlyTypes.indexOf(type) !== -1) { return; diff --git a/www/common/sframe-common.js b/www/common/sframe-common.js index 227656040..6c77fc8f9 100644 --- a/www/common/sframe-common.js +++ b/www/common/sframe-common.js @@ -448,6 +448,7 @@ define([ } }; funcs.createPad = function (cfg, cb) { + var priv = ctx.metadataMgr.getPrivateData(); if (AppConfig.disableAnonymousPadCreation && !funcs.isLoggedIn()) { return void UI.errorLoadingScreen(Messages.mustLogin); } diff --git a/www/poll/main.js b/www/poll/main.js index 644761f32..f238a74a3 100644 --- a/www/poll/main.js +++ b/www/poll/main.js @@ -14,6 +14,10 @@ define([ var obj = SFCommonO.initIframe(waitFor, true); href = obj.href; hash = obj.hash; + if (!hash) { + window.location.href = '/form/'; + waitFor.abort(); + } }).nThen(function (/*waitFor*/) { SFCommonO.start({ hash: hash,