Modify

Opened 6 years ago

Closed 2 years ago

#4832 closed enhancement (duplicate)

Add additional support for admistration user fields (like in permission)

Reported by: anonymous Owned by: rjollos
Priority: normal Component: AutocompleteUsersPlugin
Severity: normal Keywords:
Cc: manski Trac Release: 0.11

Description

it would be nice if the autocomplition for users where also available at the administration sites, like permissions and so on.

Attachments (0)

Change History (5)

comment:1 Changed 5 years ago by ThurnerRupert

  • Cc manski added

what would be necessary to add this to SvnAuthzAdminPlugin, either add another field, or here:

<form id="addgroupmember" class="addnew" method="post"><div><input type="hidden" name="__FORM_TOKEN" value="2aabb428fff0de2c34c35b31" /></div>
 <input type="hidden" name="editgroup" value="mysvngroup" />
 <fieldset>
  <legend>Add Group Member to mysvngroup</legend>
  <div class="field">
   <label>Subject:
    <select name="subject">
     <option value="*">*</option><option value="rupert.thurner">rupert.thurner</option><option value="scott.james">scott.james</option><option value="@anothersvngroup">@anothersvngroup</option>

    </select>
   </label>
  </div>
  <p class="help">Add a new subject to a Subversion group.</p>
  <div class="buttons">
   <input type="submit" name="addgroupmember" value=" Add " />
  </div>
 </fieldset>

</form>

comment:2 Changed 5 years ago by mwehr

  • Summary changed from Add additional support for admistration user fields (like in permission) to Add

Added support for defaultcc plugin (admin section).

===================================================================
--- D:/trac/my_trac/plugins/autocomplete user/autocompleteusers/htdocs/js/autocomplete_admin_default_cc.js	(revision 0)
+++ D:/trac/my_trac/plugins/autocomplete user/autocompleteusers/htdocs/js/autocomplete_admin_default_cc.js	(revision 88)
@@ -0,0 +1,6 @@
+$(document).ready(function() {
+	$("#default-cc").autocomplete("../../../users", {
+		multiple: true,
+		    formatItem: formatItem});
+
+});
\ No newline at end of file
Index: D:/trac/my_trac/plugins/autocomplete user/autocompleteusers/autocompleteusers.py
===================================================================
--- D:/trac/my_trac/plugins/autocomplete user/autocompleteusers/autocompleteusers.py	(revision 87)
+++ D:/trac/my_trac/plugins/autocomplete user/autocompleteusers/autocompleteusers.py	(revision 88)
@@ -138,6 +138,14 @@
                 add_script(req, '%s/js/autocomplete_ticket_cc.js' % self.prefix)
                 if not restrict_owner:
                     add_script(req, '%s/js/autocomplete_ticket.js' % self.prefix)
+        if template =='admin_components.html':
+            add_stylesheet(req, '%s/css/autocomplete.css' % self.prefix)
+            add_script(req, '%s/js/autocomplete.js' % self.prefix)
+            restrict_owner = self.env.config.getbool('ticket', 'restrict_owner')
+            add_script(req, '%s/js/format_item.js' % self.prefix)
+            add_script(req, '%s/js/autocomplete_admin_default_cc.js' % self.prefix)
+
+
         return (template, data, content_type)
 
     def pre_process_request(self, req, handler):

changes for defaultcc plugin

===================================================================
--- D:/trac/my_trac/plugins/defaultcc/defaultcc/admin.py	(revision 89)
+++ D:/trac/my_trac/plugins/defaultcc/defaultcc/admin.py	(revision 90)
@@ -136,7 +136,7 @@
                 filter = Transformer('//form[@id="modcomp"]/fieldset/div[@class="buttons"]')
                 filter = filter.before(tag.div("Default CC:",
                                                tag.br(),
-                                               tag.input(type="text", name="defaultcc", value=cc.cc),
+                                               tag.input(type="text", id="default-cc",name="defaultcc", value=cc.cc),
                                                class_="field")) \
                                                .before(tag.input(type='hidden', name='old_name', value=cc.name))
                 return stream | filter
}}

greetings

comment:3 Changed 5 years ago by mwehr

  • Summary changed from Add to Add additional support for admistration user fields (like in permission)

comment:4 Changed 4 years ago by rjollos

  • Owner changed from k0s to rjollos

Changing ticket owner to be new maintainer.

comment:5 Changed 2 years ago by rjollos

  • Resolution set to duplicate
  • Status changed from new to closed

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.