Skip to content
Snippets Groups Projects
Commit 91fca0ee authored by Johannes Hörmann's avatar Johannes Hörmann
Browse files

bulkmail readonly if sent

parent 0f102ee8
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@
<documentation>%aditoprj%/entity/BulkMail_entity/documentation.adoc</documentation>
<icon>VAADIN:AT</icon>
<title>Bulk mail</title>
<grantUpdateProcess>%aditoprj%/entity/BulkMail_entity/grantUpdateProcess.js</grantUpdateProcess>
<contentTitleProcess>%aditoprj%/entity/BulkMail_entity/contentTitleProcess.js</contentTitleProcess>
<iconId>VAADIN:AT</iconId>
<titlePlural>Bulk mails</titlePlural>
......@@ -52,6 +53,7 @@
</entityField>
<entityConsumer>
<name>Recipients</name>
<stateProcess>%aditoprj%/entity/BulkMail_entity/entityfields/recipients/stateProcess.js</stateProcess>
<dependency>
<name>dependency</name>
<entityName>BulkMailRecipient_entity</entityName>
......
import("system.vars");
import("Bulkmail_lib");
import("system.result");
import("system.neon");
if (BulkMailUtils.isStatusSendingOrSent(vars.get("$field.STATUS")))
result.string(neon.COMPONENTSTATE_READONLY);
\ No newline at end of file
......@@ -4,6 +4,6 @@ import("system.vars");
import("system.neon");
var state = neon.COMPONENTSTATE_EDITABLE;
if (vars.get("$field.STATUS") == $KeywordRegistry.bulkMailStatus$beingSent())
if (vars.get("$field.STATUS") == $KeywordRegistry.bulkMailStatus$beingSent() || vars.get("$field.STATUS") != $KeywordRegistry.bulkMailStatus$sent())
state = neon.COMPONENTSTATE_DISABLED;
result.string(state);
\ No newline at end of file
import("Bulkmail_lib");
import("system.vars");
import("system.result");
result.object(!BulkMailUtils.isStatusSendingOrSent);
\ No newline at end of file
......@@ -326,6 +326,15 @@ BulkMailUtils.isValidTemplateType = function (pTemplateType)
}
}
/**
* @param {String} pStatus the keyid of the current status
* @return {Boolean} true if the status is "sent" or "sending"
*/
BulkMailUtils.isStatusSendingOrSent = function (pStatus)
{
return pStatus == $KeywordRegistry.bulkMailStatus$sent() || pStatus == $KeywordRegistry.bulkMailStatus$beingSent()
}
function SerialLetterUtils () {}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment