projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
f48a166
)
RT# 82092 - Updated text to remind customer to restart apache after creating custom...
author
Christopher Burger
<burgerc@freeside.biz>
Thu, 21 Feb 2019 17:17:10 +0000
(12:17 -0500)
committer
Christopher Burger
<burgerc@freeside.biz>
Thu, 21 Feb 2019 17:17:10 +0000
(12:17 -0500)
httemplate/edit/part_virtual_field.html
patch
|
blob
|
history
httemplate/edit/process/elements/process.html
patch
|
blob
|
history
httemplate/edit/process/part_virtual_field.html
patch
|
blob
|
history
httemplate/elements/header-full.html
patch
|
blob
|
history
diff --git
a/httemplate/edit/part_virtual_field.html
b/httemplate/edit/part_virtual_field.html
index
f3fb530
..
8b8b33d
100644
(file)
--- a/
httemplate/edit/part_virtual_field.html
+++ b/
httemplate/edit/part_virtual_field.html
@@
-21,8
+21,8
@@
],
'edit_callback' => $callback,
'error_callback' => $callback,
],
'edit_callback' => $callback,
'error_callback' => $callback,
- 'html_init' => 'Please be patient after clicking the button as
-
this process may take more than 10 seconds
.
+ 'html_init' => 'Please be patient after clicking the button as
this process may take more than 10 seconds.<br>
+
You will also need to restart Apache after adding the custom field
.
<br><br>',
)
%>
<br><br>',
)
%>
diff --git
a/httemplate/edit/process/elements/process.html
b/httemplate/edit/process/elements/process.html
index
1711b01
..
19110e1
100644
(file)
--- a/
httemplate/edit/process/elements/process.html
+++ b/
httemplate/edit/process/elements/process.html
@@
-34,6
+34,11
@@
Example:
'clear_on_error' => [ 'form_field1', 'form_field2', ... ],
'clear_on_error' => [ 'form_field1', 'form_field2', ... ],
+ ## message will be returned to redirect page as cookie and read by header.html
+ ## append =status, =warning, =error to change color of message box. Default is status
+ ## status is green, warning is yellow, and error is red
+ 'message' => [ 'My message=status', 'Please restart=warning' ],
+
#pass an arrayref of hashrefs for multiple m2ms or m2names
#be certain you incorporate m2m_Common if you see error: param
#pass an arrayref of hashrefs for multiple m2ms or m2names
#be certain you incorporate m2m_Common if you see error: param
@@
-208,7
+213,16
@@
process();
</HTML>
%} else {
</HTML>
%} else {
-<% $cgi->redirect($redirect) %>
+% my $cookie;
+% $cookie = CGI::Cookie->new(
+% -name => 'freeside_status',
+% -value => $messages,
+% -expires => '+5m',
+% ) if $messages;
+ <% $cgi->redirect( -uri => $redirect,
+ -cookie => $cookie,
+ )
+ %>
%}
<%init>
%}
<%init>
@@
-510,6
+524,8
@@
if ( !$error ) {
}
}
}
}
+my $messages = $opt{'message'} ? $opt{'message'} : '';
+
my $edit_ext = $opt{'edit_ext'} || 'html';
my $error_redirect = $opt{'error_redirect'}
|| popurl(2)."$table.$edit_ext";
my $edit_ext = $opt{'edit_ext'} || 'html';
my $error_redirect = $opt{'error_redirect'}
|| popurl(2)."$table.$edit_ext";
diff --git
a/httemplate/edit/process/part_virtual_field.html
b/httemplate/edit/process/part_virtual_field.html
index
97be7e6
..
dc03ea4
100644
(file)
--- a/
httemplate/edit/process/part_virtual_field.html
+++ b/
httemplate/edit/process/part_virtual_field.html
@@
-1,6
+1,7
@@
<% include( 'elements/process.html',
'table' => 'part_virtual_field',
'viewall_dir' => 'browse',
<% include( 'elements/process.html',
'table' => 'part_virtual_field',
'viewall_dir' => 'browse',
+ 'message' => [ 'Your custom field has been created, but will not be available untill Apache has been restarted.=warning', ],
'precheck_callback' => sub {
my ($cgi) = @_;
$act = 'edit' if $cgi->param('vfieldpart');
'precheck_callback' => sub {
my ($cgi) = @_;
$act = 'edit' if $cgi->param('vfieldpart');
@@
-25,7
+26,7
@@
$dbh->commit or die $dbh->errstr;
# reload schema
$dbh->commit or die $dbh->errstr;
# reload schema
- my $dbdef_file = "/usr/local/etc/freeside/dbdef.".datasrc
# XXX: fix this
+ my $dbdef_file = "/usr/local/etc/freeside/dbdef.".datasrc
;
my $dbdef = new_native DBIx::DBSchema $dbh;
$dbdef->save($dbdef_file);
delete $FS::Schema::dbdef_cache{$dbdef_file}; #force an actual reload
my $dbdef = new_native DBIx::DBSchema $dbh;
$dbdef->save($dbdef_file);
delete $FS::Schema::dbdef_cache{$dbdef_file}; #force an actual reload
diff --git
a/httemplate/elements/header-full.html
b/httemplate/elements/header-full.html
index
5586a0a
..
c73cf04
100644
(file)
--- a/
httemplate/elements/header-full.html
+++ b/
httemplate/elements/header-full.html
@@
-204,8
+204,10
@@
Example:
% if ( $cookies{freeside_status} ) {
<BR>
% foreach my $status_msg ( $cookies{freeside_status}->value ) {
% if ( $cookies{freeside_status} ) {
<BR>
% foreach my $status_msg ( $cookies{freeside_status}->value ) {
- <TABLE CLASS="fsinnerbox" STYLE="background-color:#eeffee"><TR>
- <TD><IMG SRC="<% $fsurl %>images/tick.png"> <% $status_msg |h %></TD>
+% my ($message, $type) = split /=/, $status_msg;
+% $type ||= 'status';
+ <TABLE CLASS="fsinnerbox" STYLE="background-color:<% $status_color{$type} %>"><TR>
+ <TD><IMG SRC="<% $fsurl %>images/tick.png"> <% $message |h %></TD>
</TR></TABLE>
% }
<script src="<% $fsurl %>elements/js.cookie.js"></script>
</TR></TABLE>
% }
<script src="<% $fsurl %>elements/js.cookie.js"></script>
@@
-270,4
+272,7
@@
if ( scalar(@agentnums) == 1 ) {
$company_url = $conf->config('company_url');
}
$company_url = $conf->config('company_url');
}
+## status->green(#eeffee), warning->yellow(#fdfd96), error->red(#f97c7c)
+my %status_color = ( 'status' => '#eeffee', 'warning' => '#fefbd0', 'error' => '#f97c7c', );
+
</%init>
</%init>