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

Classification admin Grant delete

parent 8c0deb5b
No related branches found
No related tags found
No related merge requests found
import("system.logging");
import("system.result");
import("system.db");
import("system.vars");
import("Sql_lib");
logging.log(db.cell(SqlCondition.begin()
.andPrepare("CLASSIFICATION.CLASSIFICATIONTYPE_ID", vars.get("$field.CLASSIFICATIONTYPEID"))
.buildSql("select count(*) from CLASSIFICATION", "1=2")))
result.object(parseInt(db.cell(SqlCondition.begin()
.andPrepare("CLASSIFICATION.CLASSIFICATIONTYPE_ID", vars.get("$field.CLASSIFICATIONTYPEID"))
.buildSql("select count(*) from CLASSIFICATION", "1=2"))) <= 0);
//{
/*db.deleteData("CLASSIFICATION", "CLASSIFICATION.CLASSIFICATIONTYPE_ID in (" + db.translateStatement(
SqlCondition.begin()
.andPrepare("CLASSIFICATIONTYPE.SCORETYPE", type)
.buildSql("select CLASSIFICATIONTYPE.CLASSIFICATIONTYPEID from CLASSIFICATIONTYPE", "1=2")) + ")");
db.deleteData("CLASSIFICATIONTYPE", SqlCondition.equals("CLASSIFICATIONTYPE.SCORETYPE", type, "1=2"));
db.deleteData("CLASSIFICATIONSCORE", SqlCondition.equals("CLASSIFICATIONSCORE.SCORETYPE", type, "1=2"));*/
//}
//neon.refreshAll();
\ No newline at end of file
.buildSql("select count(*) from CLASSIFICATION", "1=2"))) <= 0);
\ No newline at end of file
......@@ -5,7 +5,6 @@
<title>Classification</title>
<grantCreate v="false" />
<grantDelete v="false" />
<grantDeleteProcess>%aditoprj%/entity/Classification_entity/grantDeleteProcess.js</grantDeleteProcess>
<afterOperatingState>%aditoprj%/entity/Classification_entity/afterOperatingState.js</afterOperatingState>
<titlePlural>Classifications</titlePlural>
<recordContainer>jdito</recordContainer>
......@@ -61,12 +60,12 @@
</entityField>
<entityField>
<name>CLASSIFICATIONGROUP</name>
<title>Group name</title>
<contentType>TEXT</contentType>
<groupable v="true" />
<mandatoryProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationgroup/mandatoryProcess.js</mandatoryProcess>
<textInputAllowed v="true" />
<searchable v="false" />
<titleProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationgroup/titleProcess.js</titleProcess>
<displayValueProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationgroup/displayValueProcess.js</displayValueProcess>
</entityField>
<entityField>
......
......@@ -2,4 +2,4 @@ import("system.neon");
import("system.result");
import("system.vars");
result.object(vars.get("$param.IsAdminMode_param") == 1 && (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT));
\ No newline at end of file
result.object(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT);
\ No newline at end of file
import("system.neon");
import("system.translate");
import("system.vars");
import("system.result");
if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.IsAdminMode_param") && vars.exists("$param.IsAdminMode_param") == "1")
{
result.string(translate.text("Group"));
}
else
{
result.string(translate.text("Group name"));
}
\ No newline at end of file
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