Code Duplication    Length = 29-29 lines in 2 locations

programs/utilit/right.ui.php 2 locations

@@ 1183-1211 (lines=29) @@
1180
		return $select;
1181
	}
1182
	
1183
	protected function by_earlier_date()
1184
	{
1185
		$W = bab_Widgets();
1186
		
1187
		return $W->VBoxItems(
1188
				$W->VBoxItems(
1189
					$W->FlowItems(
1190
						$W->Label(absences_translate('The right is granted if the field')),
1191
						$this->dirFieldsSelect()->setName('earlier'),
1192
						$W->Label(absences_translate('is set with a date in the user directory entry'))
1193
					)->setSpacing(.5,'em'),
1194
					$W->Label(absences_translate('and the day of the request is:')),
1195
					
1196
					$W->HBoxItems(
1197
						$W->Label(absences_translate('at least')),
1198
						$W->LineEdit()->setSize(3)->setMaxSize(10)->setName('earlier_begin_valid'),
1199
						$W->Label(absences_translate('year(s) after the date set in the directory entry'))
1200
					)->setHorizontalSpacing(.5,'em')->setVerticalAlign('middle'),
1201
					$W->HBoxItems(
1202
						$W->Label(absences_translate('and at more')),
1203
						$W->LineEdit()->setSize(3)->setMaxSize(10)->setName('earlier_end_valid'),
1204
						$W->Label(absences_translate('year(s) after the date set in the directory entry'))
1205
					)->setHorizontalSpacing(.5,'em')->setVerticalAlign('middle')
1206
				)->setSpacing(1,'em'),
1207
				
1208
				$W->Icon(absences_translate('Example: use a field with the user birthday, the criteria will be an age range'), Func_Icons::STATUS_DIALOG_QUESTION)
1209
		
1210
		)->setVerticalSpacing(1,'em')->addClass(Func_Icons::ICON_LEFT_24);
1211
	}
1212
	
1213
	protected function by_later_date()
1214
	{
@@ 1213-1241 (lines=29) @@
1210
		)->setVerticalSpacing(1,'em')->addClass(Func_Icons::ICON_LEFT_24);
1211
	}
1212
	
1213
	protected function by_later_date()
1214
	{
1215
		$W = bab_Widgets();
1216
		
1217
		return $W->VBoxItems(
1218
				$W->VBoxItems(
1219
						$W->FlowItems(
1220
								$W->Label(absences_translate('The right is granted if the field')),
1221
								$this->dirFieldsSelect()->setName('later'),
1222
								$W->Label(absences_translate('is set with a date in the user directory entry'))
1223
						)->setSpacing(.5,'em'),
1224
						$W->Label(absences_translate('and the day of the request is:')),
1225
		
1226
						$W->HBoxItems(
1227
								$W->Label(absences_translate('at least')),
1228
								$W->LineEdit()->setSize(3)->setMaxSize(10)->setName('later_begin_valid'),
1229
								$W->Label(absences_translate('year(s) before the date set in the directory entry'))
1230
						)->setHorizontalSpacing(.5,'em')->setVerticalAlign('middle'),
1231
						$W->HBoxItems(
1232
								$W->Label(absences_translate('and at more')),
1233
								$W->LineEdit()->setSize(3)->setMaxSize(10)->setName('later_end_valid'),
1234
								$W->Label(absences_translate('year(s) before the date set in the directory entry'))
1235
						)->setHorizontalSpacing(.5,'em')->setVerticalAlign('middle')
1236
				)->setSpacing(1,'em'),
1237
				
1238
				$W->Icon(absences_translate('Example: use a field with the user retirment projected date, it will be possible to assign the right in the last years of the employee'), Func_Icons::STATUS_DIALOG_QUESTION)
1239
		
1240
		)->setVerticalSpacing(1,'em')->addClass(Func_Icons::ICON_LEFT_24);
1241
	}
1242
	
1243
	
1244