mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
Fix UI issues when editing responses is blocked in forms
This commit is contained in:
parent
45d32f2294
commit
0ac34f1030
@ -2436,6 +2436,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);
|
||||
@ -2491,6 +2495,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…
Reference in New Issue
Block a user