:::

3-2-2 刪除套用 SweetAlert

您沒有觀看影片的權限

您沒有觀看影片的權限

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

  1. 完整參數可以參考:https://www.tad0616.net/modules/tad_book3/page.php?tbsn=15&tbdsn=1713
  2. 先於 class\Tad_signup_actions.php 的最前面加入
    use XoopsModules\Tadtools\SweetAlert;

     

  3. 然後於 class\Tad_signup_actions.php 中,顯示刪除按鈕的地方即 show(),加入:
    //以流水號秀出某筆資料內容
    public static function show($id = '')
    {
        global $xoopsDB, $xoopsTpl;
    
        /*---略---*/
    
        $SweetAlert = new SweetAlert();
        $SweetAlert->render("del_action", "index.php?op=tad_signup_actions_destroy&id=", 'id');
    }

     

  4. 修改 templates\op_tad_signup_actions_show.tpl 中刪除按鈕的連結
    <a href="javascript:del_action('<{$id}>')" class="btn btn-danger">
        <i class="fa fa-times" aria-hidden="true"></i> 刪除活動
    </a>

     

link to https://github.com/tadlearn/tad_signup/commit/7b9f1c6e1ceb07b03620b7d6834105ef0e69055e


:::

搜尋

QR Code 區塊

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

書籍目錄

展開 | 闔起

線上使用者

27人線上 (10人在瀏覽線上書籍)

會員: 0

訪客: 27

更多…