20 $http_script_path =
"https://www4.homecu.net/lnapp_include/";
27 $monLibrary= dirname(__FILE__) .
"/../library";
28 require_once(
"$monLibrary/cu_top.i");
33 FROM lnappschemadetail 34 WHERE loanid = " . intval($LN_CUR_ID) .
" 35 ORDER BY loanid, pageid, groupid, lineid ";
38 $detail_rs = db_query($sql, $link);
47 <title>HomeCU Loan Application Maintenance</title>
49 <link type=
"text/css" href=
"<?php echo $http_script_path; ?>lnapp.css" rel=
"stylesheet" media=
"all"/>
50 <link type=
"text/css" href=
"<?php echo $http_script_path; ?>lnapp_style.css" rel=
"stylesheet" media=
"screen"/>
51 <link type=
"text/css" href=
"<?php echo $http_script_path; ?>css/jquery-ui-1.8.17.custom.css" rel=
"stylesheet" media=
"all"/>
52 <script type=
"text/javascript" src=
"<?php echo $http_script_path; ?>js/jquery/jquery-1.7.1.min.js"></script>
53 <script type=
"text/javascript" src=
"<?php echo $http_script_path; ?>js/jquery/jquery.ui.core.js"></script>
54 <script type=
"text/javascript" src=
"<?php echo $http_script_path; ?>js/jquery/jquery.populate.js"></script>
55 <script type=
"text/javascript" src=
"<?php echo $http_script_path; ?>js/jquery/jquery.validity.js"></script>
56 <script type=
"text/javascript" src=
"<?php echo $http_script_path; ?>js/jquery/jquery.qtip-1.0.0-rc3.min.js"></script>
57 <script type=
"text/javascript" src=
"<?php echo $http_script_path; ?>js/jquery/jquery.tablednd.0.6.min.js"></script>
58 <script type=
"text/javascript" src=
"<?php echo $http_script_path; ?>js/jquery/jquery.ui.widget.js"></script>
59 <script type=
"text/javascript" src=
"<?php echo $http_script_path; ?>js/jquery/jquery.ui.button.js"></script>
60 <script type=
"text/javascript" src=
"<?php echo $http_script_path; ?>js/jquery/jquery.ui.tabs.js"></script>
73 var GLOBAL_ROWID = -1;
74 var GLOBAL_SUSPEND = 0;
76 $(
'#lnapp-detail').tableDnD({
77 onDrop:
function(table, row) {
78 alert($(
'#lnapp-detail').tableDnDSerialize());
80 dragHandle:
"dragHandle" 83 function SetRowProperty(rowid) {
88 if (GLOBAL_ROWID != rowid) {
90 var FieldAttr = $(
'#fieldattr_' + rowid);
94 var field_attr = JSON.parse(FieldAttr.val());
95 }
catch(parseException) {
96 field_attr = JSON.parse(
"{}");
98 $(
'#form_attr').populate(field_attr,{resetForm:
true,debug:
false});
100 GLOBAL_ROWID = rowid;
106 $(document).ready(
function() {
108 $(
"tr[id^='detail_']").click(
function() {
110 SetRowProperty($(
this).attr(
'id').replace(/detail_/i,
''));
115 $(
'#form_attr').change(
function() {
116 if (GLOBAL_SUSPEND == 0) {
117 var new_attr= {
'fieldcorearrayindex':$(
"#fieldcorearrayindex").val(),
'fieldcorename':$(
"#fieldcorename").val(),
'fieldansid':
'',
'hidden':
'',
'maxlength':
'',
'size':
'',
'default_val':
'',
'print_summary':
'',
'validation_require':
'',
'validation_match':
'',
'validation_custom':
'',
'validation_desc':
'',
'validation_range':
'',
'validation_conditionname':
'',
'validation_require_conditional[field]':
'',
'validation_require_conditional[val]':
'',
'helpurl':
'',
'egtext':
'',
'append_class':
'',
'appendnextfield':
'',
'localfieldonly':
''}
120 console.log(new_attr);
126 $(
"#lnapp-detail").tableDnD();
154 primary:
"ui-icon-plusthick" 157 $(
"#preview" ).button({
160 primary:
"ui-icon-print" 163 $(
"#save" ).button({
166 primary:
"ui-icon-pencil" 198 $(
"#showprop" ).button({
201 primary:
"ui-icon-note" 210 <div
id=
"allcontent">
212 <div
id=
'toolbar' class=
'ui-widget-header ui-corner-all'>
213 <button
id=
'new'>Append</button>
214 <button
id=
'preview'>Preview</button>
215 <button
id=
'save'>Save</button>
216 <input type=
'checkbox' id=
'showprop'/><label
for=
'showprop'>Display Properties</label>
219 <table
id=
'lnapp-detail' cellspacing=
'0' cellpadding=
'2'>
220 <tr
id=
'0.0' class=
'nodrop nodrag'>
221 <th
class=
'col_action'>Action</th>
222 <th>Page<br>Order</th>
223 <th>Group<br>Order</th>
224 <th>Line<br>Order</th>
232 $select_fieldtype_keys = Array (
"P",
"H",
"L",
"GT",
"YNR",
"YNR01",
"YNS",
"YNS01",
"AR",
"AS");
233 while ($detail_row = db_fetch_assoc($detail_rs, $detail_ctr)) {
236 $select_ary = array_fill_keys($select_fieldtype_keys,
"");
238 $select_ary[$detail_row[
'fieldtype']] =
" SELECTED ";
240 $fieldtype_select =
"<option value='P' {$select_ary['P']}>Page Header</option><option value='H' {$select_ary['H']}>Section Header</option><option value='L' {$select_ary['L']}>Label</option><option value='GT' {$select_ary['GT']}>General Entry</option><option value='YNR' {$select_ary['YNR']}>Radio - Yes / No</option><option value='YNR01' {$select_ary['YNR01']}>Radio - Yes / No {0,1}</option><option value='YNS' {$select_ary['YNS']}>Select - Yes / No</option><option value='YNS01' {$select_ary['YNS01']}>Select - Yes / No {0,1}</option><option value='AR' {$select_ary['AR']}>Radio - List</option><option value='AS' {$select_ary['AS']}>Select - List</option>";
244 $action_link =
"<a style='cursor: move' href='#' class='row_grip'/><a href='' class='row_new'/><a href='' class='row_insert'/><a href='' class='row_copy'/><a href='' class='row_delete'/>";
247 <tr
id=
'detail_{$detail_row['detailid
']}' style=
'cursor: move; ' class=
'$tr_even'>
248 <td>$action_link</td>
249 <td
class=
'ordercolumn'><input type=
'text' name=
'groupid_{$detail_row['detailid
']}' class=
'order' value=
'{$detail_row['groupid
']}'></td>
250 <td
class=
'ordercolumn'><input type=
'text' name=
'pageid_{$detail_row['detailid
']}' class=
'order' value=
'{$detail_row['pageid
']}'></td>
251 <td
class=
'ordercolumn'><input type=
'text' name=
'lineid_{$detail_row['detailid
']}' class=
'order' value=
'{$detail_row['lineid
']}'></td>
252 <td><select name=
'fieldtype_{$detail_row['detailid
']}'>$fieldtype_select</select></td>
253 <td
class=
'ordercolumn'><input type=
'text' name=
'fieldvalue_{$detail_row['detailid
']}'class=
'fieldvalue' value=
'{$detail_row['fieldvalue
']}'></td>
255 <input type=
'hidden' id=
'detailid_{$detail_row['detailid
']}' name=
'detailid_{$detail_row['detailid
']}' value=
'{$detail_row['detailid
']}'>
256 <input type=
'hidden' id=
'fieldattr_{$detail_row['detailid
']}' name=
'fieldattr_{$detail_row['detailid
']}' value=
'{$detail_row['fieldattr
']}'>
264 <div
id=
'contentproperty'>
272 <form name=
'form_attr' id=
'form_attr'>
275 <li><a href=
"#tabs-1">Core</a></li>
276 <li><a href=
"#tabs-2">Attributes</a></li>
277 <li><a href=
"#tabs-3">Validation</a></li>
278 <li><a href=
"#tabs-4">Extra</a></li>
282 Core Record Index <input type='text' id='fieldcorearrayindex' name='fieldcorearrayindex' value=''><br>
283 Core Field Name <input type='text' id='fieldcorename' name='fieldcorename' value=''><br>
284 Select List <select id='fieldansid' name='fieldansid'><option value=
''>NOT SET</option><option value=
'1'>US
States</option><option value=
'3'>Marital Status</option><option value=
'4'>Salary Frequency</option><option value=
'5'>Generation Code</option><option value=
'2'>Auto Make (NEW)</option><option value=
'6'>Auto Make (USED)</option><option value=
'7'>Payment Frequency</option><option value=
'8'>Stark CU Branches</option><option value=
'11'>Own / Rent</option></select>
285 Response Core Table Field<input type='text' id='responsetablefield' name='responsetablefield' value=''><br>
290 <input type=
'checkbox' name=
'hidden' value=
'1'> Field Hidden <br>
291 Max Length <input type='text' name='maxlength' value=''>##<br>
292 Field Size <input type='text' name='size' value=''>##<br>
293 Default Value <input type='text' name='defaultval' value=''><br>
294 <input type=
'checkbox' name=
'print_summary' value=
'1'> Print Summary<br>
295 Print Mask <input type='text' name='print_mask' value=''><br>
300 Validation Required <select name='validation_require'><option value=
''>NOT SET</option><option value=
'1'>On Submit ONLY</option><option value=
'2'>On Save AND Submit</option></select><br>
301 Validation Type <select name='validation_match'><option value=
'date'>Date</option><option value=
'ssn'>SSN</option><option value=
'phone'>Phone</option><option value=
'url'>URL</option><option value=
'usd'>Dollar</option><option value=
'integer'>Integer</option><option value=
'number'>Number</option><option value=
'zip'>Zip Code</option></select><br>
302 Custom Validation Regex <input type='text' name='validation_custom' value=''> FUTURE DEVELOPMENT<br>
303 Custom Validation Message <input type='text' name='validation_desc' value=''> FUTURE DEVELOPMENT<br>
304 Validation Range <input type='text' name='validation_range' value=''> FUTURE DEVELOPMENT<br>
305 Custom Validation Field Name <input type='text' name='validation_conditionname' value=''><br>
306 Require Conditional Field: <input type=
'text' name=
'validation_require_conditional[field]' value=
''> Value: <input type=
'text' name=
'validation_require_conditional[value]' value=
''><br>
311 Help URL Link href: <input type=
'text' name=
'helpurl[href]' value=
''> Display: <input type=
'text' name=
'helpurl[display]' value=
''><br>
312 .eg Text <input type='text' name='egtext' value=''><br>
313 Append Class <input type='text' name='append_class' value=''><br>
314 <input type=
'checkbox' name=
'appendnextfield' value=
''> Append Next Row? In development<br>
315 <input type=
'checkbox' name=
'localfieldonly' value=
''> Local Field Only?<br>
316 Regex (USED?)<input type=
'text' name=
'regex' value=
''><br>