|
@@ -232,19 +232,22 @@ function ValidateForm(sFormId, bValidateAll)
|
|
function ReadFormParams(sFormId)
|
|
function ReadFormParams(sFormId)
|
|
{
|
|
{
|
|
var oMap = { };
|
|
var oMap = { };
|
|
- $('#'+sFormId+' :input:visible').each( function() {
|
|
|
|
- var sName = $(this).attr('name');
|
|
|
|
- if (sName && sName != '')
|
|
|
|
|
|
+ $('#'+sFormId+' :input').each( function() {
|
|
|
|
+ if ($(this).parent().is(':visible'))
|
|
{
|
|
{
|
|
- if (this.type == 'checkbox')
|
|
|
|
- {
|
|
|
|
- oMap[sName] = ($(this).attr('checked') == 'checked');
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
|
|
+ var sName = $(this).attr('name');
|
|
|
|
+ if (sName && sName != '')
|
|
{
|
|
{
|
|
- oMap[sName] = $(this).val();
|
|
|
|
|
|
+ if (this.type == 'checkbox')
|
|
|
|
+ {
|
|
|
|
+ oMap[sName] = ($(this).attr('checked') == 'checked');
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ oMap[sName] = $(this).val();
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
});
|
|
});
|
|
return oMap;
|
|
return oMap;
|
|
@@ -257,19 +260,22 @@ function SubmitForm(sFormId, onSubmitResult)
|
|
{
|
|
{
|
|
var oMap = ReadFormParams(sFormId);
|
|
var oMap = ReadFormParams(sFormId);
|
|
oMap.module_name = sCurrentModule;
|
|
oMap.module_name = sCurrentModule;
|
|
- $('#'+sFormId+' :input:visible').each( function() {
|
|
|
|
- var sName = $(this).attr('name');
|
|
|
|
- if (sName && sName != '')
|
|
|
|
|
|
+ $('#'+sFormId+' :input').each( function() {
|
|
|
|
+ if ($(this).parent().is(':visible'))
|
|
{
|
|
{
|
|
- if (this.type == 'checkbox')
|
|
|
|
- {
|
|
|
|
- oMap[sName] = ($(this).attr('checked') == 'checked');
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
|
|
+ var sName = $(this).attr('name');
|
|
|
|
+ if (sName && sName != '')
|
|
{
|
|
{
|
|
- oMap[sName] = $(this).val();
|
|
|
|
|
|
+ if (this.type == 'checkbox')
|
|
|
|
+ {
|
|
|
|
+ oMap[sName] = ($(this).attr('checked') == 'checked');
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ oMap[sName] = $(this).val();
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
});
|
|
});
|
|
$.post(GetAbsoluteUrlAppRoot()+'designer/module.php', oMap, function(data)
|
|
$.post(GetAbsoluteUrlAppRoot()+'designer/module.php', oMap, function(data)
|