Skip to content

Commit

Permalink
Add datepicker on subscription create and edit form
Browse files Browse the repository at this point in the history
Disable scrollIinput for datepicker fields
Add .travis.yml file for CI check
  • Loading branch information
nafiesl committed Nov 22, 2017
1 parent 8ea4151 commit e649d81
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 10 deletions.
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
language: php

php:
- 7.0
- 7.1

before_script:
- travis_retry composer self-update
- travis_retry composer install --prefer-source --no-interaction --dev
- cp .env.example .env
- php artisan key:generate

script:
- vendor/bin/phpunit
3 changes: 2 additions & 1 deletion resources/views/payments/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@
$('#date').datetimepicker({
timepicker:false,
format:'Y-m-d',
closeOnDateSelect: true
closeOnDateSelect: true,
scrollInput: false
});
})();
</script>
Expand Down
3 changes: 2 additions & 1 deletion resources/views/payments/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@
$('#date').datetimepicker({
timepicker:false,
format:'Y-m-d',
closeOnDateSelect: true
closeOnDateSelect: true,
scrollInput: false
});
})();
</script>
Expand Down
5 changes: 3 additions & 2 deletions resources/views/projects/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@
$('#proposal_date').datetimepicker({
timepicker:false,
format:'Y-m-d',
closeOnDateSelect: true
closeOnDateSelect: true,
scrollInput: false
});
})();
</script>
@endsection
@endsection
5 changes: 3 additions & 2 deletions resources/views/projects/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@
$('#proposal_date,#start_date,#end_date').datetimepicker({
timepicker:false,
format:'Y-m-d',
closeOnDateSelect: true
closeOnDateSelect: true,
scrollInput: false
});
})();
</script>
@endsection
@endsection
3 changes: 2 additions & 1 deletion resources/views/projects/fees/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@
$('#date').datetimepicker({
timepicker:false,
format:'Y-m-d',
closeOnDateSelect: true
closeOnDateSelect: true,
scrollInput: false
});
})();
</script>
Expand Down
8 changes: 5 additions & 3 deletions resources/views/reports/payments/daily.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@section('title', 'Laporan Harian : ' . dateId($date))

@section('content')
<?php $dt = Carbon::parse($date); ?>
<?php $dt = Carbon::parse($date);?>

<ul class="breadcrumb hidden-print">
<li>{{ link_to_route('reports.payments.yearly', 'Laporan Tahun ' . $dt->year, ['year' => $dt->year]) }}</li>
Expand Down Expand Up @@ -43,7 +43,7 @@
{{ link_to_route('payments.show','Lihat',[$payment->id],['title' => 'Lihat Detail Pembayaran','target' => '_blank','class' => 'btn btn-info btn-xs']) }}
</td>
</tr>
<?php $total = $payment->in_out == 0 ? $total - $payment->amount : $total + $payment->amount; ?>
<?php $total = $payment->in_out == 0 ? $total - $payment->amount : $total + $payment->amount;?>
@empty
<tr><td colspan="7">{{ trans('payment.not_found') }}</td></tr>
@endforelse
Expand Down Expand Up @@ -71,7 +71,9 @@
(function() {
$('#date').datetimepicker({
timepicker:false,
format:'Y-m-d'
format:'Y-m-d',
closeOnDateSelect: true,
scrollInput: false
});
})();
</script>
Expand Down
21 changes: 21 additions & 0 deletions resources/views/subscriptions/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,24 @@
</div>
</div>
@endsection

@section('ext_css')
{!! Html::style(url('assets/css/plugins/jquery.datetimepicker.css')) !!}
@endsection

@section('ext_js')
{!! Html::script(url('assets/js/plugins/jquery.datetimepicker.js')) !!}
@endsection

@section('script')
<script>
(function() {
$('#start_date,#due_date').datetimepicker({
timepicker:false,
format:'Y-m-d',
closeOnDateSelect: true,
scrollInput: false
});
})();
</script>
@endsection
21 changes: 21 additions & 0 deletions resources/views/subscriptions/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,24 @@
</div>
@endif
@endsection

@section('ext_css')
{!! Html::style(url('assets/css/plugins/jquery.datetimepicker.css')) !!}
@endsection

@section('ext_js')
{!! Html::script(url('assets/js/plugins/jquery.datetimepicker.js')) !!}
@endsection

@section('script')
<script>
(function() {
$('#start_date,#due_date').datetimepicker({
timepicker:false,
format:'Y-m-d',
closeOnDateSelect: true,
scrollInput: false
});
})();
</script>
@endsection

0 comments on commit e649d81

Please sign in to comment.