diff --git a/bundles/org.openhab.ui/web/src/components/rule/rule-general-settings.vue b/bundles/org.openhab.ui/web/src/components/rule/rule-general-settings.vue index f4cd0d7ebb..0ca4435d6d 100644 --- a/bundles/org.openhab.ui/web/src/components/rule/rule-general-settings.vue +++ b/bundles/org.openhab.ui/web/src/components/rule/rule-general-settings.vue @@ -8,12 +8,12 @@ pattern="[A-Za-z0-9_\-]+" error-message="Required. A-Z,a-z,0-9,_,- only" @input="rule.uid = $event.target.value" :clear-button="createMode" /> + :disabled="!editable" @input="rule.name = $event.target.value" :clear-button="editable" /> - + :disabled="!editable" @input="rule.description = $event.target.value" :clear-button="editable" /> + - + @@ -28,10 +28,10 @@ :disabled="true" :info="(createMode) ? 'Note: cannot be changed after the creation' : ''" @input="rule.uid = $event.target.value" :clear-button="createMode" /> + :disabled="true" @input="rule.name = $event.target.value" :clear-button="editable" /> - + :disabled="true" @input="rule.description = $event.target.value" :clear-button="editable" /> + @@ -46,7 +46,7 @@ import TagInput from '@/components/tags/tag-input.vue' export default { - props: ['rule', 'ready', 'createMode', 'isEditable', 'hasRuleTemplate', 'inScriptEditor', 'inSceneEditor'], + props: ['rule', 'ready', 'createMode', 'hasRuleTemplate', 'inScriptEditor', 'inSceneEditor'], components: { TagInput }, @@ -54,6 +54,9 @@ export default { numberOfTags () { if (!this.rule.tags) return 0 return this.rule.tags.filter((t) => !this.isScriptTag(t) && !this.isSceneTag(t)).length + }, + editable () { + return this.rule && this.rule.editable } }, methods: { diff --git a/bundles/org.openhab.ui/web/src/pages/settings/rules/rule-edit.vue b/bundles/org.openhab.ui/web/src/pages/settings/rules/rule-edit.vue index 48fee972e4..f1a33d35b9 100644 --- a/bundles/org.openhab.ui/web/src/pages/settings/rules/rule-edit.vue +++ b/bundles/org.openhab.ui/web/src/pages/settings/rules/rule-edit.vue @@ -50,7 +50,7 @@ - + diff --git a/bundles/org.openhab.ui/web/src/pages/settings/rules/scene/scene-edit.vue b/bundles/org.openhab.ui/web/src/pages/settings/rules/scene/scene-edit.vue index 3e81b11772..c8453b1ecb 100644 --- a/bundles/org.openhab.ui/web/src/pages/settings/rules/scene/scene-edit.vue +++ b/bundles/org.openhab.ui/web/src/pages/settings/rules/scene/scene-edit.vue @@ -50,7 +50,7 @@ - + diff --git a/bundles/org.openhab.ui/web/src/pages/settings/rules/script/script-general-settings.vue b/bundles/org.openhab.ui/web/src/pages/settings/rules/script/script-general-settings.vue index 8b5cd9a59a..d25a4eb465 100644 --- a/bundles/org.openhab.ui/web/src/pages/settings/rules/script/script-general-settings.vue +++ b/bundles/org.openhab.ui/web/src/pages/settings/rules/script/script-general-settings.vue @@ -5,7 +5,7 @@ Scripting Language - @@ -23,6 +23,11 @@ export default { emits: ['newLanguage'], components: { RuleGeneralSettings + }, + computed: { + editable () { + return this.rule && this.rule.editable + } } }