view_counter
3 years ago
block_ips.php
3 years ago
capabilities.php
3 years ago
dark_mode.php
3 years ago
delete.php
3 years ago
export.php
3 years ago
first_day_of_week.php
3 years ago
index.php
3 years ago
track_authenticated_users.php
3 years ago
view_counter.php
3 years ago
capabilities.php
36 lines
| 1 | <div class="user-capability-settings settings-container"> |
| 2 | <h2><?php esc_html_e('User Permissions', 'iawp'); ?></h2> |
| 3 | <p><?php esc_html_e('Decide which users can view the analytics and edit the settings.', 'iawp'); ?></p> |
| 4 | <form id="capabilities-form" method="post" action="options.php"> |
| 5 | <div class="inner"> |
| 6 | <div class="select-container"> |
| 7 | <select id="user-role-select"> |
| 8 | <option><?php esc_html_e('Select a user role to edit', 'iawp'); ?></option> |
| 9 | <?php foreach ($editable_roles as $role): ?> |
| 10 | <option value="<?php esc_attr_e($role['key']); ?>"><?php esc_html_e($role['name']); ?></option> |
| 11 | <?php endforeach; ?> |
| 12 | </select> |
| 13 | </div> |
| 14 | <div class="user-roles"> |
| 15 | <?php foreach ($editable_roles as $role): ?> |
| 16 | <div class="role role-<?php esc_attr_e($role['key']); ?>"> |
| 17 | <select name="<?php esc_attr_e($role['key']); ?>" id=""> |
| 18 | <option value=""><?php esc_html_e('No access', 'iawp'); ?></option> |
| 19 | <?php foreach ($capabilities as $capability_key => $capability_label): ?> |
| 20 | <option value="<?php esc_attr_e($capability_key) ?>" |
| 21 | <?php selected($role[$capability_key]) ?> |
| 22 | > |
| 23 | <?php esc_html_e($capability_label) ?> |
| 24 | </option> |
| 25 | <?php endforeach; ?> |
| 26 | </select> |
| 27 | </div> |
| 28 | <?php endforeach; ?> |
| 29 | </div> |
| 30 | </div> |
| 31 | <p class="note"><?php esc_html_e('Admins can always view the analytics and edit the settings.', 'iawp'); ?></p> |
| 32 | <div class="save-button-container"> |
| 33 | <button id="save-permissions" class="iawp-button purple"><?php esc_html_e('Save Permissions', 'iawp'); ?></button> |
| 34 | </div> |
| 35 | </form> |
| 36 | </div> |