Commit 76beb867 authored by Chris Burgess's avatar Chris Burgess
Browse files

Issue #3132708: Improve labels

parent 598acd5f
Loading
Loading
Loading
Loading
+4 −4
Changes for js/advanced-form.js: 4 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -7,15 +7,15 @@
(function ($) {
  Drupal.behaviors.advancedform = {
    attach: function (context) {
      $('.node-form').once().prepend("<button class='advanced-form-toggle btn' type='button' title='Some form elements may be hidden. Switch this form between full and partial detail'>Switch to Advanced</button>");
      $('.node-form').once().prepend("<button class='advanced-form-toggle btn' type='button' title='Some form elements may be hidden. Switch this form between full and partial detail'>Show additional fields</button>");
      $('.advanced-form-toggle').on('click', function () {
        if ($(this).text() == 'Switch to Advanced') {
        if ($(this).text() == 'Show additional fields') {
          $('.node-form').removeClass('advanced-form-filtered');
          $(this).html('Switch to Filtered');
          $(this).html('Hide additional fields');
        }
        else {
          $('.node-form').addClass('advanced-form-filtered');
          $(this).html('Switch to Advanced');
          $(this).html('Show additional fields');
        }
      });