Пример #1
0
     } else {
         $checked = isset($data['checked']) && $data['checked'] === true ? array('checked') : array();
     }
     $page->FormRadiobox($data['value'], $data['keyword'], $mask->ReplaceKeywords($data['text']), $checked);
     break;
 case 'textbox':
     $value = GetAdditionalControlValue($data['keyword'], $data['value']);
     $value = $value === false ? $data['value'] : $value;
     $hasErrors = HasTextInputErrors($data, $value) || $hasErrors ? true : false;
     $page->FormInput($value, $data['keyword']);
     break;
 case 'textarea':
     $value = GetAdditionalControlValue($data['keyword'], $data['value']);
     $value = $value === false ? $data['value'] : $value;
     $hasErrors = HasTextInputErrors($data, $value) || $hasErrors ? true : false;
     $page->FormTextarea($value, $data['keyword']);
     break;
 case 'label':
     $page->Label($mask->ReplaceKeywords($data['text']));
     break;
 case 'paragraph':
     $page->Paragraph($mask->ReplaceKeywords($data['text']));
     break;
 case 'space':
     $page->Paragraph(' ');
     break;
 default:
     if (isset($data['text'])) {
         $page->Paragraph($mask->ReplaceKeywords($data['text']));
     } else {
         $page->Paragraph(' ');
Пример #2
0
						CheckControlAttributes($data, 
							array('type','keyword','value','numeric','mustfill'),
							array('minval','maxval','minlen','maxlen'), 							
							array('text','value_on','value_off','checked'));
						
						$data = FillInAllAttributes($data);							
						$page->FormInput($data['value'], $data['keyword']);
						break;
					case 'textarea':
						CheckControlAttributes($data, 
							array('type','keyword','value','numeric','mustfill'),
							array('minval','maxval','minlen','maxlen'), 							
							array('text','value_on','value_off','checked'));

						$data = FillInAllAttributes($data);
						$page->FormTextarea($data['value'], $data['keyword']);
						break;

					case 'label':
						$page->Label($mask->ReplaceKeywords($data['text']));
						break;
					case 'paragraph':
						$page->Paragraph($mask->ReplaceKeywords($data['text']));
						break;
					case 'space':
						$page->Paragraph(' ');
						break;
					default: 
						if(isset($data['text']))
							 $page->Paragraph($mask->ReplaceKeywords($data['text']));
						else $page->Paragraph(' ');