Code Duplication    Length = 15-18 lines in 2 locations

programs/utilit/agentlist.ui.php 1 location

@@ 414-431 (lines=18) @@
411
        );
412
    }
413
    
414
    protected function idcol()
415
    {
416
        $W = bab_Widgets();
417
        
418
        $select = $W->Select();
419
        $select->addOption('', '');
420
        
421
        $collections = new absences_CollectionIterator();
422
        foreach($collections as $collection) {
423
            $select->addOption($collection->id, $collection->name);
424
        }
425
    
426
        return $W->LabelledWidget(
427
            absences_translate('Collection'),
428
            $select,
429
            __FUNCTION__
430
        );
431
    }
432
    
433
    
434
    

programs/utilit/workperiod_recover_request.ui.php 1 location

@@ 168-182 (lines=15) @@
165
	}
166
	
167
	
168
	protected function id_type()
169
	{
170
		$W = bab_Widgets();
171
		$select = $W->Select();
172
		
173
		require_once dirname(__FILE__).'/workperiod_type.class.php';
174
		
175
		$I = new absences_WorkperiodTypeIterator;
176
		foreach($I as $workperiodType)
177
		{
178
			$select->addOption($workperiodType->id, $workperiodType->name);
179
		}
180
		
181
		return $W->LabelledWidget(absences_translate('Working day type'), $select, __FUNCTION__);
182
	}
183
	
184
	
185
	/**