Projet

Général

Profil

0001-manager-remove-JS-to-populate-slug-field-54649.patch

Benjamin Dauvergne, 10 juin 2021 11:45

Télécharger (1,64 ko)

Voir les différences:

Subject: [PATCH] manager: remove JS to populate slug field (#54649)

It is not used anymore, as slug field are not shown in creation forms
for OUs and Roles.
 .../static/authentic2/manager/js/manager.js    | 18 ------------------
 1 file changed, 18 deletions(-)
src/authentic2/manager/static/authentic2/manager/js/manager.js
184 184
            }
185 185
            return true;
186 186
        });
187
        /* Prepopulate slug fields */
188
        $('#id_slug').data('_changed', false);
189
        $(document).on('change', '#id_slug', function (e) {
190
            $(e.target).data('_changed', true);
191
        });
192
        $(document).on('gadjo:dialog-loaded', function (e, form) {
193
            if ($('#id_slug').val()) {
194
                $('#id_slug').data('_changed', true);
195
            }
196
        });
197
        $(document).on('keyup', '#id_name', function (e) {
198
            var $this = $(this);
199
            var $target = $(e.target);
200
            var $slug = $('#id_slug');
201
            if (! $slug.data('_changed')) {
202
                $slug.val(URLify($target.val()));
203
            }
204
        });
205 187
        var timer;
206 188
        $('#search-form').on('input propertychange change', 'input,select', function (e) {
207 189
          var $form = $('#search-form');
208
-