Index: branches/5.2.x/core/units/forms/form_fields/form_fields_config.php =================================================================== diff -u -N -r16050 -r16388 --- branches/5.2.x/core/units/forms/form_fields/form_fields_config.php (.../form_fields_config.php) (revision 16050) +++ branches/5.2.x/core/units/forms/form_fields/form_fields_config.php (.../form_fields_config.php) (revision 16388) @@ -1,6 +1,6 @@ 'formflds', - 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'), - 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), - 'EventHandlerClass' => Array('class'=>'FormFieldEventHandler','file'=>'form_field_eh.php','build_event'=>'OnBuild'), - 'TagProcessorClass' => Array('class'=>'FormFieldsTagProcessor','file'=>'form_fields_tp.php'), - 'AutoLoad' => true, - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - ), +$config = Array ( + 'Prefix' => 'formflds', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'FormFieldEventHandler', 'file' => 'form_field_eh.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'FormFieldsTagProcessor', 'file' => 'form_fields_tp.php'), - 'IDField' => 'FormFieldId', - 'TitleField' => 'FieldName', - 'TableName' => TABLE_PREFIX.'FormFields', - 'ListSQLs' => Array( - ''=>' SELECT %1$s.* %2$s FROM %1$s', - ), // key - special, value - list select sql - 'ItemSQLs' => Array( - ''=>'SELECT %1$s.* %2$s FROM %1$s', - ), + 'AutoLoad' => true, - 'ForeignKey' => 'FormId', - 'ParentTableKey' => 'FormId', - 'ParentPrefix' => 'form', - 'AutoDelete' => true, - 'AutoClone' => true, + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + ), - 'ListSortings' => Array( - '' => Array( - 'Sorting' => Array('Name' => 'asc'), - ) - ), + 'IDField' => 'FormFieldId', + 'TitleField' => 'FieldName', + 'TableName' => TABLE_PREFIX.'FormFields', + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %1$s', + ), - 'ListSortings' => Array( - '' => Array( - 'ForcedSorting' => Array('Priority' => 'desc'), - 'Sorting' => Array('FieldName' => 'asc'), - ) - ), + 'ForeignKey' => 'FormId', + 'ParentTableKey' => 'FormId', + 'ParentPrefix' => 'form', + 'AutoDelete' => true, + 'AutoClone' => true, - 'Fields' => Array( - 'FormFieldId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'FormId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Type' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'FieldName' => Array('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''), - 'FieldLabel' => Array('type' => 'string', 'required' => 1, 'default' => null), - 'Heading' => Array('type' => 'string', 'default' => null), - 'Prompt' => Array('type' => 'string', 'default' => null, 'required' => 1), - 'ElementType' => Array( - 'type' => 'string', - 'formatter' => 'kOptionsFormatter', 'options' => Array ('text' => 'la_type_text', 'select' => 'la_type_select', 'radio' => 'la_type_radio', 'checkbox' => 'la_type_SingleCheckbox', 'password' => 'la_type_password', 'textarea' => 'la_type_textarea', 'upload' => 'la_type_upload', 'label' => 'la_type_label'), 'use_phrases' => 1, - 'required' => 1, 'not_null' => 1, 'default' => '', - ), - 'ValueList' => Array('type' => 'string','default' => null), - 'Priority' => Array('type' => 'int','not_null' => 1, 'default' => 0), - 'IsSystem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'Required' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'DisplayInGrid' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1), - 'DefaultValue' => Array('type' => 'string', 'default' => NULL), - 'Validation' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(0 => 'la_None', 1 => 'la_ValidationEmail'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'UploadExtensions' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''), - 'UploadMaxSize' => Array ('type' => 'int', 'default' => NULL), - 'Visibility' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Everyone', 2 => 'la_opt_GuestsOnly'), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 1 - ), - 'EmailCommunicationRole' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_RecipientName', 2 => 'la_opt_RecipientEmail', 3 => 'la_opt_EmailSubject', 4 => 'la_opt_EmailBody'), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0 - ), - ), + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('Name' => 'asc'), + ) + ), - 'VirtualFields' => Array( - 'Value' => Array('type' => 'string', 'default' => ''), - 'DirectOptions' => Array('type' => 'string', 'default' => ''), - ), + 'ListSortings' => Array ( + '' => Array ( + 'ForcedSorting' => Array ('Priority' => 'desc'), + 'Sorting' => Array ('FieldName' => 'asc'), + ) + ), - 'CalculatedFields' => Array( - ), - 'Grids' => Array( - 'Default' => Array( - 'Icons' => Array('default'=>'icon16_item.png'), - 'Fields' => Array( - 'FormFieldId' => Array( 'title'=>'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60 ), - 'FieldName' => Array( 'title'=>'la_prompt_FieldName', 'filter_block' => 'grid_like_filter', 'width' => 100 ), - 'FieldLabel' => Array( 'title'=>'la_prompt_FieldLabel', 'data_block' => 'label_grid_data_td', 'filter_block' => 'grid_like_filter', 'width' => 150 ), - 'Priority' => Array('title' => 'la_prompt_Priority', 'filter_block' => 'grid_range_filter', 'width' => 80 ), - 'ElementType' => Array('title' => 'la_prompt_ElementType', 'filter_block' => 'grid_options_filter'), - 'Required' => Array('title' => 'la_prompt_Required', 'filter_block' => 'grid_options_filter'), - 'DisplayInGrid' => Array('title' => 'la_prompt_DisplayInGrid', 'filter_block' => 'grid_options_filter', 'width' => 150 ), - 'Visibility' => Array('filter_block' => 'grid_options_filter', 'width' => 100), - 'EmailCommunicationRole' => Array('filter_block' => 'grid_options_filter', 'width' => 150), - ), - ), - ), - ); + 'Fields' => Array ( + 'FormFieldId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'FormId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Type' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'FieldName' => Array ('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''), + 'FieldLabel' => Array ('type' => 'string', 'required' => 1, 'default' => null), + 'Heading' => Array ('type' => 'string', 'default' => null), + 'Prompt' => Array ('type' => 'string', 'default' => null, 'required' => 1), + 'ElementType' => Array ( + 'type' => 'string', + 'formatter' => 'kOptionsFormatter', 'options' => Array ('text' => 'la_type_text', 'select' => 'la_type_select', 'radio' => 'la_type_radio', 'checkbox' => 'la_type_SingleCheckbox', 'password' => 'la_type_password', 'textarea' => 'la_type_textarea', 'upload' => 'la_type_upload', 'label' => 'la_type_label'), 'use_phrases' => 1, + 'required' => 1, 'not_null' => 1, 'default' => '', + ), + 'ValueList' => Array ('type' => 'string', 'default' => null), + 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'IsSystem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), + 'Required' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), + 'DisplayInGrid' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1), + 'DefaultValue' => Array ('type' => 'string', 'default' => NULL), + 'Validation' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_None', 1 => 'la_ValidationEmail'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), + 'UploadExtensions' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''), + 'UploadMaxSize' => Array ('type' => 'int', 'default' => NULL), + 'Visibility' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Everyone', 2 => 'la_opt_GuestsOnly'), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 1 + ), + 'EmailCommunicationRole' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_RecipientName', 2 => 'la_opt_RecipientEmail', 3 => 'la_opt_EmailSubject', 4 => 'la_opt_EmailBody'), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0 + ), + ), + + 'VirtualFields' => Array ( + 'Value' => Array('type' => 'string', 'default' => ''), + 'DirectOptions' => Array ('type' => 'string', 'default' => ''), + ), + + 'CalculatedFields' => Array ( + ), + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ('default' => 'icon16_item.png'), + 'Fields' => Array ( + 'FormFieldId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60 ), + 'FieldName' => Array ( 'title' => 'la_prompt_FieldName', 'filter_block' => 'grid_like_filter', 'width' => 100 ), + 'FieldLabel' => Array ( 'title' => 'la_prompt_FieldLabel', 'data_block' => 'label_grid_data_td', 'filter_block' => 'grid_like_filter', 'width' => 150 ), + 'Priority' => Array ('title' => 'la_prompt_Priority', 'filter_block' => 'grid_range_filter', 'width' => 80 ), + 'ElementType' => Array ('title' => 'la_prompt_ElementType', 'filter_block' => 'grid_options_filter'), + 'Required' => Array ('title' => 'la_prompt_Required', 'filter_block' => 'grid_options_filter'), + 'DisplayInGrid' => Array ('title' => 'la_prompt_DisplayInGrid', 'filter_block' => 'grid_options_filter', 'width' => 150 ), + 'Visibility' => Array ('filter_block' => 'grid_options_filter', 'width' => 100), + 'EmailCommunicationRole' => Array ('filter_block' => 'grid_options_filter', 'width' => 150), + ), + ), + ), +);