Fix UI issues when editing responses is blocked in forms

pull/1/head
yflory 3 years ago
parent 96132d78f9
commit 669297db4c

@ -2337,6 +2337,10 @@ define([
$cbox.after(h('div.alert.alert-info', Messages.form_authAnswer));
});
}
if (update && content.answers.cantEdit) {
$cbox.hide();
anonName = undefined;
}
var send = h('button.cp-open.btn.btn-primary', update ? Messages.form_update : Messages.form_submit);
var reset = h('button.cp-open.cp-reset-button.btn.btn-danger-alt', Messages.form_reset);
@ -2392,6 +2396,10 @@ define([
$send.text(Messages.form_update);
APP.hasAnswered = true;
showAnsweredPage(framework, content, { '_time': +new Date() });
if (content.answers.cantEdit) {
$cbox.hide();
if ($anonName) { $anonName.hide(); }
}
});
});

@ -221,8 +221,7 @@ define([
delete results[parsed._proof.key];
}
}
// XXX If "allow edition" is disabled, don't override here?
// if (data.cantEdit && results[senderCurve]) { return; }
if (data.cantEdit && results[senderCurve]) { return; }
results[senderCurve] = {
msg: parsed,
hash: hash,

Loading…
Cancel
Save