Studio: Add message that overriden values cannot be changed

This commit is contained in:
Pieter Vander Vennet 2024-08-13 17:59:27 +02:00
parent 175d69870f
commit 2f16e73572
2 changed files with 7 additions and 1 deletions

View file

@ -10519,6 +10519,7 @@
"name": "Tourism accomodation",
"presets": {
"0": {
"description": "A hotel is an establishment that provides paid lodging, usually on a short-term basis. Rooms are not shared with strangers.",
"title": "a hotel"
},
"1": {

View file

@ -33,6 +33,8 @@
.getSchemaStartingWith(schema.path)
.filter((part) => part.path.length - 1 === schema.path.length)
let usesOverride = value["builtin"] !== undefined
function schemaForMultitype() {
const sch = { ...schema }
sch.hints.typehint = undefined
@ -147,7 +149,10 @@
{/if}
</div>
<div class="normal-background p-2 border border-gray-300">
{#if isTagRenderingBlock}
{#if usesOverride}
This block uses an builtin/override construction and cannot be edited in Studio.
Edit the code directly
{:else if isTagRenderingBlock}
<QuestionPreview {state} {path} {schema}>
<button
on:click={() => {