Skip to content

Commit

Permalink
fix(selectfield): select field cannot support range
Browse files Browse the repository at this point in the history
select field allow to select 0 or 1 choice, then range is useless

Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Jun 25, 2019
1 parent 61e49d6 commit 5138ac1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions inc/fields/selectfield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ public static function getJSFields() {
return "tab_fields_fields['select'] = 'showFields(" . implode(', ', $prefs) . ");';";
}

public function getEmptyParameters() {
return [];
}

public function equals($value) {
return $this->value == $value;
}
Expand Down
2 changes: 1 addition & 1 deletion install/upgrade_to_2.7.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public function upgrade(Migration $migration) {
);
$request = [
'FROM' => $table,
'WHERE' => ['fieldtype' => ['float', 'integer', 'checkboxes', 'select', 'multiselect', 'text', 'textarea']]
'WHERE' => ['fieldtype' => ['float', 'integer', 'checkboxes', 'multiselect', 'text', 'textarea']]
];
foreach ($DB->request($request) as $row) {
$id = $row['id'];
Expand Down

0 comments on commit 5138ac1

Please sign in to comment.