Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // code JS
- $(".form-offset").each(function(index, el) {
- var $form = $(this);
- $form.find('select.form-control:visible:first').change(function(){
- $form.submit();
- });
- });
- <?php
- // le form dans la vu
- print $this->Form->create('Users', array(
- 'type' => 'get',
- 'style' => 'padding: 15px;', 'class' => 'pull-left form-offset',
- 'url' => ['controller' => 'patients', 'action' => 'index', $_SERVER['QUERY_STRING']]
- )) .
- $this->Form->input('offset', array(
- 'div' => false,
- 'label' => false,
- 'type' => 'select',
- 'class' => 'form-control',
- 'default' => 10,
- 'options' => array(1 => 1, 10 => 10, 15 => 15, 20 => 20, 30 => 30)
- )) .
- $this->Form->end() .
- $this->Paginator->numbers(array(
- 'tag' => 'li',
- 'after' => '</ul>',
- 'currentTag' => 'a',
- 'separator' => false,
- 'currentClass' => 'active',
- 'before' => '<ul class="pagination pull-right" style="margin-right: 15px;">'
- )); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement