default to a session cookie instead of setting an explicit timeout, weird timezone...
[freeside.git] / httemplate / edit / part_event.html
index e005cbb..c8072e9 100644 (file)
@@ -1,4 +1,4 @@
-<% include( 'elements/edit.html',
+<& elements/edit.html,
               'name'   => 'Billing event definition',
               'table'  => 'part_event',
               'fields' => [
@@ -31,7 +31,7 @@
                               value   => 'Event Conditions',
                             },
                             { field   => 'conditionname',
-                              type    => 'selectlayers',
+                              type    => 'selectlayersx',
                               options => [ keys %all_conditions ],
                               labels  => \%condition_labels,
                               onchange => 'condition_changed(what);',
@@ -51,7 +51,7 @@
                               value   => 'Event Action',
                             },
                             { field   => 'action',
-                              type     => 'selectlayers',
+                              type     => 'selectlayersx',
                               options  => [ keys %all_actions ],
                               labels   => \%action_labels,
                               onchange => 'action_changed(what);',
@@ -82,8 +82,7 @@
 
               'agent_virt'       => 1,
               'agent_null_right' => 'Edit global billing events',
-          )
-%>
+&>
 <SCRIPT TYPE="text/javascript">
 
   window.onload = function () { eventtable_changed(document.getElementById('eventtable')) };
@@ -500,6 +499,9 @@ tie my %all_conditions, 'Tie::IxHash',
   '' => { 'description' => '*** Select new condition ***', },
   FS::part_event_condition->conditions();
 
+# *** Select new condition *** sorts to the beginning anyway
+(tied %all_conditions)->SortByValue;
+
 my %condition_labels = map { $_ => $all_conditions{$_}->{'description'} }
                            keys %all_conditions;
 
@@ -539,6 +541,8 @@ tie my %all_actions, 'Tie::IxHash',
   '' => { 'description' => '*** Select event action ***', },
   FS::part_event->actions();
 
+(tied %all_actions)->SortByValue;
+
 my %action_labels = map { $_ => $all_actions{$_}->{'description'} }
                         keys %all_actions;