from django import template
from django.utils.safestring import mark_safe
from lava_scheduler_app.models import TestJob

register = template.Library()


@register.filter
def get_priority_select(current):
    select = ""
    val = TestJob.PRIORITY_CHOICES
    for priority, label in val:
        check = " checked" if priority == current else ""
        default = " [default]" if current != 50 and priority == 50 else ""
        select += '<input type="radio" name="priority" style="..." id="%s" value="%d"%s>%s%s</input><br/>' %\
                  (label.lower(), priority, check, label, default)
    return mark_safe(select)

@@ -405,32 +405,84 @@
 y == 50 else %22%22%0A
+        select += '%3Clabel class=%22checkbox-inline%22%3E'%0A
         select +
@@ -642,16 +642,45 @@
 efault)%0A
+        select += '%3C/label%3E'%0A
     retu

Use inline radio buttons for priority changes.