:::

3-6-6 加入刪除確認功能

您沒有觀看影片的權限

您沒有觀看影片的權限

請先登入,登入後,確認您的權限後,即可觀看影片。

  1. 先於 class\Tad_signup_data.php 的最前面加入
    use XoopsModules\Tadtools\SweetAlert;

     

  2. 然後於 class\Tad_signup_data.php 中,顯示刪除按鈕的地方即 show(),加入 SweetAlert 語法:
    //以流水號秀出某筆資料內容
    public static function show($id = '')
    {
        global $xoopsDB, $xoopsTpl, $xoopsUser;
    
        /*---略---*/
    
        $SweetAlert = new SweetAlert();
        $SweetAlert->render("del_data", "index.php?op=tad_signup_data_destroy&action_id={$action_id}&id=", 'id');
    }
  3. 修改 templates\op_tad_signup_data_show.tpl,改為 SweetAlert 按鈕
    <a href="javascript:del_data('<{$id}>')" class="btn btn-danger">
        <i class="fa fa-times" aria-hidden="true"></i> 取消報名
    </a>

     

link to https://github.com/tadlearn/tad_signup/commit/fe3bf11a3796eed41a544ee584ab5ab65319a89c \


:::

搜尋

QR Code 區塊

https%3A%2F%2Fwww.tad0616.net%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbsn%3D48%26tbdsn%3D1676

書籍目錄

展開 | 闔起

線上使用者

21人線上 (3人在瀏覽線上書籍)

會員: 0

訪客: 21

更多…