system.php 863 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * Advanced site settings, system section.
  4. */
  5. ?>
  6. <fieldset class="elgg-fieldset" id="elgg-settings-advanced-system">
  7. <legend><?php echo elgg_echo('admin:legend:system');?></legend>
  8. <?php foreach (['wwwroot', 'path', 'dataroot'] as $field) {
  9. $warning = false;
  10. $label = elgg_echo('installation:' . $field);
  11. $params = [
  12. 'name' => $field,
  13. 'value' => elgg_get_config($field)
  14. ];
  15. if ($field == 'dataroot' && elgg_get_config('dataroot_in_settings')) {
  16. $params['readonly'] = true;
  17. $params['class'] = 'elgg-state-disabled';
  18. $warning = elgg_echo('admin:settings:in_settings_file');
  19. }
  20. $input = elgg_view("input/text", $params);
  21. if ($warning) {
  22. $input = "<span class=\"elgg-text-help\">$warning</span>";
  23. }
  24. ?>
  25. <div>
  26. <label>
  27. <?php
  28. echo $label;
  29. echo $input;
  30. ?>
  31. </label>
  32. </div>
  33. <?php } ?>
  34. </fieldset>