Code Duplication    Length = 24-25 lines in 2 locations

programs/utilit/organization.ui.php 1 location

@@ 125-148 (lines=24) @@
122
    protected $organization;
123
    
124
    
125
    public function __construct(absences_Organization $organization)
126
    {
127
        $W = bab_Widgets();
128
129
        parent::__construct(null, $W->VBoxLayout()->setVerticalSpacing(2,'em'));
130
131
        $this->organization = $organization;
132
133
        $this->setName('organization');
134
        $this->addClass('widget-bordered');
135
        $this->addClass('BabLoginMenuBackground');
136
        $this->addClass('widget-centered');
137
        $this->addClass(Func_Icons::ICON_LEFT_16);
138
        
139
        $this->colon();
140
141
        $this->setCanvasOptions($this->Options()->width(70,'em'));
142
143
        $this->addFields();
144
        $this->setValues($organization->getRow(), array('organization'));
145
146
        $this->addButtons();
147
        $this->setSelfPageHiddenFields();
148
    }
149
    
150
    
151
    

programs/utilit/right.ui.php 1 location

@@ 1318-1342 (lines=25) @@
1315
	
1316
1317
	
1318
	public function __construct(absences_Right $right = null)
1319
	{
1320
		$W = bab_Widgets();
1321
		
1322
		parent::__construct(null, $W->VBoxLayout()->setVerticalSpacing(1,'em'));
1323
		
1324
		$this->right = $right;
1325
		
1326
		$this->setName('right');
1327
		$this->addClass('widget-bordered');
1328
		$this->addClass('BabLoginMenuBackground');
1329
		$this->addClass('widget-centered');
1330
		$this->colon();
1331
		
1332
		$this->setCanvasOptions($this->Options()->width(70,'em'));
1333
		
1334
		
1335
		
1336
		$this->addFields();
1337
		
1338
		$this->addButtons();
1339
		$this->setSelfPageHiddenFields();
1340
		
1341
		$this->setHiddenValue('right[id]', $right->id);
1342
	}
1343
	
1344
	
1345
	protected function addFields()