[freeside-commits] branch FREESIDE_3_BRANCH updated. d6bcda25c86d0dea042e293a9bf2085e65c28fd3
Christopher Burger
burgerc at freeside.biz
Sun Jan 14 10:13:59 PST 2018
The branch, FREESIDE_3_BRANCH has been updated
via d6bcda25c86d0dea042e293a9bf2085e65c28fd3 (commit)
via d153ff01787dbc84e5a6fc256ba42ee15ff0d816 (commit)
via fe8c3092f0c4210049de3a9673f70e8f4bb541be (commit)
via 36fa0149624a38298661cd20610591af2c746f65 (commit)
via a0ef3549089ec5806f9e489ab6e54daebb62e380 (commit)
from 3542fba5b1ec10d2632a87eff8f2beb32fc8c300 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d6bcda25c86d0dea042e293a9bf2085e65c28fd3
Author: Christopher Burger <burgerc at freeside.biz>
Date: Sun Jan 14 13:13:22 2018 -0500
RT# 78617 - removed redirect on pref change for V3
diff --git a/httemplate/pref/pref.html b/httemplate/pref/pref.html
index c504b2c5e..29aeb4c67 100644
--- a/httemplate/pref/pref.html
+++ b/httemplate/pref/pref.html
@@ -6,7 +6,6 @@
<% include('/elements/error.html') %>
-% if ( FS::Auth->auth_class->can('change_password') ) {
<% mt('Change password (leave blank for no change)') |h %>
<% ntable("#cccccc",2) %>
@@ -178,7 +177,7 @@ Email Address
<% ntable("#cccccc",2) %>
<TR>
- <TH>Email Address(es) (comma separated) </TH>
+ <TH><% emt("Email Address(es) (comma separated) ") %></TH>
<TD>
<TD><INPUT TYPE="text" NAME="email_address" VALUE="<% $email_address %>">
</TD>
commit d153ff01787dbc84e5a6fc256ba42ee15ff0d816
Author: Christopher Burger <burgerc at freeside.biz>
Date: Fri Jan 12 16:52:28 2018 -0500
RT# 78617 - updated redirect to freeside_status to show update message
Conflicts:
httemplate/pref/pref-process.html
httemplate/pref/pref.html
diff --git a/httemplate/elements/alert.html b/httemplate/elements/alert.html
deleted file mode 100644
index 620588b0c..000000000
--- a/httemplate/elements/alert.html
+++ /dev/null
@@ -1,4 +0,0 @@
-% if ( $cgi->param('alert') ) {
- <FONT SIZE="+1" COLOR="#008000"><% mt($cgi->param('alert')) |h %></FONT>
- <BR><BR>
-% }
\ No newline at end of file
diff --git a/httemplate/pref/pref-process.html b/httemplate/pref/pref-process.html
index cf0d8240f..122e92f7e 100644
--- a/httemplate/pref/pref-process.html
+++ b/httemplate/pref/pref-process.html
@@ -1,10 +1,9 @@
% if ( $error ) {
% $cgi->param('error', $error);
-<% $cgi->redirect(popurl(1). "pref.html?". $cgi->query_string ) %>
+ <% $cgi->redirect(popurl(1). "pref.html?". $cgi->query_string ) %>
% } else {
<% include('/elements/header.html', 'Preferences updated') %>
<% include('/elements/footer.html') %>
-<% $cgi->redirect(popurl(1). "pref.html?alert=Preferences updated" ) %>
% }
<%init>
diff --git a/httemplate/pref/pref.html b/httemplate/pref/pref.html
index c7c7c9d60..c504b2c5e 100644
--- a/httemplate/pref/pref.html
+++ b/httemplate/pref/pref.html
@@ -6,10 +6,6 @@
<% include('/elements/error.html') %>
-<<<<<<< HEAD
-=======
-<& /elements/alert.html &>
-
% if ( FS::Auth->auth_class->can('change_password') ) {
<% mt('Change password (leave blank for no change)') |h %>
commit fe8c3092f0c4210049de3a9673f70e8f4bb541be
Author: Christopher Burger <burgerc at freeside.biz>
Date: Fri Jan 12 16:20:20 2018 -0500
RT# 78617 - removed some test code
diff --git a/httemplate/pref/pref.html b/httemplate/pref/pref.html
index 882975ad6..c7c7c9d60 100644
--- a/httemplate/pref/pref.html
+++ b/httemplate/pref/pref.html
@@ -289,8 +289,6 @@ Vonage integration (see <a href="https://secure.click2callu.com/">Click2Call</a>
% );
<% include("/elements/footer.html", %footerdata) %>
-%#<&/elements/footer.html &>
-
<%init>
my $curuser = $FS::CurrentUser::CurrentUser;
commit 36fa0149624a38298661cd20610591af2c746f65
Author: Christopher Burger <burgerc at freeside.biz>
Date: Fri Jan 12 15:54:35 2018 -0500
RT# 78617 - added alert code that can be placed on any page.
diff --git a/httemplate/elements/alert.html b/httemplate/elements/alert.html
new file mode 100644
index 000000000..620588b0c
--- /dev/null
+++ b/httemplate/elements/alert.html
@@ -0,0 +1,4 @@
+% if ( $cgi->param('alert') ) {
+ <FONT SIZE="+1" COLOR="#008000"><% mt($cgi->param('alert')) |h %></FONT>
+ <BR><BR>
+% }
\ No newline at end of file
commit a0ef3549089ec5806f9e489ab6e54daebb62e380
Author: Christopher Burger <burgerc at freeside.biz>
Date: Fri Jan 12 15:36:13 2018 -0500
RT# 78617 - fixed preference field customer_view_emails to only except whole numbers, also added redirection back to preference page after edit.
Conflicts:
httemplate/pref/pref.html
diff --git a/httemplate/pref/pref-process.html b/httemplate/pref/pref-process.html
index f5b5bb68e..cf0d8240f 100644
--- a/httemplate/pref/pref-process.html
+++ b/httemplate/pref/pref-process.html
@@ -4,6 +4,7 @@
% } else {
<% include('/elements/header.html', 'Preferences updated') %>
<% include('/elements/footer.html') %>
+<% $cgi->redirect(popurl(1). "pref.html?alert=Preferences updated" ) %>
% }
<%init>
diff --git a/httemplate/pref/pref.html b/httemplate/pref/pref.html
index d976871f5..882975ad6 100644
--- a/httemplate/pref/pref.html
+++ b/httemplate/pref/pref.html
@@ -1,9 +1,16 @@
<% include('/elements/header.html', 'Preferences for '. getotaker ) %>
+% my $js_form_validate = { 'pref_form' => { 'name' => 'pref_form' } };
+
<FORM METHOD="POST" NAME="pref_form" ACTION="pref-process.html">
<% include('/elements/error.html') %>
+<<<<<<< HEAD
+=======
+<& /elements/alert.html &>
+
+% if ( FS::Auth->auth_class->can('change_password') ) {
<% mt('Change password (leave blank for no change)') |h %>
<% ntable("#cccccc",2) %>
@@ -156,10 +163,14 @@ Interface
</TD>
</TR>
+% my $validate_field_cve = 'customer_view_emails';
+% $js_form_validate->{pref_form}->{validate_fields}{$validate_field_cve} = 'digits: true';
+% $js_form_validate->{pref_form}->{error_message}{$validate_field_cve} = 'Please only enter numbers here.';
+
<TR>
<TH ALIGN="right">How many recent outbound emails to show in customer view</TH>
<TD ALIGN="left" COLSPAN=2>
- <INPUT TYPE="text" NAME="customer_view_emails" VALUE="<% $curuser->option('customer_view_emails') %>"></TD>
+ <INPUT TYPE="text" ID="<% $validate_field_cve %>" NAME="<% $validate_field_cve %>" VALUE="<% $curuser->option('customer_view_emails') %>"></TD>
</TD>
</TR>
@@ -273,7 +284,13 @@ Vonage integration (see <a href="https://secure.click2callu.com/">Click2Call</a>
<INPUT TYPE="submit" VALUE="Update preferences">
-<% include('/elements/footer.html') %>
+% my %footerdata = (
+% 'formvalidation' => $js_form_validate,
+% );
+<% include("/elements/footer.html", %footerdata) %>
+
+%#<&/elements/footer.html &>
+
<%init>
my $curuser = $FS::CurrentUser::CurrentUser;
-----------------------------------------------------------------------
Summary of changes:
httemplate/pref/pref-process.html | 2 +-
httemplate/pref/pref.html | 16 +++++++++++++---
2 files changed, 14 insertions(+), 4 deletions(-)
More information about the freeside-commits
mailing list