X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=userhandler%2Ftemplates%2Fuser_list.html;h=8de4c6b8384250672f0309041c34585ea2d19a39;hb=refs%2Fchanges%2F04%2F8904%2F1;hp=361784c7888887933a0fd50a44b28848f36d39d0;hpb=e5a130af55131c3437fe3e2b7bb7cdacd0b22add;p=osm%2FLW-UI.git diff --git a/userhandler/templates/user_list.html b/userhandler/templates/user_list.html index 361784c..8de4c6b 100644 --- a/userhandler/templates/user_list.html +++ b/userhandler/templates/user_list.html @@ -1,3 +1,18 @@ + {% extends "base.html" %} {% load get %} {% load date_tag %} @@ -26,7 +41,9 @@ {{ block.super }} {% include 'modal/user_details.html' %} {% include 'modal/user_create.html' %} - {% include 'modal/user_edit.html' %} + {% include 'modal/user_credentials_edit.html' %} + {% include 'modal/user_proj_role_edit.html' %} + {% csrf_token %}
@@ -37,7 +54,7 @@

Users

' + '
'; }, - "targets": 5, + "targets": 4, "orderable": false } ] }); - var select2_groups = $('#projects_edit').select2({ - placeholder: 'Select Projects', - width: '100%', - ajax: { - url: '/projects/list', - dataType: 'json', - processResults: function (data) { - projects = []; - if (data['projects']) { - for (d in data['projects']) { - var project = data['projects'][d]; - projects.push({ - "id": project['_id'], - "text": project['name'] - }); - - } - } - - return { - results: projects - }; - } - } - }); - - var select2_single = $('#default_project_edit').select2({ - placeholder: 'Select Default Project', - width: '100%', - ajax: { - url: '/projects/list', - dataType: 'json', - processResults: function (data) { - projects = []; - if (data['projects']) { - for (d in data['projects']) { - var project = data['projects'][d]; - projects.push({ - id: project['_id'], - text: project['name'] - }); - } - } - - return { - results: projects - }; - } - } - }); setInterval(function () { table.ajax.reload(); @@ -250,7 +213,7 @@ contentType: false, processData: false }).done(function (response, textStatus, jqXHR) { - $('#modal_edit_user').modal('hide'); + $('#modal_edit_user_credentials').modal('hide'); table.ajax.reload(); bootbox.alert({ title: "Result", @@ -268,6 +231,11 @@ }); }); + $("#password2").keyup(validatePswOnCreate); + $("#edit_password2").keyup(validatePswOnEdit); + + $(document).on('click', '.proj-role-map-group-head .btn-add', addMapGroup); + $(document).on('click', '.proj-role-map-group .btn-remove', removeMapGroup); });