Fix share modal not using the previous values

This commit is contained in:
yflory
2018-05-28 15:33:49 +02:00
parent 0e9bd156b1
commit 3267268e20

View File

@@ -394,8 +394,11 @@ define([
val = val || {}; val = val || {};
if (val.edit === false) { if (val.edit === false) {
$(link).find('#cp-share-editable-false').prop('checked', true); $(link).find('#cp-share-editable-false').prop('checked', true);
$(link).find('#cp-share-editable-true').prop('checked', false);
} else {
$(link).find('#cp-share-editable-true').prop('checked', true);
$(link).find('#cp-share-editable-false').prop('checked', false);
} }
else { $(link).find('#cp-share-editable-true').prop('checked', true); }
if (val.embed) { $(link).find('#cp-share-embed').prop('checked', true); } if (val.embed) { $(link).find('#cp-share-embed').prop('checked', true); }
if (val.present) { $(link).find('#cp-share-present').prop('checked', true); } if (val.present) { $(link).find('#cp-share-present').prop('checked', true); }
$(link).find('#cp-share-link-preview').val(getLinkValue(val)); $(link).find('#cp-share-link-preview').val(getLinkValue(val));