[Bps-public-commit] RT-Extension-PriorityAsString branch, empty-option, created. 0.04-3-g900f38c

? sunnavy sunnavy at bestpractical.com
Fri Jan 6 03:36:56 EST 2012


The branch, empty-option has been created
        at  900f38ce411023932463bfdca59f09a2a5f8e51b (commit)

- Log -----------------------------------------------------------------
commit 900f38ce411023932463bfdca59f09a2a5f8e51b
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Jan 6 15:49:55 2012 +0800

    always show an empty option so people can reset priority to undef

diff --git a/html/Elements/SelectPriority b/html/Elements/SelectPriority
index bebec4b..05f6afa 100644
--- a/html/Elements/SelectPriority
+++ b/html/Elements/SelectPriority
@@ -1,5 +1,5 @@
 <select class="select-priority" name="<% $Name %>">
-% unless ( defined $Default ) {
+% if ( RT->Config->Get('PriorityAsStringAllowEmpty') || ! defined $Default ) {
 <option value="">-</option>
 % }
 <%PERL>
diff --git a/lib/RT/Extension/PriorityAsString.pm b/lib/RT/Extension/PriorityAsString.pm
index 6000f3a..e9db9f3 100644
--- a/lib/RT/Extension/PriorityAsString.pm
+++ b/lib/RT/Extension/PriorityAsString.pm
@@ -23,6 +23,7 @@ RT::Extension::PriorityAsString - show priorities in RT as strings instead of nu
     # if you don't specify this, the strings in the PriorityAsString
     # hash will be sorted and displayed
     Set(@PriorityAsStringOrder, qw(Low Medium High));
+    Set($PriorityAsStringAllowEmpty, 1);
 
 =head1 INSTALLATION
 

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list