Ticket #59 (new enhancement)

Opened 8 years ago

Last modified 8 years ago

DataTypes for Preferences

Reported by: aj Assigned to: somebody
Priority: high Milestone:
Component: module - user Severity: normal
Keywords: Cc:

Description (Last modified by demian)

It would be cool if each preference has a reference to a data type. for example a foreign key to data types like this:

INSERT INTO `data_type` (`data_type_id`, `name`,
`regex`, `is_string`, `is_boolean`, `is_number`) VALUES
(1, '0 or 1', '(0|1)', 0, 1, 0),
(2, 'string', '(.*)', 1, 0, 0),
(3, 'positive integer', '([0-9]+)', 0, 0, 1),
(10, 'decimal until 10', '([0-9]{1,2})', 0, 0, 1),
(11, 'decimal until 100', '([0-9]{1,3})', 0, 0, 1);

so we can check inputs on user preferences and most of all: we can list these automagically in preferencemanager... for strings we use textfield, for boolean we use checkbox, for numbers we use comboboxes.

in the output class we can build a function like:

function getPreferenceInput($preferenceId, $value)

which creates the textfield or checkbox or combobox automagically depending on the datatype.

so we can call this function from any html flexy template. and the big idea is: when we insert a new preference, then there is no need anymore to update the templates for this new preference. all is done in a flexy:foreach loop

Change History

04/24/06 10:57:47 changed by demian

  • priority changed from normal to high.
  • description changed.