mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	UI create form: Support custom checkbox 'on change' event
If field is a checkbox (isBoolean: true) and onChange function is specified, then call this onChange everytime checkbox is clicked.
This commit is contained in:
		
							parent
							
								
									b5d00724fa
								
							
						
					
					
						commit
						7e3b4408cb
					
				| @ -273,6 +273,15 @@ | ||||
|               }, 100); | ||||
|             } | ||||
|           } | ||||
| 
 | ||||
|           // Setup on click event
 | ||||
|           if (field.onChange) { | ||||
|             $input.click(function() { | ||||
|               field.onChange({ | ||||
|                 $checkbox: $input | ||||
|               }); | ||||
|             }); | ||||
|           } | ||||
|         } else if (field.dynamic) { | ||||
|           // Generate a 'sub-create-form' -- append resulting fields
 | ||||
|           $input = $('<div>').addClass('dynamic-input').appendTo($value); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user