mirror of
				https://github.com/netbox-community/netbox.git
				synced 2024-05-10 07:54:54 +00:00 
			
		
		
		
	Closes #1781: Enable bulk renaming of device components
This commit is contained in:
		
							
								
								
									
										56
									
								
								netbox/templates/dcim/bulk_rename.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								netbox/templates/dcim/bulk_rename.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,56 @@ | ||||
| {% extends '_base.html' %} | ||||
| {% load helpers %} | ||||
| {% load form_helpers %} | ||||
|  | ||||
| {% block content %} | ||||
|     <h1>{% block title %}Renaming {{ selected_objects|length }} {{ obj_type_plural|bettertitle }}{% endblock %}</h1> | ||||
|     <div class="row"> | ||||
|         <div class="col-md-7"> | ||||
|             <table class="table"> | ||||
|                 <thead> | ||||
|                     <tr> | ||||
|                         <th>Current Name</th> | ||||
|                         <th>New Name</th> | ||||
|                     </tr> | ||||
|                 </thead> | ||||
|                 <tbody> | ||||
|                     {% for obj in selected_objects %} | ||||
|                         <tr> | ||||
|                             <td>{{ obj.name }}</td> | ||||
|                             <td>{{ obj.new_name }}</td> | ||||
|                         </tr> | ||||
|                     {% endfor %} | ||||
|                 </tbody> | ||||
|             </table> | ||||
|         </div> | ||||
|         <div class="col-md-5"> | ||||
|             <form action="" method="post" class="form form-horizontal"> | ||||
|                 {% csrf_token %} | ||||
|                 {% if form.non_field_errors %} | ||||
|                     <div class="panel panel-danger"> | ||||
|                         <div class="panel-heading"><strong>Errors</strong></div> | ||||
|                         <div class="panel-body"> | ||||
|                             {{ form.non_field_errors }} | ||||
|                         </div> | ||||
|                     </div> | ||||
|                 {% endif %} | ||||
|                 <div class="panel panel-default"> | ||||
|                     <div class="panel-heading"><strong>Rename</strong></div> | ||||
|                     <div class="panel-body"> | ||||
|                         {% render_form form %} | ||||
|                     </div> | ||||
|                 </div> | ||||
|                 <div class="form-group text-right"> | ||||
|                     <div class="col-md-12"> | ||||
|                         {% if '_preview' in request.POST and not form.errors %} | ||||
|                             <button type="submit" name="_apply" class="btn btn-primary">Apply</button> | ||||
|                         {% else %} | ||||
|                             <button type="submit" name="_preview" class="btn btn-primary">Preview</button> | ||||
|                         {% endif %} | ||||
|                         <a href="{{ return_url }}" class="btn btn-default">Cancel</a> | ||||
|                     </div> | ||||
|                 </div> | ||||
|             </form> | ||||
|         </div> | ||||
|     </div> | ||||
| {% endblock %} | ||||
		Reference in New Issue
	
	Block a user