Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

207
Views
¿Cómo actualizar el estado del usuario (múltiples usuarios a la vez usaron ID de checkall)?

mi preocupación es que el usuario seleccione todas las identificaciones y actualice el estado del usuario (por ejemplo: estado = 'asignar')?

Estoy obteniendo esta URL con múltiples identificaciones (cuando marque todo) http://127.0.0.1:9000/assignagent/id/20,21,22,23,24,25,26,27

esta es mi URL real

ruta('agente/id/int:pk',views.SciBulkAssignView.as_view(),name='agente')

vistas.py

 class SciBulkAssignView(UpdateView): login_url = 'login' model = Sci1stKey fields = ['id','projectId','status'] initial = {'status': 'assign'} template_name = 'all_adminhtmlpages/updatesci_details.html' success_url = reverse_lazy('reassigntickets')

y otra vista que probé también

 # def assignagent(request, id): top = get_object_or_404(Sci1stKey, id=id) top.status ='assign' top.save(update_fields=['status']) return redirect('assigntickets')

este es mi código html y js. Estoy seleccionando todas las identificaciones necesarias para actualizar el estado de identificación (casillas de verificación)

 <input type="button" class="main" value="selectall" onclick="checkAll()" name="inputs"> <button type="button" value="deselectAll" class="main" onclick="uncheckAll()">Clear</button> <script type="text/javascript"> // Select all check boxes : Setting the checked property to true in checkAll() function function checkAll(){ var items = document.getElementsByName('brand'); var checkedValue = []; for (var i = 0; i < items.length; i++) { if (items[i].type == 'checkbox') items[i].checked = true; checkedValue.push(items[i].value) ; } console.log(checkedValue); url = '/assignagent/id/' + checkedValue; window.location.replace(url); } // Clear all check boxes : Setting the checked property to false in uncheckAll() function function uncheckAll(){ var items = document.getElementsByName('brand'); for (var i = 0; i < items.length; i++) { if (items[i].type == 'checkbox') items[i].checked = false; } } </script>
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!