Merge branch 'form' into staging

pull/1/head
ansuz 4 years ago
commit 5e707eba1a

@ -31,7 +31,7 @@ define([
[ 'code', Msg.type.code], [ 'code', Msg.type.code],
[ 'slide', Msg.type.slide], [ 'slide', Msg.type.slide],
[ 'sheet', Msg.type.sheet], [ 'sheet', Msg.type.sheet],
[ 'poll', Msg.type.poll], [ 'form', Msg.type.form],
[ 'kanban', Msg.type.kanban], [ 'kanban', Msg.type.kanban],
[ 'whiteboard', Msg.type.whiteboard], [ 'whiteboard', Msg.type.whiteboard],
[ 'drive', Msg.type.drive] [ 'drive', Msg.type.drive]

@ -2080,6 +2080,7 @@ define([
if (p === 'file') { return; } if (p === 'file') { return; }
if (p === 'accounts') { return; } if (p === 'accounts') { return; }
if (p === 'calendar') { return; } if (p === 'calendar') { return; }
if (p === 'poll') { return; } // Replaced by forms
if (!common.isLoggedIn() && AppConfig.registeredOnlyTypes && if (!common.isLoggedIn() && AppConfig.registeredOnlyTypes &&
AppConfig.registeredOnlyTypes.indexOf(p) !== -1) { return; } AppConfig.registeredOnlyTypes.indexOf(p) !== -1) { return; }
return true; return true;

@ -2557,6 +2557,7 @@ define([
if (type === 'file') { return; } if (type === 'file') { return; }
if (type === 'accounts') { return; } if (type === 'accounts') { return; }
if (type === 'calendar') { return; } if (type === 'calendar') { return; }
if (type === 'poll') { return; } // replaced by forms
if (!APP.loggedIn && AppConfig.registeredOnlyTypes && if (!APP.loggedIn && AppConfig.registeredOnlyTypes &&
AppConfig.registeredOnlyTypes.indexOf(type) !== -1) { AppConfig.registeredOnlyTypes.indexOf(type) !== -1) {
return; return;

@ -448,6 +448,7 @@ define([
} }
}; };
funcs.createPad = function (cfg, cb) { funcs.createPad = function (cfg, cb) {
var priv = ctx.metadataMgr.getPrivateData();
if (AppConfig.disableAnonymousPadCreation && !funcs.isLoggedIn()) { if (AppConfig.disableAnonymousPadCreation && !funcs.isLoggedIn()) {
return void UI.errorLoadingScreen(Messages.mustLogin); return void UI.errorLoadingScreen(Messages.mustLogin);
} }

@ -14,6 +14,10 @@ define([
var obj = SFCommonO.initIframe(waitFor, true); var obj = SFCommonO.initIframe(waitFor, true);
href = obj.href; href = obj.href;
hash = obj.hash; hash = obj.hash;
if (!hash) {
window.location.href = '/form/';
waitFor.abort();
}
}).nThen(function (/*waitFor*/) { }).nThen(function (/*waitFor*/) {
SFCommonO.start({ SFCommonO.start({
hash: hash, hash: hash,

Loading…
Cancel
Save