diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2016-07-20 13:02:15 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2016-07-20 13:02:15 -0700 |
| commit | c22d84e565ab16db142395dce2e8621624eff140 (patch) | |
| tree | 3670e2bc0bf200910c3af24e5459e8b6966a992b /httemplate/elements/progress-init.html | |
| parent | e9a7ae3aadab31f34c6bacb2376f817ecd4d7d8d (diff) | |
| parent | f235a64b4e96e8d613fb3ecdd3acc7f65f9f291d (diff) | |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/elements/progress-init.html')
| -rw-r--r-- | httemplate/elements/progress-init.html | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/httemplate/elements/progress-init.html b/httemplate/elements/progress-init.html index e38dde65f..0c2b8165a 100644 --- a/httemplate/elements/progress-init.html +++ b/httemplate/elements/progress-init.html @@ -98,14 +98,14 @@ function <%$key%>process () { overlib( 'Submitting job to server...', WIDTH, 444, HEIGHT, 168, CAPTION, 'Please wait...', STICKY, AUTOSTATUSCAP, CLOSETEXT, '', CLOSECLICK, MIDX, 0, MIDY, 0 ); + // jQuery .serializeArray() maybe? + var copy_fields = <% encode_json(\%copy_fields) %>; var Hash = new Array(); var x = 0; var fieldName; for (var i = 0; i<document.<%$formname%>.elements.length; i++) { field = document.<%$formname%>.elements[i]; - if ( <% join(' || ', map { "(field.name.indexOf('$_') > -1)" } @$fields ) %> - ) - { + if ( <% $all_fields %> || copy_fields[ field.name ] ) { if ( field.type == 'select-multiple' ) { //alert('select-multiple ' + field.name); for (var j=0; j < field.options.length; j++) { @@ -168,6 +168,14 @@ $progress_url->query_form( %dest_info, ); +my $all_fields = 0; +my %copy_fields; +if (grep '/^ALL$/', @$fields) { + $all_fields = 1; +} else { + %copy_fields = map { $_ => 1 } @$fields; +} + #stupid safari is caching the "location" of popup iframs, and submitting them #instead of displaying them. this should prevent that. my $popup_name = 'popup-'.random_id(); |
