remove experiment field a

This commit is contained in:
Mario Pesch 2021-05-17 17:03:42 +02:00
parent 531db63b85
commit da65e23d3f
2 changed files with 4 additions and 10 deletions

View File

@ -17,12 +17,9 @@ Blockly.Blocks["sensebox_phyphox_init"] = {
Blockly.Blocks["sensebox_phyphox_experiment"] = {
init: function () {
this.setColour(getColour().phyphox);
this.appendDummyInput()
.appendField(Blockly.Msg.sensebox_phyphox_createExperiment)
.appendField(
new Blockly.FieldTextInput("Experiment Name"),
"exeperimentname"
);
this.appendDummyInput().appendField(
Blockly.Msg.sensebox_phyphox_createExperiment
);
this.appendDummyInput()
.appendField(Blockly.Msg.sensebox_phyphox_experimentTitle)
.appendField(new Blockly.FieldTextInput("Experiment Title"), "title");

View File

@ -13,10 +13,7 @@ Blockly.Arduino.sensebox_phyphox_init = function () {
};
Blockly.Arduino.sensebox_phyphox_experiment = function () {
var experimentname = this.getFieldValue("exeperimentname").replace(
/\s+/g,
""
);
var experimentname = "experiment";
var title = this.getFieldValue("title").replace(/[^a-zA-Z0-9]/g, "");
var description = this.getFieldValue("description");
var branch = Blockly.Arduino.statementToCode(this, "view");