auto_nodetitle.js 587 B

1234567891011121314151617181920212223
  1. (function ($) {
  2. Drupal.behaviors.auto_nodetitleFieldsetSummaries = {
  3. attach: function (context) {
  4. $('fieldset#edit-auto-nodetitle', context).drupalSetSummary(function (context) {
  5. // Retrieve the value of the selected radio button
  6. var ant = $("input[@name=#edit-auto-nodetitle-ant]:checked").val();
  7. if (ant==0) {
  8. return Drupal.t('Disabled')
  9. }
  10. else if (ant==1) {
  11. return Drupal.t('Automatic (hide title field)')
  12. }
  13. else if (ant==2) {
  14. return Drupal.t('Automatic (if title empty)')
  15. }
  16. });
  17. }
  18. };
  19. })(jQuery);