Commit ede5f325 authored by Philippe Bardou's avatar Philippe Bardou
Browse files

Back to previous commit

parent c288fa02
......@@ -228,24 +228,6 @@ jQuery.validator.addMethod("exclude_required", function(value, element, options)
});
$('.date').datepicker().on('changeDate', function(ev){ $('.date').datepicker('hide');} );
$('.iadd').click(function(){
var localid = $(this).prev().attr('id');
var nb = 1;
var arr = localid.split('_');
if(arr.lenght == 2){
nb = arr[1];
}
var clone = $('#'+localid).clone().attr('id', localid + "_" + nb);
console.log(clone);
$('#'+localid).fadeOut();
$('<input id="' + localid + '_' + nb + '" name="' + localid + '" value="' + $('#'+localid).val() + '" type="text">').insertBefore('#'+localid);
});
$('.idel').click(function() {
alert("remove");
});
// for exclude-required first check if there is no exclusion group with a required option
var excludereq = new Array();
......@@ -402,36 +384,26 @@ jQuery.validator.addMethod("exclude_required", function(value, element, options)
' {{if group != "default" && group.indexOf("exclude-") != 0 && index == 0}}',
' <legend>${param.group}</legend>',
' {{/if}}',
' <label class="control-label">${param.display_name} - ${param.action}</label>',
' <label class="control-label">${param.display_name}</label>',
' <div class="controls">',
// if it's a multiple type
' {{if param.type == "MultipleParameters"}}',
' <blockquote>',
' {{each(spindex, sub_param) param.sub_parameters}}',
' {{if sub_param.type == "bool"}}',
' {{html getParameterDisplay(sub_param, parameterTemplate, "input-medium", sub_param.display_name)}}',
' {{html getParameterDisplay(sub_param, parameterTemplate, "input-medium", sub_param.display_name)}}',
' {{else}}',
' <div class="input-prepend">',
' <span class="add-on">${sub_param.display_name}</span>',
' {{html getParameterDisplay(sub_param, parameterTemplate, "input-medium")}}',
' </div>',
' <div class="input-prepend">',
' <span class="add-on">${sub_param.display_name}</span>',
' {{html getParameterDisplay(sub_param, parameterTemplate, "input-medium")}}',
' </div>',
' {{/if}}',
' <span class="help-block">${sub_param.help}</span> <br />',
' {{/each}}',
' </blockquote>',
' {{else}}',
' {{if param.action == "append"}}',
' <div>',
' <button class="btn iprev" style="display:none" type="button"><i class="icon-chevron-left"></i></button>',
' {{html getParameterDisplay(param, parameterTemplate, "input-large")}}',
' <button class="btn iadd" type="button" pname="${param.name}"><i class="icon-plus-sign"></i></button>',
' <button class="btn idel" style="display:none" type="button"><i class="icon-minus-sign"></i></button>',
' <button class="btn inext" style="display:none" type="button"><i class="icon-chevron-right"></i></button>',
' </div>',
' {{else}}',
' {{html getParameterDisplay(param, parameterTemplate)}}',
' {{/if}}',
' <span class="help-block">${param.help}</span>',
' <span class="help-block">${param.help}</span>',
' {{/if}}',
' </div>',
' </div>',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment