sweetalert2 php progressStep - PullRequest
       6

sweetalert2 php progressStep

0 голосов
/ 02 сентября 2018

Итак, у меня возникли проблемы с sweetalert2 (я новичок здесь).

У меня есть этот скрипт, и я не знаю, как сделать, чтобы быть с шагом прогресса (см. GIF ниже)

<a href="javascript:void(0)" onclick="givepptoplayer()">Set Premium Points</a></li>


<script>function givepptoplayer() {
                                  swal({

                                        title: 'Change User Premium Points <?php echo $data->name ?>',

                                        input: 'number',

                                        showCancelButton: false,

                                        confirmButtonText: 'edit',

                                        showLoaderOnConfirm: true,

                                        confirmButtonClass: 'btn btn-success',

                                        cancelButtonClass: 'btn btn-danger m-l-10',

                                        allowOutsideClick: false,

                                        inputValue: '',

                                    }).then(function (result) {
                                        $.post('<?php echo config::$_PAGE_URL ?>api/finishthis', { 'userid' : '<?php echo $data->id ?>', 'changePP': result.value}, function(result) 
                                        { 
                                            swal({

                                                type: 'success',

                                                title: 'Succes!',

                                                html: result

                                            });
                                        });

                                    });
                                }</script>

Я хочу, чтобы добиться прогресса. Шаг примерно такой: https://gyazo.com/41f65065108e3937e3afc2a3064ee028

Не могли бы вы дать мне пример, пожалуйста?

...