Skip to content
Snippets Groups Projects
Commit f5f2046d authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Added broadcastMessage option

parent f967bd0f
No related branches found
No related tags found
No related merge requests found
...@@ -99,6 +99,7 @@ ...@@ -99,6 +99,7 @@
v-bind:observationId="observation.observationId" v-bind:observationId="observation.observationId"
@observationIllustrationSetUpdated="handleObservationIllustrationSetUpdated" /> @observationIllustrationSetUpdated="handleObservationIllustrationSetUpdated" />
<div ref='divObservationText' class="form-group"> <div ref='divObservationText' class="form-group">
<div> <div>
...@@ -110,10 +111,16 @@ ...@@ -110,10 +111,16 @@
<div><textarea v-model="observation.observationText" class="form-control" rows="4" <div><textarea v-model="observation.observationText" class="form-control" rows="4"
:placeholder="$t('observation.detail.body.placeholder')" /></div> :placeholder="$t('observation.detail.body.placeholder')" /></div>
</div> </div>
<!--div v-show="isSync"><sync ref="sync" :isSyncNeeded="isSync"/></div-->
<div class="form-group">
<div class="checkbox">
<label>
<input type="checkbox" v-model="observation.broadcastMessage" name="broadcastMessage" checked="checked">
</label>
{{ $t("observation.broadcast.label") }}
<font-awesome-icon icon="fa-solid fa-circle-question" class="helpIcon" onclick="document.getElementById('infoModal').style.display = 'block';"/>
</div>
</div>
<div v-if="observation.deleted"></div> <div v-if="observation.deleted"></div>
<div v-else class="float-right"> <div v-else class="float-right">
...@@ -121,6 +128,12 @@ ...@@ -121,6 +128,12 @@
<a v-show="isDeleteBttnVisible" class="vips-btn danger" <a v-show="isDeleteBttnVisible" class="vips-btn danger"
v-on:click="callForRemoveObservation">{{$t("delete.label")}}</a> v-on:click="callForRemoveObservation">{{$t("delete.label")}}</a>
</div> </div>
<div class="centeredModal" id="infoModal" onclick="this.style.display='none';">
<font-awesome-icon icon="fa-solid fa-circle-question"/>
<p>{{ $t("observation.broadcast.helptext") }}</p>
</div>
<sync ref="sync" /> <sync ref="sync" />
</div> </div>
...@@ -778,4 +791,19 @@ ...@@ -778,4 +791,19 @@
#divSchemaForm { #divSchemaForm {
padding: 10px; padding: 10px;
} }
</style> .centeredModal {
\ No newline at end of file position: fixed;
display: none;
width: 95%;
padding: 10px;
border: 2px solid #3d8052;
border-radius: 5px;
background-color: white;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.helpIcon {
color: #3d8052;
}
</style>
...@@ -43,7 +43,8 @@ ...@@ -43,7 +43,8 @@
</div> </div>
</div> </div>
<div class="centeredModal" id="observationModal" onclick="this.style.display='none';"> <div class="centeredModal" id="observationModal" onclick="this.style.display='none';">
<img :src="modalImageBase64Data" class="img-fluid" /></div> <img :src="modalImageBase64Data" class="img-fluid" />
</div>
</div> </div>
</div> </div>
......
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
"observation.quantification.form.label": "Observasjon quantification", "observation.quantification.form.label": "Observasjon quantification",
"observation.detail.heading.placeholder": "Heading (What was found and where?)", "observation.detail.heading.placeholder": "Heading (What was found and where?)",
"observation.detail.body.placeholder": "Text body (more details, please)", "observation.detail.body.placeholder": "Text body (more details, please)",
"observation.broadcast.label": "Visible for others in VIPS",
"observation.broadcast.helptext": "The observation description will be readable by others, and notification subscribers will receive push messages. Geographic visibility is controlled by the select list under the map.",
"observation.map.label": "Observation Map", "observation.map.label": "Observation Map",
"observation.msg": "Observation", "observation.msg": "Observation",
"observation.selectcrop": "Select crop", "observation.selectcrop": "Select crop",
...@@ -62,7 +64,7 @@ ...@@ -62,7 +64,7 @@
"err.observation.remove.warn": "This Observation will be removed", "err.observation.remove.warn": "This Observation will be removed",
"sync": "Sync to server", "sync": "Sync to server",
"settings.heading": "Settings", "settings.heading": "Settings",
"visibility.label.undefined": "Select visibility", "visibility.label.undefined": "Select geographic visibility",
"visibility.label.private": "Private", "visibility.label.private": "Private",
"visibility.label.public": "Public", "visibility.label.public": "Public",
"index.header": "Field observations", "index.header": "Field observations",
......
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
"observation.quantification.form.label": "Observasjonsspesifikke detaljer", "observation.quantification.form.label": "Observasjonsspesifikke detaljer",
"observation.detail.heading.placeholder": "Overskrift (Hva er funnet hvor?)", "observation.detail.heading.placeholder": "Overskrift (Hva er funnet hvor?)",
"observation.detail.body.placeholder": "Brødtekst (Flere detaljer)", "observation.detail.body.placeholder": "Brødtekst (Flere detaljer)",
"observation.broadcast.label": "Synlig for andre i VIPS",
"observation.broadcast.helptext": "Beskrivelsen av observasjonen vil kunne leses av andre, og de som abonnerer på meldinger om denne skadegjøreren/kulturen vil bli informert. Geografisk synlighet styres av valglisten under kartet.",
"observation.map.label": "Velg plassering", "observation.map.label": "Velg plassering",
"observation.msg": "Registrer observasjon", "observation.msg": "Registrer observasjon",
"observation.selectcrop": "Velg kultur", "observation.selectcrop": "Velg kultur",
...@@ -62,7 +64,7 @@ ...@@ -62,7 +64,7 @@
"err.observation.remove.warn": "Observasjonen vil bli slettet", "err.observation.remove.warn": "Observasjonen vil bli slettet",
"sync": "Synkroniser med server", "sync": "Synkroniser med server",
"settings.heading": "Innstillinger", "settings.heading": "Innstillinger",
"visibility.label.undefined": "Velg synlighet", "visibility.label.undefined": "Velg geografisk synlighet",
"visibility.label.private": "Privat", "visibility.label.private": "Privat",
"visibility.label.public": "Offentlig", "visibility.label.public": "Offentlig",
"index.header": "Feltobservasjoner", "index.header": "Feltobservasjoner",
......
...@@ -29,6 +29,8 @@ import { faMagnifyingGlassPlus } from '@fortawesome/free-solid-svg-icons' ...@@ -29,6 +29,8 @@ import { faMagnifyingGlassPlus } from '@fortawesome/free-solid-svg-icons'
library.add(faMagnifyingGlassPlus); library.add(faMagnifyingGlassPlus);
import { faUser } from '@fortawesome/free-solid-svg-icons' import { faUser } from '@fortawesome/free-solid-svg-icons'
library.add(faUser); library.add(faUser);
import { faCircleQuestion } from '@fortawesome/free-solid-svg-icons'
library.add(faCircleQuestion);
import { faTrashCan } from '@fortawesome/free-regular-svg-icons' import { faTrashCan } from '@fortawesome/free-regular-svg-icons'
library.add(faTrashCan); library.add(faTrashCan);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment