mirror of
				https://github.com/retspen/webvirtcloud
				synced 2025-07-31 12:41:08 +00:00 
			
		
		
		
	Make visible add cdrom/media space/button even if instance is running. Check media and disk for cdrom target dev
This commit is contained in:
		
							parent
							
								
									3dc44662a0
								
							
						
					
					
						commit
						a7e0e49007
					
				
					 2 changed files with 37 additions and 35 deletions
				
			
		|  | @ -475,11 +475,9 @@ | |||
|                                                         <div class="table-responsive"> | ||||
|                                                             <table class="table"> | ||||
|                                                                 <thead> | ||||
|                                                                     <tr> | ||||
|                                                                         <th>{% trans "Name" %}</th> | ||||
|                                                                         <th>{% trans "Date" %}</th> | ||||
|                                                                         <th colspan="2">{% trans "Action" %}</th> | ||||
|                                                                     </tr> | ||||
|                                                                     <th>{% trans "Name" %}</th> | ||||
|                                                                     <th>{% trans "Date" %}</th> | ||||
|                                                                     <th colspan="2">{% trans "Action" %}</th> | ||||
|                                                                 </thead> | ||||
|                                                                 <tbody> | ||||
|                                                                 {% for snap in snapshots %} | ||||
|  | @ -605,25 +603,25 @@ | |||
|                                                         </div> | ||||
|                                                     </form> | ||||
|                                                     <p style="font-weight:bold;">{% trans 'Boot Order' %}</p> | ||||
|                                                     <form class="form-horizontal" action="" method="post" role="form">{% csrf_token %} | ||||
|                                                         <div class="form-group"> | ||||
|                                                             <div class="col-sm-12 col-sm-offset-2"> | ||||
|                                                             {% ifequal status 5 %} | ||||
|                                                                 <p>{% trans "Enable Boot Menu for your instance when it starts up " %} | ||||
|                                                                 {% ifequal bootmenu 0 %} | ||||
|                                                                     <input type="submit" class="btn btn-success" name="set_bootmenu" title="Show boot menu" value="{% trans "Enable" %}"> | ||||
|                                                         <form class="form-horizontal" action="" method="post" role="form">{% csrf_token %} | ||||
|                                                             <div class="form-group"> | ||||
|                                                                 <div class="col-sm-12 col-sm-offset-2"> | ||||
|                                                                 {% ifequal status 5 %} | ||||
|                                                                     <p>{% trans "Enable Boot Menu for your instance when it starts up " %} | ||||
|                                                                     {% ifequal bootmenu 0 %} | ||||
|                                                                         <input type="submit" class="btn btn-success" name="set_bootmenu" title="Show boot menu" value="{% trans "Enable" %}"> | ||||
|                                                                     {% else %} | ||||
|                                                                         <input type="submit" class="btn btn-danger" name="unset_bootmenu" title="Hide boot menu" value="{% trans "Disable" %}"> | ||||
|                                                                     {% endifequal %} | ||||
|                                                                 {% else %} | ||||
|                                                                     <input type="submit" class="btn btn-danger" name="unset_bootmenu" title="Hide boot menu" value="{% trans "Disable" %}"> | ||||
|                                                                     {% ifequal bootmenu 0  %} | ||||
|                                                                         <p>{% trans "**** Please shutdown instance to modify boot menu ****" %}</p> | ||||
|                                                                     {% endifequal %} | ||||
|                                                                 {% endifequal %} | ||||
|                                                             {% else %} | ||||
|                                                                 {% ifequal bootmenu 0  %} | ||||
|                                                                     <p>{% trans "**** Please shutdown instance to modify boot menu ****" %} | ||||
|                                                                 {% endifequal %} | ||||
|                                                             {% endifequal %} | ||||
|                                                             </p> | ||||
|                                                                 </div> | ||||
|                                                             </div> | ||||
|                                                         </div> | ||||
|                                                     </form> | ||||
|                                                         </form> | ||||
|                                                     </p> | ||||
|                                                     {% ifequal bootmenu 1  %} | ||||
|                                                         <div class="col-sm-6 col-sm-offset-2"> | ||||
|                                                         <div class="well"> | ||||
|  | @ -665,16 +663,20 @@ | |||
|                                                     <div class="clearfix"></div> | ||||
|                                                 </div> | ||||
|                                                 <div role="tabpanel" class="tab-pane tab-pane-bordered" id="disks"> | ||||
|                                                     {% if status == 5 %} | ||||
|                                                         <form class="form-horizontal" action="" method="post" role="form">{% csrf_token %} | ||||
|                                                             <p style="font-weight:bold;"> | ||||
|                                                                 {% trans "Instance Media" %} | ||||
|                                                                 <button type="submit" name="add_cdrom" type="button" class="btn btn-success pull-right" title="Add CD-Rom"> | ||||
|                                                                     <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> | ||||
|                                                                 </button> | ||||
|                                                             </p> | ||||
|                                                         </form> | ||||
|                                                 <form class="form-horizontal" action="" method="post" role="form">{% csrf_token %} | ||||
|                                                     <p style="font-weight:bold;"> | ||||
|                                                         {% trans "Instance Media" %} | ||||
|                                                         {% if status == 5 %} | ||||
|                                                             <button type="submit" name="add_cdrom" type="button" class="btn btn-success pull-right" title="Add CD-ROM"> | ||||
|                                                                 <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> | ||||
|                                                             </button> | ||||
|                                                     {% else %} | ||||
|                                                         <button type="submit" type="button" class="btn btn-success disabled pull-right" title="Add CD-ROM" disabled> | ||||
|                                                             <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> | ||||
|                                                         </button> | ||||
|                                                     {% endif %} | ||||
|                                                     </p> | ||||
|                                                 </form> | ||||
|                                                     {% for cd in media %} | ||||
|                                                         <form class="form-horizontal" action="" method="post" role="form">{% csrf_token %} | ||||
|                                                             <div class="form-group"> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue