-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from iamapinan/dev
Dev
- Loading branch information
Showing
16 changed files
with
604 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,21 @@ | ||
![assets/pdpa-consent-banner.png](assets/pdpa-consent-banner.png) | ||
|
||
This WordPress plugin help you to generate Thailand PDPA consent terms page and consent notification popup. | ||
You can edit the term page and publish on your website with elegant and powerful solution. !!! No jquery need at all. | ||
You can edit the term page and publish on your website with elegant and powerful solution. !!! No jquery need at all. | ||
|
||
### Code of conduct | ||
|
||
- ปลั๊กอินนี้จัดทำขึ้นเพื่อตอบสนองต่อการปฏิบัติตาม พ.ร.บ.คุ้มครองข้อมูลส่วนบุคคล 2562 (PDPA) ของประเทศไทย | ||
- ปลั๊กอินนี้จัดทำขึ้นเพื่อแจกฟรี | ||
- ปลั๊กอินไม่มีความประสงค์ที่จะจัดเก็บค่าใช้งานแต่อย่างใด | ||
- ปลั๊กอินไม่ได้รับประกันในด้านความปลอดภัยต่อข้อมูล | ||
- ปลั๊กอินไม่ได้ป้องกันการฟ้องร้องที่อาจเกิดขึ้นโดยคู่กรณีได้ | ||
- ผู้ใช้งานปลั๊กอินเป็นผู้รับผิดชอบและตัดสินใจต่อการใช้และรักษาความปลอดภัยของข้อมูล | ||
- ปลั๊กอินไม่ได้เป็นผู้ประมวลผลข้อมูลหรือใช้ข้อมูลส่วนบุคคล | ||
- ปลั๊กอินไม่ได้เป็นผู้บล็อคการทำงานส่วนหนึ่งส่วนใดของเว็บไซต์ | ||
- ปลั๊กอินจะมีการปรับปรุงเงื่อนไข PDPA ให้รัดกุมมากขึ้นเสมอ | ||
- การบริจาคมิใช่เพื่อเป็นสิ่งแลกเปลี่ยนในการใช้งานปลั๊กอิน PDPA Consent | ||
|
||
|
||
### Download new release | ||
-> [Release page is here.](https://github.com/iamapinan/PDPA-Consent/releases) | ||
|
@@ -14,21 +28,34 @@ You can edit the term page and publish on your website with elegant and powerful | |
### Features | ||
* Customizable message | ||
* Identity setup | ||
* User data list | ||
* Popup placement | ||
* Consent page generate | ||
* Custom CSS | ||
* CSS Class for developer | ||
* Dark mode | ||
* Button color config | ||
* Support WP Super Cache (idea from Cookie Notice plugin) | ||
* Save user action to database | ||
* Display user PDPA Status on user list | ||
* Responsive | ||
* Multi language support (Thai, English) more translate is accept | ||
|
||
### Roadmap | ||
|
||
* Allow user to request profile data. | ||
* Allow user to request to delete account. | ||
* Allow user to allow consent again. | ||
* User page. | ||
* หน้าจัดการข้อมูลของผู้ใช้ | ||
* ผู้ใช้สามารถขอถ่ายโอนข้อมูลได้ | ||
* ผู้ใช้สามารถ ลบหรือขอให้ลบข้อมูลได้ ขึ้นกับนโยบาย | ||
* ผู้ใช้สามารถเลือกการยินยอมใหม่ได้ | ||
* ผู้ใช้สามารถ แก้ไข/ขอให้แก้ไข ข้อมูลที่ยินยอมได้ | ||
* ผู้ใช้สามารถเลือกประเภทข้อมูลที่ยินยอมและไม่ยินยอมได้ | ||
* แบ่งประเภทข้อมูลพื้นฐาน, ข้อมูลละเอียดอ่อน, ข้อมูลทางอ้อม | ||
* เพิ่มเรื่อง การจัดเก็บข้อมูลแต่ละประเภท | ||
* เพิ่มเรื่อง การเผยแพร่ข้อมูลผ่าน API หรือไม่ | ||
* เพิ่มเรื่อง การส่งข้อมูลไปต่างประเทศ หรือไม่ | ||
* เพิ่ม Wizard การตั้งค่า | ||
* ให้ผู้ใช้ต้องติ๊กถูกก่อนคลิกยินยอม โดยค่าเริ่มต้นคือไม่ติ๊ก | ||
* บันทึกประวัติการ ยินยอม/ไม่ยินยอม ย้อนหลัง | ||
* API สำหรับขอความยินยอมเป็นครั้งคราว | ||
* Server อยู่ในต่างประเทศหรือไม่ | ||
|
||
### Contributors. | ||
- **Apinan Woratrakun** *as developer* <[email protected]>, <https://facebook.com/9apinan>, <https://ioblog.me> | ||
|
@@ -37,4 +64,15 @@ You can edit the term page and publish on your website with elegant and powerful | |
[GNU 3.0 License](https://opensource.org/licenses/lgpl-3.0.html0) | ||
|
||
### Special Thank | ||
* Thai Programmer Association | ||
* Thai Programmer Association | ||
* WordPress Bangkok friends | ||
|
||
### Changelogs | ||
|
||
#### 1.0.2 | ||
* Add dark mode | ||
* Button color | ||
* Use page id as privacy page url link | ||
* List of css class for developer | ||
* Remove custom css for security reason | ||
* Fix security and code style |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/** | ||
* User privacy page style | ||
*/ | ||
.pdpa_user_warp { | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
.pdpa_user_warp .user_toolbar { | ||
justify-content: center; | ||
flex-direction: row; | ||
display: flex; | ||
} | ||
.pdpa_user_warp button { | ||
padding: 10px 25px; | ||
border-radius: 30px; | ||
font-size: 16px; | ||
margin: 3px; | ||
} | ||
.pdpa_user_warp .profile-header-top { | ||
display: flex; | ||
justify-content: flex-start; | ||
flex-direction: row; | ||
background: rgb(170,34,195); | ||
background: linear-gradient(0deg, rgba(170,34,195,1) 0%, rgba(253,45,121,1) 100%); | ||
height: 150px; | ||
padding: 10px; | ||
margin-bottom: 25px; | ||
margin-top: 25px; | ||
border-radius: 8px; | ||
} | ||
|
||
.pdpa_user_warp .profile-header-top img { | ||
border-radius: 50%; | ||
width: 96px; | ||
height: 96px; | ||
margin-top: 20px; | ||
margin-left: 20px; | ||
} | ||
|
||
.pdpa_user_warp .profile-header-top .user_title { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: flex-start; | ||
padding-left: 25px; | ||
} | ||
.profile-header-top .user_title h3{ | ||
margin-bottom: 10px; | ||
color: #fff; | ||
} | ||
.profile-header-top .user_title p { | ||
color: rgb(255, 236, 221); | ||
font-size: 0.8em; | ||
} | ||
.profile-header-top .user_title span { | ||
vertical-align: middle; | ||
} | ||
.profile-header-top .user_title .status_bage { | ||
color: #fff; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(()=>{ | ||
|
||
}) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(()=>{ | ||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,17 +3,17 @@ | |
* (c) Apinan Woratrakun <[email protected]> | ||
*/ | ||
console.log(pdpa_ajax.consent_enable) | ||
if(pdpa_ajax.consent_enable == 'yes') { | ||
document.addEventListener("DOMContentLoaded", function() { | ||
if (pdpa_ajax.consent_enable == 'yes') { | ||
document.addEventListener("DOMContentLoaded", function () { | ||
var allow_button = document.getElementById("PDPAAllow") | ||
var not_allow_button = document.getElementById("PDPANotAllow") | ||
var consent_win = document.getElementById("pdpa_screen") | ||
|
||
not_allow_button.addEventListener("click", () => { | ||
pdpa_ajax_call('pdpa-not-allow'); | ||
consent_win.style.display = 'none' | ||
}); | ||
|
||
allow_button.addEventListener("click", () => { | ||
pdpa_ajax_call('pdpa-allow'); | ||
consent_win.style.display = 'none' | ||
|
@@ -23,7 +23,7 @@ document.addEventListener("DOMContentLoaded", function() { | |
|
||
const pdpa_ajax_call = (action_require) => { | ||
var xhr = new XMLHttpRequest(); | ||
var fd = new FormData(); | ||
var fd = new FormData(); | ||
|
||
xhr.open("POST", pdpa_ajax.ajax_url, true); | ||
xhr.onreadystatechange = function () { | ||
|
@@ -33,18 +33,18 @@ const pdpa_ajax_call = (action_require) => { | |
} | ||
}; | ||
|
||
fd.append( "action", "pdpa_action" ); | ||
fd.append( "set_status", action_require ); | ||
fd.append( "security", pdpa_ajax.pdpa_nonce ); | ||
fd.append("action", "pdpa_action"); | ||
fd.append("set_status", action_require); | ||
fd.append("security", pdpa_ajax.pdpa_nonce); | ||
xhr.send(fd); | ||
} | ||
|
||
const cookie_process = ( $d ) => { | ||
const cookie_process = ($d) => { | ||
var cookie_string = ''; | ||
if($d.type == 'user_allow') { | ||
cookie_string = $d.cookie_name+"=1; expires="+$d.cookie_expire+"; domain="+$d.cookie_domain+"; path=/"; | ||
}else if($d.type == 'user_not_allow') { | ||
cookie_string = $d.cookie_name+"=0; expires="+$d.cookie_expire+"; domain="+$d.cookie_domain+"; path=/"; | ||
if ($d.type == 'user_allow') { | ||
cookie_string = $d.cookie_name + "=1; expires=" + $d.cookie_expire + "; domain=" + $d.cookie_domain + "; path=/"; | ||
} else if ($d.type == 'user_not_allow') { | ||
cookie_string = $d.cookie_name + "=0; expires=" + $d.cookie_expire + "; domain=" + $d.cookie_domain + "; path=/"; | ||
} else { | ||
console.log("error.") | ||
} | ||
|
Oops, something went wrong.