Commit 61e7bce3 authored by Martin Straka's avatar Martin Straka

Message template instead of message forward

parent 8914a2f5
......@@ -88,8 +88,8 @@ Component {
}
ListElement {
index: 5
name: qsTr("Forward")
image: "qrc:/ui/forward.svg"
name: qsTr("Use as template")
image: "qrc:/ui/datovka-email-sample.svg"
showNext: false
}
ListElement {
......@@ -197,7 +197,7 @@ Component {
"userName": userName,
"msgId": msgId,
"msgType": msgType,
"action": "forward"
"action": "template"
}, StackView.Immediate)
}
}
......
......@@ -82,12 +82,12 @@ Item {
setMandate(msgEnvelope)
}
/* Set forward message data and files to attachment model*/
function setForwardData(userName, msgId) {
/* Set message envelope data and files to attachment model*/
function setTemplateData(userName, msgId) {
headerBar.title = qsTr("Forward message %1").arg(msgId) + " (" + userName + ")"
// get some message envelope data, recipient model must be null (no recipient)
var msgEnvelope = messages.getMsgEnvelopeDataAndSetRecipient(userName, msgId, null)
dmAnnotation.text = "Fwd: " + msgEnvelope.dmAnnotation
dmAnnotation.text = msgEnvelope.dmAnnotation
dmSenderRefNumber.text = msgEnvelope.dmSenderRefNumber
dmSenderIdent.text = msgEnvelope.dmSenderIdent
dmRecipientRefNumber.text = msgEnvelope.dmRecipientRefNumber
......@@ -101,8 +101,8 @@ Item {
headerBar.title = qsTr("Create message") + " (" + userName + ")"
} else if (action === "reply") {
setReplyData(userName, msgId)
} else if (action === "forward") {
setForwardData(userName, msgId)
} else if (action === "template") {
setTemplateData(userName, msgId)
}
actionButton.enabled = false
var boxEffectiveOVM = accounts.boxEffectiveOVM(userName)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment