mirror of https://github.com/MISP/MISP
fix: Fixed an issue with the type restrictions, fixes #1603
- fixes an issue where the type list in the attribute add/edit view wouldn't automatically restrict to the valid optionspull/1610/head
parent
6e4ade823f
commit
07a358eed9
|
@ -46,7 +46,7 @@ class AppController extends Controller {
|
|||
|
||||
public $helpers = array('Utility');
|
||||
|
||||
private $__jsVersion = '2.4.51';
|
||||
private $__jsVersion = '2.4.52';
|
||||
public $phpmin = '5.5.9';
|
||||
public $phprec = '5.6.0';
|
||||
|
||||
|
|
|
@ -138,17 +138,6 @@ var category_type_mapping = new Array();
|
|||
}
|
||||
?>
|
||||
|
||||
function formCategoryChanged(id) {
|
||||
// fill in the types
|
||||
var options = $('#AttributeType').prop('options');
|
||||
$('option', $('#AttributeType')).remove();
|
||||
$.each(category_type_mapping[$('#AttributeCategory').val()], function(val, text) {
|
||||
options[options.length] = new Option(text, val);
|
||||
});
|
||||
// enable the form element
|
||||
$('#AttributeType').prop('disabled', false);
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
initPopoverContent('Attribute');
|
||||
$('#AttributeDistribution').change(function() {
|
||||
|
|
|
@ -95,17 +95,6 @@ var category_type_mapping = new Array();
|
|||
}
|
||||
?>
|
||||
|
||||
function formCategoryChanged(id) {
|
||||
// fill in the types
|
||||
var options = $('#AttributeType').prop('options');
|
||||
$('option', $('#AttributeType')).remove();
|
||||
$.each(category_type_mapping[$('#AttributeCategory').val()], function(val, text) {
|
||||
options[options.length] = new Option(text, val);
|
||||
});
|
||||
// enable the form element
|
||||
$('#AttributeType').prop('disabled', false);
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
initPopoverContent('Attribute');
|
||||
$('#AttributeDistribution').change(function() {
|
||||
|
|
|
@ -2529,14 +2529,15 @@ function getFormInfoContent(property, field) {
|
|||
return content;
|
||||
}
|
||||
|
||||
function formCategoryChanged(context) {
|
||||
var options = $('#' + context + 'Type').prop('options');
|
||||
$('option', $('#' + context + 'Type')).remove();
|
||||
$.each(category_type_mapping[$('#' + context + 'Category').val()], function(val, text) {
|
||||
function formCategoryChanged(id) {
|
||||
// fill in the types
|
||||
var options = $('#AttributeType').prop('options');
|
||||
$('option', $('#AttributeType')).remove();
|
||||
$.each(category_type_mapping[$('#AttributeCategory').val()], function(val, text) {
|
||||
options[options.length] = new Option(text, val);
|
||||
});
|
||||
// enable the form element
|
||||
$('#' + context + 'Type').prop('disabled', false);
|
||||
$('#AttributeType').prop('disabled', false);
|
||||
}
|
||||
|
||||
function malwareCheckboxSetter(context) {
|
Loading…
Reference in New Issue