Commit b057aef3 authored by merlinofchaos's avatar merlinofchaos

#124789: Disable delete button on filters that have been exposed so people...

#124789: Disable delete button on filters that have been exposed so people stop trying to delete them.
parent 84bbcb1b
......@@ -126,6 +126,7 @@ Views 4.7.x-dev
o #119921: Recent comments block had incorrect filter, causing nodes with just 1 comment not to show up.
o #119463: Double check_plain on breadcrumbs for Views' titles.
o #104941: Inline args URL cache not getting cleared when a view is saved.
o #124789: Disable delete button on filters that have been exposed so people stop trying to delete them.
New features:
o #105620: (Attempt 2) allow modules to alter views tables + arguments
......
......@@ -1591,6 +1591,10 @@ function views_ui_render_section(&$form, $items, $header, $section, &$collapsed)
foreach ($order as $key => $i) {
$row = array();
foreach ($items as $item) {
// Hide the delete button on exposed filters.
if ($item == 'delete' && $section == 'filters' && empty($form[$i]['expose'])) {
$form[$i][$item]['#printed'] = true;
}
if (($key == 0 && ($item == 'up' || $item == 'top')) ||
($key == $count && ($item == 'down' || $item == 'bottom'))) {
$form[$i][$item]['#printed'] = true;
......
Markdown is supported
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