Skip to content

Commit 00d0150

Browse files
committed
autopopulate title and type for mvp and opensource
Signed-off-by: Ismael Ibuan <102030576+iibuan@users.noreply.github.com>
1 parent 26a87f0 commit 00d0150

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/goapp/templates/ipdisclosurerequest.html

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ <h3 class="block text-base font-bold text-gray-700">Involvement</h3>
2323
<template x-for="item in involvementList" :key="item.id">
2424
<div class="flex items-start mt-1">
2525
<div class="flex items-center h-5">
26-
<input type="checkbox" x-model="involvement[item.id]"
26+
<input type="checkbox" @click="involvementSelected(item)"
2727
class="focus:ring-orange-500 h-4 w-4 text-orange-600 border-gray-300 rounded">
2828
</div>
2929
<div class="ml-3 text-sm">
@@ -137,6 +137,23 @@ <h3 class="block text-base font-bold text-gray-700">Reason</h3>
137137
}
138138
}
139139
return false
140+
},
141+
involvementSelected(item) {
142+
this.involvement[item.id] = !this.involvement[item.id]
143+
if (!this.form.title && !this.form.type) {
144+
145+
let value = this.involvementList.find( (x) => {
146+
return item.id == x.id
147+
})
148+
if(value.name === 'MVP') {
149+
this.form.title = 'MVP'
150+
this.form.type = 'MVP Activities'
151+
}
152+
else if(value.name === 'Open Source') {
153+
this.form.title = 'Open Source'
154+
this.form.type = 'Open Source Activities'
155+
}
156+
}
140157
}
141158
}
142159
}

0 commit comments

Comments
 (0)