';
$("#" + containerid).append(html1);
var value = Number($('#MultipleSubFormIndex').val());
$('#MultipleSubFormIndex').val(value + 1);
}
}
LoadCheckListForm(Index) {
var len = $('.CheckList-row').length;
if (len == 0) {
len = 1;
}
let html = '
Add Check Lists
' +
'
' +
'
' +
'
' +
'
' +
'
' +
'
' +
'
' +
'
' +
'
' +
'
' +
'' +
'
' +
'
';
$('#div_' + $("#Subform_DocPropertyName").val() + '_' + $("#subform_FormPropertyId").val() + '').after(html);
}
addNewCheckListItem(len) {
var currentindex = 0;
var formpropertyid = 0;
var Index = Number(currentindex);
var d = $(".hf_CheckListId").val();
var i = Number(d);
if (d == undefined) {
Index = Index + 1;
}
else {
Index = i + 1;
}
$("#SubFormIndex").val(Index);
var BasicaddNewCheckListItem_Template = Unibase.Forms.Controls.SubForm.Instance().GetCheckListItem(Index, formpropertyid);
var container_div = '
' + BasicaddNewCheckListItem_Template + '
';
$('#div_' + $("#Subform_DocPropertyName").val() + '_' + $("#subform_FormPropertyId").val() + '').after(BasicaddNewCheckListItem_Template);
}
GetCheckListItem(len, formpropertyid) {
var temp = len;
var Index = temp;
var html = '';
var emptyformpropertyname = "";
var ItemRowLen = $('.CheckList-row-' + Index).length;
let formpropertid;
html += '
' +
'' +
'
' +
'
';
$(".container-subform-list-0").find(".value-control").each(function () {
var id = $(this).attr('id');
var FrmPropertyName = $(this).parents('.container-subform-list-0').data('formpropertyname');
var FrmPrtyid = $(this).parents('.container-subform-list-0').data('formpropertyid');
let formpropertyname = $("#" + id).val();
formpropertid = $("#" + id).val();
var cntrlclass = $(this).attr('class');
var cls = cntrlclass.split(' ');
var arraycontainsbycontrollername = (cls.indexOf("txtSeriesAutoComplete_" + FrmPropertyName) > -1);
if (arraycontainsbycontrollername == true) {
formpropertid = $("#" + id + " option:selected").val();
formpropertyname = $("#" + id + " option:selected").text();
var seriesautocompelete = $("#" + id + " option:selected").val();
if (seriesautocompelete == undefined || seriesautocompelete == "0") {
formpropertyname = "";
}
}
var Autocompletecontrollername = (cls.indexOf("txtAutoComplete_" + FrmPropertyName) > -1);
if (Autocompletecontrollername == true) {
formpropertid = $("#" + id + " option:selected").val();
formpropertyname = $("#" + id + " option:selected").text();
var autocompelete = $("#" + id + " option:selected").val();
if (autocompelete == undefined || seriesautocompelete == "0") {
formpropertyname = "";
}
}
var DropDowncontrollername = "ddl_" + FrmPropertyName + "_" + FrmPrtyid;
if (DropDowncontrollername == id) {
formpropertid = $("#" + id + " option:selected").val();
formpropertyname = $("#" + id + " option:selected").text();
var DropDown = $("#" + id + " option:selected").val();
if (DropDown == undefined || seriesautocompelete == "0") {
formpropertyname = "";
}
}
if (formpropertyname != "" && formpropertyname != null) {
if (formpropertid == "0") {
formpropertyname = "";
}
html += '
' + formpropertyname + '' +
'' +
'
';
$("#" + id).val(0);
$("#" + id + " option:selected").val(0);
$("#" + id + " option:selected").text('-- Select --');
}
emptyformpropertyname += formpropertyname;
});
html += '