Commit 113f8d83 authored by Laurent's avatar Laurent
Browse files

dev #74958 set default value for item zone id_origine

parent e12a60ec
......@@ -1126,6 +1126,12 @@ class Cosmo_DataProfileControllerMultiValuesTest extends Cosmo_DataProfileContro
}
/** @test */
public function scriptShouldSetMutiInputsItemIdOrigineTo001() {
$this->assertXPathContentContains('//script', 'values:{"id_origine_zone":["001"],"id_origine_champ":[null]}');
}
/** @test */
public function docTypeWithLabelSkipsShouldHaveAllItsValues() {
$this->assertXPathContentContains('//script', 'values:{"1_label":["am","bm","","em","mm","","","","","","",""],"1_zone":["BDA","BDJ","LFA","LFJ","LDA","LDJ","LCDA","LCDJ","PATIMP","PATMS","PERIP","PATINC"]}',
......
......@@ -152,7 +152,9 @@ class Class_ProfilePrefs extends Class_Entity {
public function getItemIdOrigine() {
$id_origine_zone = $this->getItemIdOrigineZone();
$id_origine_zone = $this->getItemIdOrigineZone()
? $this->getItemIdOrigineZone()
: '001';
$id_origine_champ = $this->getItemIdOrigineChamp();
return ['id_origine_zone' => [$id_origine_zone],
......
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