11 $serviceShowInfo =
true;
12 $serviceLoadMenu =
true;
13 $serviceShowMenu =
true;
16 require_once(dirname(__FILE__) .
'/../library/hcuService.i');
23 PermCheckFeatureScreen($dbh, $HB_ENV, $MC, FEATURE_ALERTS);
28 $chome = $HB_ENV[
"chome"];
29 $Flang = $HB_ENV[
"Flang"];
32 $alertsCalcRunBal = ($HB_ENV[
'Fset'] & GetFlagsetValue(
"CU_CALCRUNBAL")) == GetFlagsetValue(
"CU_CALCRUNBAL");
35 require_once(dirname(__FILE__) .
'/../includes/hcuPreContent.i');
38 $alertsEnabled = Check_AlertsEnabled( $dbh, $HB_ENV );
39 if ( $alertsEnabled ===
false ) {
42 $serviceErrorMsg = $MC->msg(
'Option not set', HCU_DISPLAY_AS_HTML);
43 $serviceErrorCode =
'915';
45 require_once(dirname(__FILE__) .
'/../includes/hcuErrorPage.i');
51 $noticesAry = Get_NoticeInfo($dbh, $HB_ENV, $MC,
"D",
"alertNotice",
true);
53 $hasNoticeALT =
false;
54 $hasNoticePopupALT =
false;
56 $noticeLinkDisplayALT =
"";
58 if ( $noticesAry[
"status"][
"code"] ==
"000" && HCU_array_key_exists(
'0', $noticesAry[
'notice'])) {
59 if ($noticesAry[
"notice"][0][
"notice_id"] ) {
61 $noticeLinkDisplayALT = $noticesAry[
"notice"][0][
"notice_linkdisplay"];
63 $noticeOption = $noticesAry[
'notice'][0];
65 $noticeOptions = Array (
66 'docsid' => $noticeOption[
'notice_id'],
67 'docstype' => $noticeOption[
'notice_type'],
70 'expireTime' => mktime() + 86400
73 $encryptedDocDetails= HCU_PayloadEncode($HB_ENV[
'Cu'], $noticeOptions);
75 $noticeOptions[
'noticeOnly'] = 1;
77 $encryptedDocDetailsNoticeOnly= HCU_PayloadEncode($HB_ENV[
'Cu'], $noticeOptions);
81 $noticeURLALT = $HB_ENV[
'homebankingpath'] .
'/hcuViewNotice.prg?cu=' . $HB_ENV[
'cu'] .
'&x=' . urlencode($encryptedDocDetails);
84 $noticeURLNoticeOnly = $HB_ENV[
'homebankingpath'] .
'/hcuViewNotice.prg?cu=' . $HB_ENV[
'cu'] .
'&x=' . urlencode($encryptedDocDetailsNoticeOnly);
87 $hasNoticePopupALT = $noticeOption[
"notice_popup"] ? true :
false;
92 $noticesAry = Get_NoticeInfo($dbh, $HB_ENV, $MC,
"D",
"alertTerms",
true);
95 $hasTermsPopupALT =
false;
97 $termsLinkDisplayALT =
"";
99 if ( $noticesAry[
"status"][
"code"] ==
"000" && HCU_array_key_exists(
'0', $noticesAry[
'notice'])) {
100 if ($noticesAry[
"notice"][0][
"notice_id"] ) {
102 $noticeOption = $noticesAry[
'notice'][0];
104 $noticeOptions = Array (
105 'docsid' => $noticeOption[
'notice_id'],
106 'docstype' => $noticeOption[
'notice_type'],
109 'expireTime' => mktime() + 86400
112 $encryptedDocDetails= HCU_PayloadEncode($HB_ENV[
'Cu'], $noticeOptions);
114 $noticeOptions[
'noticeOnly'] = 1;
116 $encryptedDocDetailsNoticeOnly= HCU_PayloadEncode($HB_ENV[
'Cu'], $noticeOptions);
120 $termsURLALT = $HB_ENV[
'homebankingpath'] .
'/hcuViewNotice.prg?cu=' . $HB_ENV[
'cu'] .
'&x=' . urlencode($encryptedDocDetails);
123 $termsURLNoticeOnly = $HB_ENV[
'homebankingpath'] .
'/hcuViewNotice.prg?cu=' . $HB_ENV[
'cu'] .
'&x=' . urlencode($encryptedDocDetailsNoticeOnly);
126 $hasTermsPopupALT = $noticeOption[
"notice_popup"] ? true :
false;
128 $termsButtonText = $noticeOption[
"notice_linkdisplay"];
144 $return = Get_AlertDefaultEmail( $dbh, $HB_ENV );
145 $defaultEmail = $return[
"data"];
149 $return = Get_AlertDefaultCell( $dbh, $HB_ENV );
151 $defaultCell = $return[
"data"][
"cell_number"];
153 $overdueList = array( array(
"text" => $MC->msg(
'Is Due', HCU_DISPLAY_AS_RAW),
"daysPrior" =>
"0"),
154 array(
"text" => $MC->msg(
'5 Days Prior', HCU_DISPLAY_AS_RAW),
"daysPrior" =>
"5"),
155 array(
"text" => $MC->msg(
'10 Days Prior', HCU_DISPLAY_AS_RAW),
"daysPrior" =>
"10"),
159 $transList = array( array(
"text" => $MC->msg(
'both types of transactions', HCU_DISPLAY_AS_RAW),
"value" =>
"B"),
160 array(
"text" => $MC->msg(
'deposits only', HCU_DISPLAY_AS_RAW),
"value" =>
"D"),
161 array(
"text" => $MC->msg(
'withdrawals only', HCU_DISPLAY_AS_RAW),
"value" =>
"W"),
168 $gridHeaders = array( $MC->msg(
'Member Number', HCU_DISPLAY_AS_RAW),
169 $MC->msg(
'Account', HCU_DISPLAY_AS_RAW),
170 $MC->msg(
'Alert Type', HCU_DISPLAY_AS_RAW),
171 $MC->msg(
'Send', HCU_DISPLAY_AS_RAW),
172 $MC->msg(
'Alert Message', HCU_DISPLAY_AS_RAW),
173 $MC->msg(
'Alerted On', HCU_DISPLAY_AS_RAW) );
176 $return = Get_AlertTypes( $MC );
177 $alertTypes = $return[
"data"];
179 $alertAccounts = array();
180 $alertAccounts[] = array(
181 "description" => $MC->msg(
'Select account', HCU_DISPLAY_AS_RAW),
183 "bal_allowed" =>
true,
184 "trans_allowed" =>
true,
185 "check_allowed" =>
true,
186 "loan_allowed" => true
189 $accts = Get_AlertAccountList( $dbh, $HB_ENV );
190 for ($i = 0; $i < count($accts[
'data']); $i++) {
191 $alertAccounts[] = $accts[
'data'][$i];
195 <script type=
"text/javascript">
196 var hcuGridHeaders = <?php echo HCU_JsonEncode($gridHeaders); ?>;
197 var hcuOverdueChoices = <?php echo HCU_JsonEncode($overdueList); ?>;
198 var hcuTransChoices = <?php echo HCU_JsonEncode($transList); ?>;
199 var hcuAlertTypes = <?php echo HCU_JsonEncode( $alertTypes ); ?>;
200 var hcuAlertAccounts = <?php echo HCU_JsonEncode( $alertAccounts ); ?>;
201 var hcuCalcRunBal = <?php echo HCU_JsonEncode( $alertsCalcRunBal ); ?>;
203 var window_stack = [];
206 var hcuNewAlertList = [];
207 var hcuBalanceAccounts = [];
208 var hcuTransAccounts = [];
209 var hcuCheckAccounts = [];
210 var hcuLoanAccounts = [];
211 var hcuSelAcctList = [];
212 var hcuAlertScreenCreated =
false;
215 var savedMemberAccounts = [];
216 var savedAlertRow =
null;
220 var alertTypeForCallback;
223 var dsOneAlert =
null;
224 var alertTemplate =
null;
225 var alertViewModel =
null;
228 var terms = <?php echo HCU_JsonEncode($hasTermsALT && $hasTermsPopupALT); ?>;
229 var notice = <?php echo HCU_JsonEncode($hasNoticeALT && $hasNoticePopupALT); ?>;
232 function ShowStatus( statusMessage ) {
233 $.homecuValidator.settings.formStatusField =
"formStatus";
234 $.homecuValidator.settings.formInfoTitle =
"";
235 $.homecuValidator.displayMessage(statusMessage);
238 function ClearStatus( ) {
239 $.homecuValidator.settings.formInfoTitle =
"";
240 $.homecuValidator.displayMessage(
null);
243 function ResetAlertScreen(alertId) {
244 var screenTitle =
null;
247 screenTitle =
"<?php echo $MC->msg('Add Alert', HCU_DISPLAY_AS_JS) ?>";
249 screenTitle =
"<?php echo $MC->msg('Edit Alert', HCU_DISPLAY_AS_JS) ?>";
252 $(
"#hcuEditAlerts").empty();
253 $(
"#hcuEditAlerts").html(alertTemplate({ screen: screenTitle }));
254 kendo.bind($(
"#hcuEditAlerts"), alertViewModel);
257 $.homecuValidator.setup({
258 formValidate:
"hcuEditAlerts",
259 formStatusField:
"formStatus",
260 formErrorTitle:
"<?php echo $MC->msg("Error Occurred
", HCU_DISPLAY_AS_JS) ?>",
265 function StartAlert( initialData ) {
271 if ( initialData.type ===
"bal" ) {
272 alertViewModel.set(
"notifyAmt", initialData.notifyamt );
273 alertViewModel.set(
"cbIncBal", initialData.incbal ===
"1" );
274 alertViewModel.set(
"cbUseAvailBal", initialData.useavailbal ===
"1" );
275 alertViewModel.set(
"typeName",
"<?php echo Get_AlertDesc( "bal
", $MC )["data
"] ?>" );
276 }
else if ( initialData.type ===
"trans" ) {
277 alertViewModel.set(
"notifyDesc", initialData.notifydesc );
278 alertViewModel.set(
"cbIncBal", initialData.incbal ===
"1" );
279 alertViewModel.set(
"cbIncAmt", initialData.incamt ===
"1" );
280 alertViewModel.set(
"cbUseRange", initialData.notifyrange ===
"1" );
281 alertViewModel.set(
"transAmtMin", initialData.notifyamtmin );
282 alertViewModel.set(
"transAmtMax", initialData.notifyamtmax );
283 alertViewModel.set(
"transType", initialData.notifytranstype );
284 alertViewModel.set(
"typeName",
"<?php echo Get_AlertDesc( "trans
", $MC )["data
"] ?>" );
285 alertViewModel.set(
"inctransdesc", initialData.inctransdesc ===
"" ?
"0" : initialData.inctransdesc );
286 }
else if ( initialData.type ===
"check" ) {
287 alertViewModel.set(
"chkNum", initialData.notifychknum );
288 alertViewModel.set(
"cbIncAmt", initialData.incamt ===
"1" );
289 alertViewModel.set(
"typeName",
"<?php echo Get_AlertDesc( "check
", $MC )["data
"] ?>" );
290 }
else if ( initialData.type ===
"loan" ) {
291 alertViewModel.set(
"selectedOverdue", initialData.alert_days_prior );
292 alertViewModel.set(
"typeName",
"<?php echo Get_AlertDesc( "loan
", $MC )["data
"] ?>" );
294 alertViewModel.set(
"typeName",
"" );
298 alertViewModel.set(
"alertType", initialData.type );
299 alertViewModel.set(
"alertId", initialData.id );
300 alertViewModel.set(
"notifyMsg.value", initialData.notifymsg );
303 alertViewModel.set(
"weType", initialData.emailtype );
304 alertViewModel.set(
"notifyTo", initialData.notifyto );
307 alertViewModel.set(
"alertBack",
"<?php echo $MC->msg('Delete Alert', HCU_DISPLAY_AS_JS) ?>" );
308 alertViewModel.set(
"showDeleteIcon", alertViewModel.alertBack ===
"<?php echo $MC->msg('Delete Alert', HCU_DISPLAY_AS_JS) ?>" );
309 alertViewModel.set(
"showBackIcon", alertViewModel.alertBack !==
"<?php echo $MC->msg('Delete Alert', HCU_DISPLAY_AS_JS) ?>" );
310 alertViewModel.set(
"alertAction",
"<?php echo $MC->msg('Next', HCU_DISPLAY_AS_JS) ?>" );
311 alertViewModel.set(
"showSaveIcon", alertViewModel.alertAction ===
"<?php echo $MC->msg('Save', HCU_DISPLAY_AS_JS) ?>" );
312 alertViewModel.set(
"showNextIcon", alertViewModel.alertAction !==
"<?php echo $MC->msg('Save', HCU_DISPLAY_AS_JS) ?>" );
314 if ( hcuNewAlertList.length < 2 ) {
317 ary[
"name"] =
"<?php echo $MC->msg('Select New Alert', HCU_DISPLAY_AS_JS) ?>";
319 hcuNewAlertList.push(ary);
320 for(var i = 0; i < hcuAlertTypes.length; i++) {
321 hcuNewAlertList.push(hcuAlertTypes[i]);
323 alertViewModel.set(
"alertChoice",
new kendo.data.ObservableArray(hcuNewAlertList) );
326 alertViewModel.set(
"selectedAlert", initialData.type );
328 if ( initialData.id > 0 ) {
330 alertViewModel.set(
"alertEditAccount", initialData.accountnumber );
331 alertViewModel.set(
"alertShowEdit",
true );
332 alertViewModel.set(
"alertShowNew",
false );
333 alertViewModel.set(
"selectedAcct", initialData.selacct);
337 alertViewModel.set(
"notifyTo",
"<?php echo trim( $defaultEmail ) ?>" );
339 alertViewModel.set(
"alertShowEdit",
false );
340 alertViewModel.set(
"alertShowNew",
true );
341 alertViewModel.set(
"selectedAcct",
"");
344 if ( alertViewModel.weType ===
"E" ) {
345 alertViewModel.set(
"notifyToEmail", alertViewModel.notifyTo );
347 alertViewModel.set(
"notifyToCell",
"<?php echo trim( $defaultCell ) ?>" );
349 alertViewModel.set(
"notifyToCell", alertViewModel.notifyTo );
351 alertViewModel.set(
"notifyToEmail",
"<?php echo trim( $defaultEmail ) ?>" );
354 if ( !hcuAlertScreenCreated ) {
357 $(
"#tabGrid").hide();
358 $(
"#tabEdit").show();
360 $(
"#noticeButton").hide();
361 $(
"#termsButton").hide();
365 $(
"#tabGrid").hide();
366 $(
"#tabEdit").show();
368 $(
"#noticeButton").hide();
369 $(
"#termsButton").hide();
372 if (initialData.id === 0) {
373 $(
"#tabEdit h3").text(
"<?php echo $MC->msg('Add Alert', HCU_DISPLAY_AS_JS) ?>");
375 $(
"#tabEdit h3").text(
"<?php echo $MC->msg('Edit Alert', HCU_DISPLAY_AS_JS) ?>");
380 function ShowAlertBody() {
382 alertViewModel.set(
"progressAccount",
true );
383 alertViewModel.set(
"progressMsg",
true );
384 alertViewModel.set(
"progressNotify",
true );
390 $(
"*[required]").removeAttr(
"required");
391 $(
"#alertChoice").attr(
"required",
"required");
392 if ( alertViewModel.selectedAlert ===
"bal" ) {
393 alertViewModel.set(
"isBalAlertVisible",
true );
394 alertViewModel.set(
"isTransAlertVisible",
false );
395 alertViewModel.set(
"isCheckAlertVisible",
false );
396 alertViewModel.set(
"isLoanAlertVisible",
false );
397 alertViewModel.set(
"showCustomMsg",
false );
399 $(
"#accountChoice").attr(
"required",
"required");
400 $(
"#notifyamt").attr(
"required",
"required");
401 $(
"#notifymsg").attr(
"required",
"required");
402 $(
"#inctransdesc0").prop(
"checked",
"checked");
405 }
else if ( alertViewModel.selectedAlert ===
"trans" ) {
406 alertViewModel.set(
"isBalAlertVisible",
false );
407 alertViewModel.set(
"isTransAlertVisible",
true );
408 alertViewModel.set(
"isCheckAlertVisible",
false );
409 alertViewModel.set(
"isLoanAlertVisible",
false );
410 alertViewModel.set(
"showCustomMsg",
true );
412 $(
"#accountChoice").attr(
"required",
"required");
413 $(
"#notifydesc").attr(
"required",
"required");
414 $(
"#notifymsg").attr(
"required",
"required");
415 if (alertViewModel.inctransdesc ==
"0") {
416 $(
"#inctransdesc0").prop(
"checked",
"checked");
418 $(
"#inctransdesc1").prop(
"checked",
"checked");
423 }
else if ( alertViewModel.selectedAlert ===
"check" ) {
424 alertViewModel.set(
"isBalAlertVisible",
false );
425 alertViewModel.set(
"isTransAlertVisible",
false );
426 alertViewModel.set(
"isCheckAlertVisible",
true );
427 alertViewModel.set(
"isLoanAlertVisible",
false );
428 alertViewModel.set(
"showCustomMsg",
false );
430 $(
"#accountChoice").attr(
"required",
"required");
431 $(
"#chknum").attr(
"required",
"required");
432 $(
"#notifymsg").attr(
"required",
"required");
433 $(
"#inctransdesc0").prop(
"checked",
"checked");
436 }
else if ( alertViewModel.selectedAlert ===
"loan" ) {
437 alertViewModel.set(
"isBalAlertVisible",
false );
438 alertViewModel.set(
"isTransAlertVisible",
false );
439 alertViewModel.set(
"isCheckAlertVisible",
false );
440 alertViewModel.set(
"isLoanAlertVisible",
true );
441 alertViewModel.set(
"showCustomMsg",
false );
443 $(
"#accountChoice").attr(
"required",
"required");
444 $(
"#notifymsg").attr(
"required",
"required");
445 $(
"#inctransdesc0").prop(
"checked",
"checked");
449 alertViewModel.set(
"isBalAlertVisible",
false );
450 alertViewModel.set(
"isTransAlertVisible",
false );
451 alertViewModel.set(
"isCheckAlertVisible",
false );
452 alertViewModel.set(
"isLoanAlertVisible",
false );
453 alertViewModel.set(
"progressAccount",
false );
454 alertViewModel.set(
"progressMsg",
false );
455 alertViewModel.set(
"progressNotify",
false );
459 if ( alertViewModel.selectedAlert ===
"loan" ) {
460 alertViewModel.set(
"showAdditionalOptions",
false );
462 alertViewModel.set(
"showAdditionalOptions",
true );
466 if ( alertViewModel.selectedAlert ==
"bal" || (alertViewModel.selectedAlert ==
"trans" && !hcuCalcRunBal) ) {
467 alertViewModel.set(
"showIncludeBalance",
true );
469 alertViewModel.set(
"showIncludeBalance",
false );
471 if ( alertViewModel.selectedAlert ===
"bal" ) {
472 alertViewModel.set(
"showUseAvailBal",
true );
473 alertViewModel.set(
"showIncAmt",
false );
475 alertViewModel.set(
"showUseAvailBal",
false );
476 alertViewModel.set(
"showIncAmt",
true );
478 if ( alertViewModel.selectedAlert ===
"check" ) {
479 alertViewModel.set(
"showIncCheckAmt",
true );
480 alertViewModel.set(
"showIncTransAmt",
false );
482 alertViewModel.set(
"showIncCheckAmt",
false );
483 alertViewModel.set(
"showIncTransAmt",
true );
487 alertViewModel.set(
"disableBackButton",
false );
488 alertViewModel.set(
"disableSaveButton",
false );
491 var subAcctList = [];
492 var subAcctFilter = {};
493 if ( alertViewModel.selectedAlert ===
"bal" ) {
494 subAcctList = hcuBalanceAccounts;
495 subAcctFilter = { field:
"bal_allowed",
operator:
"eq", value:
true };
496 }
else if ( alertViewModel.selectedAlert ===
"trans" ) {
497 subAcctList = hcuTransAccounts;
498 subAcctFilter = { field:
"trans_allowed",
operator:
"eq", value:
true };
499 }
else if ( alertViewModel.selectedAlert ===
"check" ) {
500 subAcctList = hcuCheckAccounts;
501 subAcctFilter = { field:
"check_allowed",
operator:
"eq", value:
true };
502 }
else if ( alertViewModel.selectedAlert ===
"loan" ) {
503 subAcctList = hcuLoanAccounts;
504 subAcctFilter = { field:
"loan_allowed",
operator:
"eq", value:
true };
509 if ($(
"#accountChoice").data(
"kendoDropDownList")) {
510 $(
"#accountChoice").data(
"kendoDropDownList").dataSource.filter(subAcctFilter);
517 function InitDataForAlert( alertType ) {
518 alertData =
new Object();
520 alertData.alert_days_prior = 0;
522 alertData.emailtype =
"E";
524 alertData.incamt =
"0";
525 alertData.incbal =
"0";
526 alertData.notifyamt =
"";
527 alertData.notifyamtmax =
"";
528 alertData.notifyamtmin =
"";
529 alertData.notifychknum =
"";
530 alertData.notifydesc =
"";
531 alertData.notifymsg =
"";
532 alertData.notifyrange =
"0";
533 alertData.notifyto =
"";
534 alertData.notifyToEmail =
"<?php echo trim( $defaultEmail ) ?>";
535 alertData.notifyToCell =
"<?php echo trim( $defaultCell ) ?>";
536 alertData.notifytranstype =
"B";
537 alertData.selacct =
"";
538 alertData.type = alertType;
539 alertData.type_name =
"";
540 alertData.useavailbal =
"1";
541 alertData.inctransdesc =
"0";
545 function StartAlertFunction() {
546 InitDataForAlert( alertTypeForCallback );
547 StartAlert(alertData);
550 function DeleteAlert(alertId) {
552 wndDelete = $(
'#deleteWindow').kendoDialog({
559 window_stack.push(wndDelete);
571 text:
"Yes", primary:
true,
573 var raw = dsAlerts.data();
575 for (var i = 0; i < raw.length; i++) {
577 if (item.id == alertId) {
578 dsAlerts.remove(item);
587 }).data(
'kendoDialog');
589 wndDelete.title(
"<?php echo $MC->msg('Delete Alert', HCU_DISPLAY_AS_JS) ?>");
590 wndDelete.content(
"<?php echo $MC->msg('Delete Sure', HCU_DISPLAY_AS_JS) ?>?");
594 function lookupAccount( lookupList, lookupId ) {
595 for ( var i = 0; i < lookupList.length; i++ ) {
596 if ( lookupList[i].identifier == lookupId ) {
597 return lookupList[i];
602 return lookupList[0];
606 function lookupOverdue( lookupId ) {
607 for ( var i = 0; i < hcuOverdueChoices.length; i++ ) {
608 if ( hcuOverdueChoices[i].daysPrior == lookupId ) {
609 return hcuOverdueChoices[i];
614 return hcuOverdueChoices[0];
617 function check_size() {
618 var msg_fld = $(
"#notifymsg");
624 msg_len = $(msg_fld).val().length;
626 if (msg_len > maxchar) {
627 msg =
'<?php echo $MC->msg('Exceeded Maximum
', HCU_DISPLAY_AS_JS) ?>' + maxchar +
". ";
628 msg +=
'<?php echo $MC->msg('Characters not included
', HCU_DISPLAY_AS_JS) ?>';
630 var newString = $(msg_fld).val();
631 $(msg_fld).val( newString.substring(0, maxchar) );
634 $(
"#size_msg").text( msg_len );
637 function round_val(element) {
640 field_val = $(element).val();
641 if (isNaN(field_val))
644 field_val = Math.round(field_val * 100) / 100;
646 $(element).val( field_val );
649 function next_field() {
651 if (document.forms[
'alert'].incBal) {
652 document.forms[
'alert'].incBal.focus();
653 }
else if (document.forms[
'alert'].incAmt) {
654 document.forms[
'alert'].incAmt.focus();
655 }
else if (document.forms[
'alert'].we_type[0]) {
656 document.forms[
'alert'].we_type[0].focus();
660 function extchar(elementId, vchar) {
661 document.getElementById(elementId).focus();
662 document.getElementById(elementId).value+=vchar;
665 function toggleNotify() {
667 if ( $(
"#radio_w").is(
':checked') ) {
668 $(
"#showCell").css(
"display",
"block");
669 $(
"#showEmail").css(
"display",
"none");
670 $(
"#alert_cell").attr(
"required",
"required");
671 $(
"#alert_email").removeAttr(
"required");
673 $(
"#showEmail").css(
"display",
"block");
674 $(
"#showCell").css(
"display",
"none");
675 $(
"#alert_email").attr(
"required",
"required");
676 $(
"#alert_cell").removeAttr(
"required");
680 function toggleTransCheck() {
681 if ( $(
"#userange").is(
':checked') ) {
682 $(
"#desc_amtmin").attr(
"required",
"required");
683 $(
"#desc_amtmax").attr(
"required",
"required");
685 $(
"#desc_amtmin").removeAttr(
"required");
686 $(
"#desc_amtmax").removeAttr(
"required");
690 function changeDesc() {
691 var radioOptValue = $(
"input[name=\"inctransdesc\"]:checked").val();
692 if (radioOptValue ==
"0") {
693 $(
"#notifymsg").prop(
"disabled",
false);
694 $(
"#notifymsg").attr(
"required",
"required");
696 $(
"#notifymsg").prop(
"disabled",
true);
697 $(
"#notifymsg").removeAttr(
"required");
698 $(
"#notifymsg").val(
"");
703 function InitDataSources() {
704 dsAlerts =
new kendo.data.DataSource({
709 url:
'hcuAlerts.data?cu=<?php echo $HB_ENV['cu
']; ?>',
711 contentType:
"application/x-www-form-urlencoded",
719 url:
'hcuAlerts.data?cu=<?php echo $HB_ENV['cu
']; ?>',
720 contentType:
"application/x-www-form-urlencoded",
728 requestEnd:
function( e ) {
731 if ( e.response && e.response.homecuErrors )
732 error = e.response.homecuErrors;
734 if ( error && error.length > 0 ) {
737 dsAlerts.cancelChanges();
739 $.homecuValidator.displayMessage(error, $.homecuValidator.settings.statusError);
745 if ( e.response && e.response.homecuInfo && (e.response.homecuInfo.length > 0) ) {
746 ShowStatus( e.response.homecuInfo );
749 if ( e.type ===
"read" ||
750 e.type ===
"destroy" ) {
752 $(
"#tabEdit").hide();
753 $(
"#tabGrid").show();
756 $(
"#noticeButton").show();
757 $(
"#termsButton").show();
764 error:
function( e ) {
770 type: {type:
"string"},
771 type_name: {type:
"string"},
772 id: {type:
"number"},
773 notifyto: {type:
"string"},
774 description: {type:
"string"},
775 notifymsg: {type:
"string"},
776 lastalert: {type:
"string"}
779 parse:
function(response) {
781 if ( response.homecuData ) {
782 for (var i = 0; i < response.homecuData.length; i++) {
783 display.push(response.homecuData[i]);
792 dsOneAlert =
new kendo.data.DataSource({
795 url:
'hcuAlerts.data?cu=<?php echo $HB_ENV['cu
']; ?>',
796 contentType:
"application/x-www-form-urlencoded",
804 url:
'hcuAlerts.data?cu=<?php echo $HB_ENV['cu
']; ?>',
806 contentType:
"application/x-www-form-urlencoded",
809 action:
"thisshouldgetoverwritten" 814 url:
'hcuAlerts.data?cu=<?php echo $HB_ENV['cu
']; ?>',
815 contentType:
"application/x-www-form-urlencoded",
824 parse:
function(response) {
826 if ( response.homecuData ) {
827 for (var i = 0; i < response.homecuData.length; i++) {
828 display.push(response.homecuData[i]);
834 requestEnd:
function( e ) {
837 if ( e.response && e.response.homecuErrors )
838 error = e.response.homecuErrors;
840 if ( error && error.length > 0 ) {
843 dsOneAlert.cancelChanges();
845 $.homecuValidator.displayMessage(error, $.homecuValidator.settings.statusError);
847 $(
"#tabEdit").hide();
848 $(
"#tabGrid").show();
851 $(
"#noticeButton").show();
852 $(
"#termsButton").show();
854 if ( e.response && e.response.homecuInfo && (e.response.homecuInfo.length > 0) ) {
855 ShowStatus( e.response.homecuInfo );
865 error:
function( e ) {
866 alert(
"<?php echo $MC->msg("Transport error
", HCU_DISPLAY_AS_JS); ?>: " + e.status );
871 function InitDataViews() {
872 $(
'#hcuTableAlerts').kendoGrid({
873 dataSource: dsAlerts,
879 template:
"<span class=\"hcu-secondary\"><span class=\"vsgSecondary\"><?php echo $MC->msg('No Records Found', HCU_DISPLAY_AS_JS) ?></span></span>" 882 { field:
"description", title: hcuGridHeaders[1], width:
"170px",
883 template:
"#= description #" },
884 { field:
"type_name", title: hcuGridHeaders[2], width:
"90px",
885 template:
"#= type_name #",
886 minScreenWidth: 425 },
887 { field:
"notifyto", title: hcuGridHeaders[3], width:
"150px",
888 template:
"#= notifyto #",
889 minScreenWidth: 600 },
890 { field:
"notifydisplaymsg", title: hcuGridHeaders[4],
891 template:
"#: notifydisplaymsg #" }
894 detailTemplate:
function(e) {
898 if ( e.type ===
"bal" ) {
899 displayInfo[
"criteria"] =
"<?php echo $MC->msg('is less than', HCU_DISPLAY_AS_JS) ?> " + e.notifyamt;
900 displayInfo[
"additionalDesc"] =
"";
902 if ( e.incbal ===
"1" ) {
903 addMsg +=
"<li><?php echo $MC->msg('Include the account balance in the alert', HCU_DISPLAY_AS_JS) ?></li>";
905 if ( e.useavailbal ===
"1" ) {
906 addMsg +=
"<li><?php echo $MC->msg('Alert on available balance', HCU_DISPLAY_AS_JS) ?></li>";
909 displayInfo[
"additionalMsg"] = addMsg;
910 }
else if ( e.type ===
"trans" ) {
911 displayInfo[
"criteria"] =
"<?php echo $MC->msg('has a transaction description starting with', HCU_DISPLAY_AS_JS) ?>: " + e.notifydesc;
913 if ( e.notifyrange ===
"1" ) {
914 addDesc =
"<li><?php echo $MC->msg('Only alert me when the amount is between', HCU_DISPLAY_AS_JS) ?> " + e.notifyamtmin +
" <?php echo $MC->msg('and', HCU_DISPLAY_AS_JS) ?> " + e.notifyamtmax +
"</li>";
916 for ( var i = 0; i < hcuTransChoices.length; i++ ) {
917 if ( hcuTransChoices[i][
"value"] === e.notifytranstype ) {
918 addDesc +=
"<li>" + hcuTransChoices[i][
"text"] +
"</li>";
924 if ( !hcuCalcRunBal ) {
925 if ( e.incbal ===
"1" ) {
926 addMsg +=
"<li><?php echo $MC->msg('Include the account balance in the alert', HCU_DISPLAY_AS_JS) ?></li>";
929 if ( e.incamt ===
"1" ) {
930 addMsg +=
"<li><?php echo $MC->msg('Include the transaction amount in the alert', HCU_DISPLAY_AS_JS) ?></li>";
933 displayInfo[
"additionalDesc"] = addDesc;
934 displayInfo[
"additionalMsg"] = addMsg;
935 }
else if ( e.type ===
"check" ) {
936 displayInfo[
"criteria"] =
"<?php echo $MC->msg('Alert me when check number', HCU_DISPLAY_AS_JS) ?> " + e.notifychknum;
937 displayInfo[
"additionalDesc"] =
"";
940 if ( e.incamt ===
"1" ) {
941 addMsg =
"<li><?php echo $MC->msg('Include the check amount in the alert', HCU_DISPLAY_AS_JS) ?></li>";
944 displayInfo[
"additionalMsg"] = addMsg;
945 }
else if ( e.type ===
"loan" ) {
949 for ( var i = 0; i < hcuOverdueChoices.length; i++ ) {
950 if ( hcuOverdueChoices[i][
"daysPrior"] === e.alert_days_prior ) {
951 string = hcuOverdueChoices[i][
"text"];
955 displayInfo[
"criteria"] =
"<?php echo $MC->msg('When', HCU_DISPLAY_AS_JS) ?> " + string;
956 displayInfo[
"additionalDesc"] =
"";
957 displayInfo[
"additionalMsg"] =
"";
960 if ( e.restrictions ===
"L" ) {
961 displayInfo[
"additionalDesc"] = displayInfo[
"additionalDesc"] +
" <span class='local-locked'><?php echo $MC->msg('Account Locked', HCU_DISPLAY_AS_JS) ?></span>";
962 }
else if ( e.restrictions ===
"R" ) {
963 displayInfo[
"additionalDesc"] = displayInfo[
"additionalDesc"] +
" <span class='local-locked'><?php echo $MC->msg('Account Readonly', HCU_DISPLAY_AS_JS) ?></span>";
966 displayInfo[
"notifyLoc"] = ( e.emailtype ===
"E" ?
"<?php echo $MC->msg('email', HCU_DISPLAY_AS_JS) ?>" :
"<?php echo $MC->msg('cell phone', HCU_DISPLAY_AS_JS) ?>" );
967 dTemplate = kendo.template($(
"#templateDetail").html());
968 return dTemplate( displayInfo );
971 change:
function(e) {
972 this.select().removeClass(
"k-state-selected");
974 dataBound:
function () {
975 $(
"table tbody tr").hover(
977 $(
this).toggleClass(
"k-state-hover");
981 var grid = $(
"#hcuTableAlerts").data(
"kendoGrid");
983 $(grid.tbody).on(
"click",
"td",
function(e) {
984 var testClass = $(
this).attr(
"class");
986 if ( testClass !==
"k-detail-cell" ) {
987 var row = $(
this).closest(
"tr");
988 var colIdx = $(
"td", row).index(
this);
991 var selectedRow = grid.dataItem(row);
993 ResetAlertScreen(selectedRow.id);
994 InitDataForAlert( selectedRow.type );
995 StartAlert( selectedRow );
1001 create:
function(e) {
1002 if (e.model.isNew()) {
1006 alertTemplate = kendo.template($(
"#template").html());
1007 alertViewModel = kendo.observable({
1010 alertChoice: hcuAlertTypes,
1011 selectedAlert:
null,
1012 alertChoiceDisabled:
false,
1014 alertShowEdit:
false,
1015 alertShowNew:
false,
1016 alertEditAccount:
"",
1018 alertShowSingle:
false,
1019 alertShowMultiple:
false,
1021 isBalAlertVisible:
false,
1022 isTransAlertVisible:
false,
1023 isCheckAlertVisible:
false,
1024 isLoanAlertVisible:
false,
1026 showCustomMsg:
false,
1027 showAdditionalOptions:
false,
1028 showIncludeBalance:
false,
1029 showUseAvailBal:
false,
1031 showIncCheckAmt:
false,
1032 showIncTransAmt:
false,
1034 disableBackButton:
true,
1035 disableSaveButton:
true,
1036 subAccountSelList: hcuAlertAccounts,
1045 var value = this.
get(
"value");
1046 var retVal = ( value ) ? value.length : 0;
1051 showDeleteIcon:
false,
1052 showBackIcon:
false,
1053 showSaveIcon:
false,
1054 showNextIcon:
false,
1062 cbUseAvailBal:
false,
1066 transAmtMin:
"0.00",
1067 transAmtMax:
"0.00",
1070 transTypeList: hcuTransChoices,
1075 overdueList: hcuOverdueChoices,
1078 progressAccount:
false,
1080 progressNotify:
false,
1081 alertSave:
function(e) {
1084 if ($.homecuValidator.validate()) {
1088 if ( alertViewModel.weType ===
"E" ) {
1089 notifyTo = alertViewModel.notifyToEmail;
1090 }
else if ( alertViewModel.weType ===
"W" ) {
1091 notifyTo = alertViewModel.notifyToCell;
1098 type: alertViewModel.selectedAlert,
1099 id: alertViewModel.alertId,
1100 selacct: alertViewModel.selectedAcct,
1101 emailtype: alertViewModel.weType,
1103 mbr_account: alertViewModel.selectedMbr,
1104 notifymsg: kendo.toString(alertViewModel.notifyMsg.value)
1108 if ( alertViewModel.alertType ===
"bal" ) {
1109 request[
"incbal"] = (alertViewModel.cbIncBal ?
"1" :
"0");
1110 request[
"notifyamt"] = alertViewModel.notifyAmt;
1111 request[
"useavailbal"] = (alertViewModel.cbUseAvailBal ?
"1" :
"0");
1112 }
else if ( alertViewModel.alertType ===
"trans" ) {
1113 request[
"incbal"] = (alertViewModel.cbIncBal ?
"1" :
"0");
1114 request[
"userange"] = (alertViewModel.cbUseRange ?
"1" :
"0");
1115 request[
"desc_amtmin"] = alertViewModel.transAmtMin;
1116 request[
"desc_amtmax"] = alertViewModel.transAmtMax;
1117 request[
"notifydesc"] = alertViewModel.notifyDesc;
1118 request[
"transtype"] = alertViewModel.transType;
1119 request[
"incamt"] = (alertViewModel.cbIncAmt ?
"1" :
"0");
1120 request[
"inctransdesc"] = (alertViewModel.inctransdesc ===
"1" ?
"1" :
"0");
1121 }
else if ( alertViewModel.alertType ===
"check" ) {
1122 request[
"incamt"] = (alertViewModel.cbIncAmt ?
"1" :
"0");
1123 request[
"chknum"] = alertViewModel.chkNum;
1124 }
else if ( alertViewModel.alertType ===
"loan" ) {
1125 request[
"days_prior"] = alertViewModel.selectedOverdue;
1129 request.notifymsg = $(
"#notifymsg").val();
1132 dsOneAlert.transport.read.type =
"POST";
1133 dsOneAlert.read( request );
1136 alertBackDelete:
function(e) {
1138 DeleteAlert(this.alertId);
1140 alertCancel:
function(e) {
1143 $(
"#tabEdit").hide();
1144 $(
"#tabGrid").show();
1146 $(
"#noticeButton").show();
1147 $(
"#termsButton").show();
1149 acctListener:
function(e) {
1152 var selectedIndex = e.sender.selectedIndex;
1153 var selectedItem = e.sender.dataItem(selectedIndex);
1154 this.
set(
"selectedAcct", selectedItem.acct_ident);
1155 this.
set(
"selectedMbr", selectedItem.accountnumber);
1157 alertListener:
function(e) {
1159 var selectedIndex = e.sender.selectedIndex;
1160 var selectedItem = e.sender.dataItem(selectedIndex);
1161 this.
set(
"selectedAlert", selectedItem.value);
1163 InitDataForAlert(selectedItem.value);
1164 StartAlert(alertData);
1166 emailListener:
function(e) {
1167 var selectedIndex = e.sender.selectedIndex;
1168 var selectedItem = e.sender.dataItem(selectedIndex);
1173 $(
"#alertStart").kendoButton({
1174 click:
function(e) {
1175 ResetAlertScreen(0);
1176 InitDataForAlert(
"" );
1177 StartAlert( alertData );
1182 function InitScreen() {
1187 $(
"#alertScreen").show();
1190 $(document).on(
"click",
".k-overlay",
function () {
1191 if(window_stack.length > 0) {
1192 open = window_stack[0];
1197 $(document).ready(
function() {
1199 $(
"#alertScreen").on(
"click",
"#btnExtraChars",
function() {
1200 $(
"#extraCharSpace").hide();
1201 $(
"#extraChars").show();
1205 ShowNotice(
'<?php echo $termsURLALT; ?>',
"<?php echo $termsLinkDisplayALT ?>",
1209 ShowNotice(
'<?php echo $noticeURLALT; ?>',
"<?php echo $noticeLinkDisplayALT ?>");
1216 var urlInit = window.location.href.substring(0, window.location.href.indexOf(
"hcu"));
1217 var urlCu =
"<?php echo $Cu ?>";
1218 var urlPage =
"hcuAccounts.prg";
1219 var urlRedirect = urlInit + urlPage +
"?cu=" + urlCu;
1221 window.location.replace(urlRedirect);
1224 }
else if (notice) {
1226 ShowNotice(
'<?php echo $noticeURLALT; ?>',
"<?php echo $noticeLinkDisplayALT ?>");
1233 <div
class=
"container-fluid" id=
"alertScreen" style=
"display: none;">
1234 <div
id=
"tabGrid" class=
"well well-sm col-xs-12">
1235 <h3><?php echo $MC->msg(
'Alerts', HCU_DISPLAY_AS_JS) ?></h3>
1236 <div
class=
"row"> </div>
1237 <button type=
"button" id=
"alertStart"><span
class=
"fa fa-plus"> </span><?php echo $MC->msg(
'Add Alert', HCU_DISPLAY_AS_JS) ?></button>
1238 <div
class=
"row"> </div>
1239 <div
id=
"hcuTableAlerts"></div>
1242 <div
id=
"tabEdit" style=
"display: none;">
1243 <div
id=
"hcuEditAlerts"></div>
1246 <div
id=
"alertWindow" name=
"alertWindow"></div>
1247 <div
id=
"deleteWindow" name=
"deleteWindow"></div>
1248 <div
id=
"disclosureWindow" name=
"disclosureWindow"></div>
1249 <style type=
"text/css">
1250 .e-initial {display: none;}
1257 #hcuTableAlerts .k-detail-row { 1258 background: transparent;
1261 #gridDetail { margin-bottom: 5px;} 1262 #gridDetail ul { padding-left: 5px; } 1263 #gridDetail ul li { margin-left:15px; } 1264 .k-tooltip-content { text-align: left; max-width: 300px; }
1280 margin-bottom: 7.5px;
1287 input[type=
"radio"],
1288 input[type=
"checkbox"] {
1297 @media (min-width: 768px) {
1304 @media (max-width: 768px) {
1311 @media (min-width: 992px) {
1315 <script type=
"text/x-kendo-template" id=
"templateDetail">
1316 <div
class=
"well well-sm" id=
"gridDetail">
1317 <h4>#= type_name #</h4>
1320 <span>#= description # #= criteria #</span>
1322 #if (additionalDesc.length > 0) {# 1327 <span>#: notifydisplaymsg #</span>
1329 #if (type !== "loan" && additionalMsg.length > 0) {# 1334 <p>#= notifyLoc #: #= notifyto #</p>
1336 <p><?php echo $MC->msg(
'Alerted On', HCU_DISPLAY_AS_JS); ?>: #= lastalert #</p>
1339 <script type=
"text/x-kendo-template" id=
"template">
1340 <div
class=
"well well-sm col-xs-12" style=
"margin-bottom: 0;">
1341 <h3>#= screen #</h3>
1342 <div
class=
"row"> </div>
1344 <div data-bind=
"visible: alertShowNew" style=
"display:none;">
1346 <div
class=
"col-xs-12 col-sm-6 sm-text-right xs-text-left">
1347 <label
class=
"form-horizontal control-label"><?php echo $MC->msg(
'Select New Alert', HCU_DISPLAY_AS_JS) ?></label>
1349 <div
class=
"col-xs-12 col-sm-5">
1350 <input
id=
"alertChoice" name=
"alertChoice" class=
"hcu-all-100" 1351 data-role=
"dropdownlist" 1352 data-text-field=
"name" 1353 data-value-field=
"value" 1354 data-bind=
"source: alertChoice, value: selectedAlert, events:{ change: alertListener }" 1355 data-required-msg=
"<?php echo $MC->msg('Invalid Alert Type', HCU_DISPLAY_AS_JS) ?>">
1364 <div data-bind=
"visible: alertShowEdit" style=
"display:none;">
1366 <div
class=
"col-xs-12 col-sm-6 sm-text-right xs-text-left">
1367 <label
class=
"form-horizontal control-label"><?php echo $MC->msg(
'Alert Type', HCU_DISPLAY_AS_JS) ?></label>
1369 <div
class=
"col-xs-12 col-sm-5">
1370 <p data-bind=
"text: typeName"></p>
1375 <div
id=
'progressAccount' data-bind=
"visible: progressAccount" style=
'display:none;'>
1376 <div
class=
"row local-spacing"></div>
1378 <div
class=
"col-xs-12 col-sm-6 sm-text-right xs-text-left">
1379 <label
class=
"form-horizontal control-label"><?php echo $MC->msg(
'Account', HCU_DISPLAY_AS_JS) ?></label>
1381 <div
class=
"col-xs-12 col-sm-5">
1382 <input
id=
"accountChoice" name=
"accountChoice" 1384 data-role=
"dropdownlist" 1385 data-text-field=
"description" 1386 data-value-field=
"acct_ident" 1387 data-bind=
"source: subAccountSelList, value: selectedAcct, events: { change: acctListener }" 1388 data-required-msg=
"<?php echo $MC->msg('Please select an account', HCU_DISPLAY_AS_JS) ?>">
1396 <div
id=
"progressAccount-bal" data-bind=
"visible: isBalAlertVisible">
1397 <div
class=
"row local-spacing"></div>
1399 <div
class=
"col-xs-12 col-sm-6 sm-text-right xs-text-left">
1400 <span><?php echo $MC->msg(
'is less than', HCU_DISPLAY_AS_JS) ?></span>
1402 <div
class=
"col-xs-12 col-sm-5">
1403 <input type=
'text' class=
"k-textbox hcu-all-100" name=
'notifyamt' id=
'notifyamt' maxlength=
'10' size=
'10' 1404 onfocus=
'JAVASCRIPT:{tname="notifyamt";this.select()}' 1405 onchange=
'round_val(this)' 1406 data-bind=
"value: notifyAmt" 1407 data-required-msg=
"<?php echo $MC->msg('Amount Missing', HCU_DISPLAY_AS_JS) ?>" />
1408 <span
id=
"e-notifyamt" class=
"fa fa-question-circle-o e-initial"></span>
1417 <div
id=
"progressAccount-trans" data-bind=
"visible: isTransAlertVisible">
1418 <div
class=
"row local-spacing"></div>
1420 <div
class=
"col-xs-12 col-sm-6 sm-text-right xs-text-left">
1421 <span><?php echo $MC->msg(
'has a transaction description starting with', HCU_DISPLAY_AS_JS) ?></span>
1423 <div
class=
"col-xs-12 col-sm-5">
1424 <input type=
'text' class=
"k-textbox hcu-all-100" id=
"notifydesc" name=
't_notifydesc' maxlength=
'40' 1425 data-bind=
"value: notifyDesc" 1426 onfocus=
'JAVASCRIPT:{this.select()}' 1428 data-homecuCustomMinLen-msg=
"<?php echo $MC->msg('Description Short', HCU_DISPLAY_AS_JS) ?>" 1429 data-required-msg=
"<?php echo $MC->msg('Description Missing', HCU_DISPLAY_AS_JS) ?>" />
1432 <div
class=
"row local-spacing"></div>
1434 <div
class=
"col-xs-12 col-sm-6 sm-text-right xs-text-left">
1435 <label
for=
"userange">
1436 <input type=
'checkbox' name=
'userange' id=
"userange" value=
'Y' data-bind=
"checked: cbUseRange" onChange=
"toggleTransCheck()" />
1437 <?php echo $MC->msg(
'Only alert me when the amount is between', HCU_DISPLAY_AS_JS) ?>
1440 <div
class=
"col-xs-12 col-sm-5 text-left">
1441 <input type=
'text' class=
"k-textbox hcu-all-100" name=
'desc_amtmin' id=
"desc_amtmin" max=
'10' 1442 data-bind=
"value: transAmtMin" 1443 onfocus=
'JAVASCRIPT:{this.select()}' 1444 onchange=
'round_val(this)' 1445 data-required-msg=
"<?php echo $MC->msg('Amount Minimum', HCU_DISPLAY_AS_JS) ?>" />
1447 <span><?php echo $MC->msg(
'and', HCU_DISPLAY_AS_JS) ?></span>
1449 <input type=
'text' class=
"k-textbox hcu-all-100" name=
'desc_amtmax' id=
"desc_amtmax" max=
'10' 1450 data-bind=
"value: transAmtMax" 1451 onfocus=
'JAVASCRIPT:{this.select()}' 1452 onchange=
'round_val(this)' 1453 data-required-msg=
"<?php echo $MC->msg('Amount Maximum', HCU_DISPLAY_AS_JS) ?>" />
1456 <div
class=
"row local-spacing"></div>
1458 <div
class=
"col-xs-12 col-sm-6 sm-text-right xs-text-left">
1459 <label
class=
"form-horizontal control-label"><?php echo $MC->msg(
'Search', HCU_DISPLAY_AS_JS) ?></label>
1461 <div
class=
"col-xs-12 col-sm-5" style=
'text-align:left;'>
1462 <input
class=
"hcu-all-100" 1463 data-role=
"dropdownlist" 1464 data-text-field=
"text" 1465 data-value-field=
"value" 1466 data-bind=
"source: transTypeList, value: transType">
1477 <div
id=
"progressAccount-check" data-bind=
"visible: isCheckAlertVisible">
1478 <div
class=
"row local-spacing"></div>
1480 <div
class=
"col-xs-12 col-sm-6 sm-text-right xs-text-left">
1481 <span><?php echo $MC->msg(
'Alert me when check number', HCU_DISPLAY_AS_JS) ?></span>
1483 <div
class=
"col-xs-12 col-sm-5">
1484 <input type=
'text' class=
"k-textbox hcu-all-100" name=
't_chknum' id=
'chknum' size=
'10' maxlength=
'8' 1485 data-bind=
"value: chkNum" 1486 onfocus=
'JAVASCRIPT:{this.select()}' 1487 data-required-msg=
"<?php echo $MC->msg('Check Number Missing', HCU_DISPLAY_AS_JS) ?>" >
1495 <div
id=
"progressAccount-loan" data-bind=
"visible: isLoanAlertVisible">
1496 <div
class=
"row local-spacing"></div>
1498 <div
class=
"col-xs-12 col-sm-6 sm-text-right xs-text-left">
1499 <label
class=
"form-horizontal control-label"><?php echo $MC->msg(
'When', HCU_DISPLAY_AS_JS) ?></label>
1501 <div
class=
"col-xs-12 col-sm-5">
1502 <input
class=
"hcu-all-100" 1503 data-role=
"dropdownlist" 1504 data-text-field=
"text" 1505 data-value-field=
"daysPrior" 1506 data-bind=
"source: overdueList, value: selectedOverdue"></input>
1515 <div
id=
'progressMsg' data-bind=
"visible: progressMsg" style=
"display:none;">
1516 <div
class=
"row local-spacing"></div>
1518 <div
class=
"col-xs-12 col-sm-6 sm-text-right xs-text-left">
1519 <span><?php echo $MC->msg(
'I want my alert to say', HCU_DISPLAY_AS_JS) ?></span>
1522 <div
class=
"col-xs-12 col-sm-5 text-left">
1523 <div data-bind=
"visible: showCustomMsg">
1524 <label
class=
"form-horizontal control-label">
1525 <input type=
'radio' value=
'1' name=
'inctransdesc' id=
'inctransdesc1' onchange=
'changeDesc()' 1526 data-bind=
"checked: inctransdesc"/>
1527 <?php echo $MC->msg(
'the transaction description', HCU_DISPLAY_AS_JS) ?>
1530 <div data-bind=
"visible: showCustomMsg">
1531 <label
class=
"form-horizontal control-label">
1532 <input type=
'radio' value=
'0' name=
'inctransdesc' id=
'inctransdesc0' onchange=
'changeDesc()' 1533 data-bind=
"checked: inctransdesc"/>
1534 <?php echo $MC->msg(
'A Custom Message', HCU_DISPLAY_AS_JS) ?>
1539 <div
class=
"row local-spacing"></div>
1541 <div
class=
"col-xs-12 col-sm-6">
1542 <div
id=
"extraCharSpace">
1543 <?php
if ( ($Flang ==
"es_US") || ($Flang ==
"pl_US") ): ?>
1544 <div
id=
"btnExtraChars" class=
"k-button"><?php echo $MC->msg(
"Show Extended Characters", HCU_DISPLAY_AS_JS); ?></div>
1547 <div
id=
"extraChars" style=
'display:none;'>
1550 if ($Flang ==
'es_US') {
1551 # Spanish extended characters 1552 $charSet = array(
'&\\\#225;',
'&\\\#233;',
'&\\\#237;',
'&\\\#243;',
'&\\\#250;',
'&\\\#241;',
'&\\\#191;',
'&\\\#161;' );
1553 }
else if ( $Flang ==
"pl_US" ) {
1554 $charSet = array(
'&\\\#260;',
'&\\\#261;',
'&\\\#280;',
'&\\\#281;',
'&\\\#211;',
'&\\\#243;',
'&\\\#262;',
1555 '&\\\#263;',
'&\\\#321;',
'&\\\#322;',
'&\\\#323;',
'&\\\#324;',
'&\\\#346;',
'&\\\#347;',
1556 '&\\\#377;',
'&\\\#378;',
'&\\\#379;',
'&\\\#380;' );
1561 for ( $i = 0; $i < count( $charSet ); $i++ ) {
1562 print
"<div style='float:left; margin-right:5px;'><a class='k-button' style='width:10mm' href='JAVASCRIPT:extchar(\"notifymsg\", \"{$charSet[$i]}\");'); return false;'>{$charSet[$i]}</a></div>";
1564 if ( count( $charSet ) ) {
1565 print
"<span class='fa fa-question-circle-o detailsTip' title='{$MC->msg('TXT character alert', HCU_DISPLAY_AS_JS)}'></span>";
1571 <div
class=
"col-xs-12 col-sm-5">
1572 <div
id=
'containerDiv'>
1573 <textarea
class=
"k-textbox hcu-all-100" name=
'notifymsg' id=
'notifymsg' rows=
'5' cols=
'90' wrap=
'physical' 1574 data-bind=
"value: notifyMsg.value" 1575 onKeyUp=
'check_size();' 1576 onKeyDown=
'check_size();' 1577 onBlur=
'check_size();' 1578 data-required-msg=
"<?php echo $MC->msg('Message Missing', HCU_DISPLAY_AS_JS) ?>"></textarea>
1579 <span
id=
"e-notifymsg" class=
"fa fa-question-circle-o e-initial"></span>
1583 <div
class=
"col-xs-12 col-sm-6">
1586 <div
class=
"col-xs-12 col-sm-5">
1587 <span
id=
'size_msg' data-bind=
"text: notifyMsg.size">0</span> / 250
1588 <span
class=
'fa fa-question-circle-o detailsTip' title=
'<?php echo $MC->msg('Length Note
', HCU_DISPLAY_AS_JS) ?>.'></span>
1592 <div
class=
"row local-spacing"></div>
1594 <div data-bind=
"visible: showAdditionalOptions">
1595 <div
class=
"col-xs-12 col-sm-6 sm-text-right xs-text-left">
1596 <label
class=
"form-horizontal control-label"><?php echo $MC->msg(
'Additional Options', HCU_DISPLAY_AS_JS); ?></label>
1598 <div
class=
"col-xs-12 col-sm-5 text-left">
1599 <div data-bind=
"visible: showIncludeBalance">
1600 <label
class=
"form-horizontal control-label">
1601 <input type=
'checkbox' name=
'incBal' value=
'1' data-bind=
"checked: cbIncBal">
1602 <?php echo $MC->msg(
'Include the account balance in the alert', HCU_DISPLAY_AS_JS) ?>
1605 <div data-bind=
"visible: showUseAvailBal">
1606 <label
class=
"form-horizontal control-label">
1607 <input type=
'checkbox' name=
'useAvailBal' value=
'Y' data-bind=
"checked: cbUseAvailBal">
1608 <?php echo $MC->msg(
'Alert on available balance', HCU_DISPLAY_AS_JS) ?>
1611 <div data-bind=
"visible: showIncAmt">
1612 <label
class=
"form-horizontal control-label">
1613 <input type=
'checkbox' name=
'incAmt' value=
'1' data-bind=
"checked: cbIncAmt">
1614 <span data-bind=
"visible: showIncCheckAmt"><?php echo $MC->msg(
'Include the check amount in the alert', HCU_DISPLAY_AS_JS) ?></span>
1615 <span data-bind=
"visible: showIncTransAmt"><?php echo $MC->msg(
'Include the transaction amount in the alert', HCU_DISPLAY_AS_JS) ?></span>
1626 <div
id=
'progressNotify' data-bind=
"visible: progressNotify" style=
"display:none;">
1627 <div
class=
"row local-spacing"></div>
1629 <div
class=
"col-xs-12 col-sm-6 sm-text-right xs-text-left">
1630 <label
class=
"form-horizontal control-label"><?php echo $MC->msg(
'Send the alert to my', HCU_DISPLAY_AS_JS) ?></label>
1632 <div
class=
"col-xs-12 col-sm-5 text-left">
1633 <label
class=
"form-horizontal control-label">
1634 <input type=
'radio' name=
'we_type' id=
'radio_e' value=
'E' data-bind=
"checked: weType" onChange=
'JAVASCRIPT:{toggleNotify();}'>
1635 <?php echo $MC->msg(
'email', HCU_DISPLAY_AS_JS) ?>
1638 <label
class=
"form-horizontal control-label">
1639 <input type=
'radio' name=
'we_type' id=
'radio_w' value=
'W' data-bind=
"checked: weType" onChange=
'JAVASCRIPT:{toggleNotify();}'>
1640 <?php echo $MC->msg(
'cell phone', HCU_DISPLAY_AS_JS) ?>
1644 <div
class=
"row local-spacing"></div>
1646 <span
id=
'showEmail' style=
"display: none;">
1647 <div
class=
"col-xs-12 col-sm-6 sm-text-right xs-text-left">
1648 <label
class=
"form-horizontal control-label"><?php echo trim( $MC->msg(
'email', HCU_DISPLAY_AS_JS) ) ?></label>
1650 <div
class=
"col-xs-12 col-sm-5">
1651 <input type=
'email' class=
"k-textbox hcu-all-100" name=
'alert_email' id=
"alert_email" maxlength=
'50' 1652 data-bind=
"value: notifyToEmail" 1653 onfocus=
'JAVASCRIPT:{this.select()}' 1654 data-required-msg=
"<?php echo $MC->msg('EMail Missing', HCU_DISPLAY_AS_JS) ?>" />
1659 <span
id=
'showCell' style=
"display: none;">
1660 <div
class=
"col-xs-12 col-sm-6 sm-text-right xs-text-left">
1661 <label
class=
"form-horizontal control-label"><?php echo trim( $MC->msg(
'cell phone', HCU_DISPLAY_AS_JS) ) ?></label> \\#
1663 <div
class=
"col-xs-12 col-sm-5">
1665 class=
"k-textbox hcu-all-100" 1668 data-bind=
"value: notifyToCell" 1671 onfocus=
'JAVASCRIPT:{this.select()}' 1672 data-required-msg=
"<?php echo $MC->msg('Cell Number Missing', HCU_DISPLAY_AS_JS) ?>." 1674 data-homecuCustomMinLen-msg=
"<?php echo $MC->msg('Cell Number Length', HCU_DISPLAY_AS_JS) ?>." 1676 data-homecuCustomMaxLen-msg=
"<?php echo $MC->msg('Cell Number Length', HCU_DISPLAY_AS_JS) ?>." 1677 homecu-match=
"number" 1678 data-homecuCustomMatch-msg=
"<?php echo $MC->msg('Cell Number Digits', HCU_DISPLAY_AS_JS) ?>." 1680 <span style=
'font-size: smaller;'>(ex. 2081234567)</span><br />
1687 <div
class=
"hcu-template">
1688 <div
class=
"hcu-edit-buttons k-state-default">
1689 <span
class=
"hcu-icon-delete">
1690 <a href=
"##" id=
"lnkDelete" 1691 data-bind=
"events: { click: alertBackDelete }, visible: alertShowEdit">
1692 <i
class=
"fa fa-trash fa-lg"></i>
1695 <a href=
"##" id=
"lnkCancel" style=
"" 1696 data-bind=
"events: { click: alertCancel }"><?php echo $MC->msg(
"Cancel", HCU_DISPLAY_AS_HTML); ?></a>
1698 <a href=
"##" id=
"btnUpdate" class=
"k-button k-primary" 1699 data-bind=
"events: { click: alertSave }">
1700 <i
class=
"fa fa-check fa-lg"></i><?php echo $MC->msg(
"Update", HCU_DISPLAY_AS_HTML); ?>
1713 require_once(dirname(__FILE__) .
'/../includes/hcuPostContent.i');