TT#72408 Don't allow permanent reg with negative q-value

Even if kamailo supports negative q-value it will handle them
as positive one creating confusion in customers.

Change-Id: Ia74f798c48191af1aacca5660448b664883b9860
changes/29/36029/3
Marco Capetta 5 years ago
parent 6b56047d03
commit 3eb52a3233

@ -32,15 +32,14 @@ has_field 'q' => (
type => 'Float', type => 'Float',
label => 'Priority (q-value)', label => 'Priority (q-value)',
required => 1, required => 1,
range_start => -1, range_start => 0,
range_end => 1, range_end => 1,
decimal_symbol => '.', decimal_symbol => '.',
default => 1, default => 1,
element_attr => { element_attr => {
rel => ['tooltip'], rel => ['tooltip'],
title => ['The contact priority for serial forking (float value, higher is stronger) between -1.00 to 1.00'] title => ['The contact priority for serial forking (float value, higher is stronger) between 0 and 1.00']
}, },
#validate_method => \&validate_q,
); );
has_field 'socket' => ( has_field 'socket' => (
@ -74,15 +73,6 @@ sub build_socket_options {
return \@options; return \@options;
} }
sub validate_q {
my ($self,$field) = @_;
if(($field->value < -1) || ($field->value > 1)){
$field->add_error('Value of "q" must be a float value between -1 and 1');
return;
}
return 1;
}
=pod =pod
sub validate { sub validate {
my $self = shift; my $self = shift;

@ -91,7 +91,10 @@ $(document).ready(function() {
FOR f IN helper.column_fields; FOR f IN helper.column_fields;
IF helper.column_sort == f; IF helper.column_sort == f;
-%] -%]
[ [% loop.index %], "asc" ], [
[% loop.index %],
'[% helper.column_sort_order || "asc" %]'
],
[% [%
END; END;
END; END;

@ -285,7 +285,9 @@ function process_pbx_items(moveId,direction){
[% [%
helper.name = c.loc('Registered Devices'); helper.name = c.loc('Registered Devices');
helper.identifier = 'registered_devices'; helper.identifier = 'registered_devices';
#helper.column_sort = 'origtime'; helper.column_sort = 'q';
helper.column_sort_order = 'desc';
helper.dt_columns = reg_dt_columns; helper.dt_columns = reg_dt_columns;
helper.close_target = close_target; helper.close_target = close_target;

Loading…
Cancel
Save