pathauto.js 548 B

12345678910111213141516171819202122
  1. (function ($) {
  2. Drupal.behaviors.pathFieldsetSummaries = {
  3. attach: function (context) {
  4. $('fieldset.path-form', context).drupalSetSummary(function (context) {
  5. var path = $('.form-item-path-alias input').val();
  6. var automatic = $('.form-item-path-pathauto input').attr('checked');
  7. if (automatic) {
  8. return Drupal.t('Automatic alias');
  9. }
  10. if (path) {
  11. return Drupal.t('Alias: @alias', { '@alias': path });
  12. }
  13. else {
  14. return Drupal.t('No alias');
  15. }
  16. });
  17. }
  18. };
  19. })(jQuery);