summaryrefslogtreecommitdiff
path: root/httemplate/edit/process
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2016-07-06 11:53:13 -0700
committerMark Wells <mark@freeside.biz>2016-07-06 13:12:26 -0700
commit0141b002ab937b2b3a21a92c3728bc3101f4668a (patch)
treebeefaf33264e30993b2429a8140ae3939e093ca8 /httemplate/edit/process
parentd49458237ef94dc89633846c0bdca56be2f34264 (diff)
service label localization, internals and UI, #71347
Conflicts: FS/FS/Schema.pm FS/FS/part_svc.pm httemplate/edit/part_pkg.cgi httemplate/edit/process/part_pkg.cgi httemplate/elements/freeside.css
Diffstat (limited to 'httemplate/edit/process')
-rw-r--r--httemplate/edit/process/elements/process.html21
-rwxr-xr-xhttemplate/edit/process/part_pkg.cgi9
2 files changed, 17 insertions, 13 deletions
diff --git a/httemplate/edit/process/elements/process.html b/httemplate/edit/process/elements/process.html
index 8979537e1..89a38f4f6 100644
--- a/httemplate/edit/process/elements/process.html
+++ b/httemplate/edit/process/elements/process.html
@@ -62,6 +62,8 @@ Example:
'fields' => [qw( fieldname fieldname2 )],
},
+ 'process_locale' => 'fieldname', # update entries in the _msgcat table
+
'process_upload' => {
'process' => 'misc/mytable-import.html',
# fields to pass to the back end job, besides the
@@ -356,12 +358,21 @@ foreach my $value ( @values ) {
}
- if ( !$error && $opt{'process_o2m'} ) {
-
- my @process_o2m = ref($opt{'process_o2m'}) eq 'ARRAY'
- ? @{ $opt{'process_o2m'} }
- : ( $opt{'process_o2m'} );
+ my @process_o2m;
+ if ( $opt{'process_o2m'} ) {
+ @process_o2m = ref($opt{'process_o2m'}) eq 'ARRAY'
+ ? @{ $opt{'process_o2m'} }
+ : ( $opt{'process_o2m'} );
+ }
+ if ( $opt{'process_locale'} ) {
+ push @process_o2m,
+ {
+ 'table' => $table . '_msgcat',
+ 'fields' => [ 'locale', $opt{'process_locale'} ],
+ };
+ }
+ if ( !$error ) {
foreach my $process_o2m (@process_o2m) {
diff --git a/httemplate/edit/process/part_pkg.cgi b/httemplate/edit/process/part_pkg.cgi
index 3ffd5fc23..631a26b0a 100755
--- a/httemplate/edit/process/part_pkg.cgi
+++ b/httemplate/edit/process/part_pkg.cgi
@@ -9,8 +9,8 @@
'edit_ext' => 'cgi',
'precheck_callback' => $precheck_callback,
'args_callback' => $args_callback,
+ 'process_locale' => 'pkg',
'process_m2m' => \@process_m2m,
- 'process_o2m' => \@process_o2m,
)
%>
<%init>
@@ -253,11 +253,4 @@ push @process_m2m, {
'params' => \@agents,
};
-my @process_o2m = (
- {
- 'table' => 'part_pkg_msgcat',
- 'fields' => [qw( locale pkg )],
- },
-);
-
</%init>