security.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /**
  3. * Advanced site settings, site section.
  4. */
  5. $strength = _elgg_get_site_secret_strength();
  6. $current_strength = elgg_echo('site_secret:current_strength');
  7. $strength_text = elgg_echo("site_secret:strength:$strength");
  8. $strength_msg = elgg_echo("site_secret:strength_msg:$strength");
  9. if ($strength != 'strong') {
  10. $title = "$current_strength: $strength_text";
  11. $status_msg = elgg_view_module('main', $title, $strength_msg, array(
  12. 'class' => 'elgg-message elgg-state-error'
  13. ));
  14. } else {
  15. $status_msg = "<p>$strength_msg</p>";
  16. }
  17. $regenerate_input = elgg_view("input/checkboxes", array(
  18. 'options' => array(elgg_echo('admin:site:secret:regenerate') => 1),
  19. 'name' => 'regenerate_site_secret'
  20. ));
  21. ?>
  22. <fieldset class="elgg-fieldset" id="elgg-settings-advanced-security">
  23. <legend><?php echo elgg_echo('admin:legend:security'); ?></legend>
  24. <div>
  25. <p><?php echo elgg_echo('admin:site:secret:intro'); ?></p>
  26. <?php
  27. echo $status_msg;
  28. echo $regenerate_input;
  29. ?>
  30. <p class="elgg-text-help">
  31. <?php echo elgg_echo('admin:site:secret:regenerate:help'); ?>
  32. </p>
  33. </div>
  34. </fieldset>