Fix weekdays peaktime handling.

agranig/1_0_subfix
Andreas Granig 12 years ago
parent c41dbe80b3
commit 1a61093b9c

@ -457,7 +457,7 @@ sub peaktime_weekdays_edit :Chained('peaktime_weekdays_base') :PathPart('edit')
}
$self->load_weekdays($c);
$c->stash(weekday => $c->stash->{weekdays}->[$c->stash->{weekday_id}]);
$c->stash(form => $form);
$c->stash(form => NGCP::Panel::Form::BillingPeaktimeWeekdays->new);
$c->stash(edit_flag => 1);
}

@ -13,18 +13,29 @@ has_field 'start' => (
type => 'Text',
do_label => 0,
do_wrapper => 0,
element_attr => {
class => ['ngcp_time_range'],
rel => ['tooltip'],
title => ['The start time in format hh:mm:ss']
},
);
has_field 'end' => (
type => 'Text',
do_label => 0,
do_wrapper => 0,
element_attr => {
class => ['ngcp_time_range'],
rel => ['tooltip'],
title => ['The end time in format hh:mm:ss']
},
);
has_field 'add' => (
type => 'Submit',
value => 'Add',
element_class => [qw/btn btn-primary/],
element_class => [qw/btn btn-primary pull-right/],
do_label => 0,
do_wrapper => 0,
);

@ -215,4 +215,8 @@ div.ngcp-modal .control-group.error .dataTables_wrapper input[type="text"] {
.modal-body .control-group .controls input.ngcp_e164_sn {
width: 67%;
float: right;
width: 43%;
}
.modal-body .control-group .controls input.ngcp_time_range {
width: 43%;
}

@ -83,16 +83,19 @@
<div class="modal-body">
[% FOREACH r IN weekday.ranges %]
<input type="text" value="[% r.start %]" disabled="disabled">
<input type="text" value="[% r.end %]" disabled="disabled">
<a href="?delete=[% r.id %]"><i class="icon-trash"></i></a>
<br />
<div class="row-fluid">
<input type="text" value="[% r.start %]" disabled="disabled" class="ngcp_time_range">
<input type="text" value="[% r.end %]" disabled="disabled" class="ngcp_time_range">
<a class="btn btn-primary pull-right" href="?delete=[% r.id %]"><i class="icon-trash"></i></a>
</div>
[% END %]
<div class="row-fluid">
<form action="[% form.action || c.uri_for(c.action,c.req.captures) %]" method="POST">
[% form.field('start').render %]
[% form.field('end').render %]
[% form.field('add').render %]
</form>
</div>
</div>
[%

Loading…
Cancel
Save