Update base.html
This commit is contained in:
		
							parent
							
								
									4917cab857
								
							
						
					
					
						commit
						885d6ba558
					
				|  | @ -61,7 +61,7 @@ | ||||||
|                 <button style="margin-left: 0.5em;" type="button" class="btn btn-outline-primary btn-sm" data-toggle="modal" |                 <button style="margin-left: 0.5em;" type="button" class="btn btn-outline-primary btn-sm" data-toggle="modal" | ||||||
|                     data-target="#modal_new_client"><i class="nav-icon fas fa-plus"></i> New |                     data-target="#modal_new_client"><i class="nav-icon fas fa-plus"></i> New | ||||||
|                     Client</button> |                     Client</button> | ||||||
|                 <button style="margin-left: 0.5em;" type="button" class="btn btn-outline-danger btn-sm" data-toggle="modal" |                 <button id="apply-config-button" style="margin-left: 0.5em; display: none;" type="button" class="btn btn-outline-danger btn-sm" data-toggle="modal" | ||||||
|                     data-target="#modal_apply_config"><i class="nav-icon fas fa-check"></i> Apply |                     data-target="#modal_apply_config"><i class="nav-icon fas fa-check"></i> Apply | ||||||
|                     Config</button> |                     Config</button> | ||||||
|                 {{if .baseData.CurrentUser}} |                 {{if .baseData.CurrentUser}} | ||||||
|  | @ -320,6 +320,32 @@ | ||||||
|             $('[data-toggle="tooltip"]').tooltip() |             $('[data-toggle="tooltip"]').tooltip() | ||||||
|         }) |         }) | ||||||
| 
 | 
 | ||||||
|  |         $(document).ready(function () { | ||||||
|  | 
 | ||||||
|  |                 $.ajax({ | ||||||
|  |                     cache: false, | ||||||
|  |                     method: 'GET', | ||||||
|  |                     url: '{{.basePath}}/test-hash', | ||||||
|  |                     dataType: 'json', | ||||||
|  |                     contentType: "application/json", | ||||||
|  |                     success: function(data) { | ||||||
|  |                         if (data.status) { | ||||||
|  |                             $("#apply-config-button").show() | ||||||
|  |                         } | ||||||
|  |                         else | ||||||
|  |                         { | ||||||
|  |                             $("#apply-config-button").hide() | ||||||
|  |                         } | ||||||
|  |                     }, | ||||||
|  |                     error: function(jqXHR, exception) { | ||||||
|  |                         const responseJson = jQuery.parseJSON(jqXHR.responseText); | ||||||
|  |                         toastr.error(responseJson['message']); | ||||||
|  |                     } | ||||||
|  |                 }); | ||||||
|  | 
 | ||||||
|  |         }); | ||||||
|  | 
 | ||||||
|  |          | ||||||
|         // populateClient function for render new client info |         // populateClient function for render new client info | ||||||
|         // on the client page. |         // on the client page. | ||||||
|         function populateClient(client_id) { |         function populateClient(client_id) { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue