Commit 3dd8aaae authored by drumm's avatar drumm
Browse files

Do not show criteria that are not relvant for general projects

parent dbe97b02
......@@ -8968,27 +8968,29 @@ function drupalorg_browse_projects_form($form, &$form_state, $project_type) {
];
}
$options = ['' => t(' - Any -')];
foreach (range(drupalorg_highest_core_major_version(), 4) as $major) {
$options['sm_core_compatibility:' . $major] = t('Drupal @major', ['@major' => $major]);
}
// Core compatibility.
$form['f'][] = [
'#title' => t('Works with'),
'#type' => 'select',
'#options' => $options,
];
if ($project_type->type !== 'project_general') {
$options = ['' => t(' - Any -')];
foreach (range(drupalorg_highest_core_major_version(), 4) as $major) {
$options['sm_core_compatibility:' . $major] = t('Drupal @major', ['@major' => $major]);
}
// Core compatibility.
$form['f'][] = [
'#title' => t('Works with'),
'#type' => 'select',
'#options' => $options,
];
// Add the project sandbox fields.
$form['f'][] = [
'#title' => t('Status'),
'#type' => 'select',
'#options' => [
'sm_field_project_type:full' => t('Full projects'),
'sm_field_project_type:[* TO *]' => t('All projects'),
'sm_field_project_type:sandbox' => t('Only sandbox projects'),
],
];
// Add the project sandbox fields.
$form['f'][] = [
'#title' => t('Status'),
'#type' => 'select',
'#options' => [
'sm_field_project_type:full' => t('Full projects'),
'sm_field_project_type:[* TO *]' => t('All projects'),
'sm_field_project_type:sandbox' => t('Only sandbox projects'),
],
];
}
// Add has stable releases.
$form['f'][] = [
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment