Code Duplication    Length = 14-15 lines in 2 locations

programs/utilit/archive.ui.php 1 location

@@ 67-80 (lines=14) @@
64
	
65
66
	
67
	protected function year()
68
	{
69
		$W = bab_Widgets();
70
		
71
		
72
		$options = $this->getOptions();
73
		ksort($options);
74
		
75
		return $W->LabelledWidget(
76
				absences_translate('Year to archive'),
77
				$W->RadioSet()->setOptions($options),
78
				__FUNCTION__
79
		)->setValue(key($options));
80
	}
81
82
83

programs/utilit/options.ui.php 1 location

@@ 192-206 (lines=15) @@
189
	
190
	
191
	
192
	protected function id_chart()
193
	{
194
		
195
		$W = bab_Widgets();
196
		$select = $W->Select();
197
198
		$arr = bab_OCGetGroupDirOrgCharts();
199
		$select->setOptions($arr);
200
		
201
		// ne pas permettre une valeur vide car les anciennes version n'avais pas ce parametre
202
		// mais utilisais malgre tout l'organigramme
203
		$select->setValue(bab_OCgetPrimaryOcId());
204
		
205
		return $W->LabelledWidget(absences_translate('Organization chart used for delegated management'), $select, __FUNCTION__);
206
	}
207
	
208
	
209
	protected function boolfield($name, $title, $description = null)