summaryrefslogtreecommitdiff
path: root/UI/Contact/contact.html
blob: 9aeaad8233d433957a6a0a2a08dbc43f48adad4f (plain)
  1. <?lsmb INCLUDE 'ui-header.html'
  2. include_stylesheet = [
  3. stylesheet
  4. 'UI/Contact/contact.css'
  5. ] ?>
  6. <?lsmb PROCESS 'elements.html' ?>
  7. <body>
  8. <?lsmb IF name ?>
  9. <div class="pageheading"><?lsmb name?></div>
  10. <?lsmb END ?>
  11. <div class="navigation" id="nav_div">
  12. <?lsmb IF entity_id ?><?lsmb operation = "Edit" ?><?lsmb ELSE
  13. ?><?lsmb operation = "Add"
  14. ?><?lsmb END ?>
  15. <!-- CT: Keys for localization scripts:
  16. <?lsmb text("Add Customer") ?>
  17. <?lsmb text("Edit Customer") ?>
  18. <?lsmb text("Add Vendor") ?>
  19. <?lsmb text("Edit Vendor") ?>
  20. <?lsmb text("Add Employee") ?>
  21. <?lsmb text("Edit Employee") ?>
  22. -->
  23. <ul class="navigation">
  24. <?lsmb IF entity_class == 3 ?>
  25. <li><a href="#hr_div"><?lsmb text('HR') ?></a></li>
  26. <?lsmb ELSE ?>
  27. <li><a href="#company_div"><?lsmb text('Company') ?></a></li>
  28. <li><a href="#credit_div"><?lsmb text('Accounts') ?></a></li>
  29. <?lsmb END ?>
  30. <?lsmb IF entity_id ?>
  31. <li><a href="#location_div"><?lsmb text('Addresses') ?></a></li>
  32. <li><a href="#contact_div"><?lsmb text('Contact Info') ?></a></li>
  33. <li><a href="#bank_div"><?lsmb text('Bank Accounts') ?></a></li>
  34. <li><a href="#notes_div"><?lsmb text('Notes') ?></a></li>
  35. <!-- Commented out as not yet implemented -CT
  36. <li><a href="#history_div"><?lsmb text('History') ?></a></li>
  37. <li><a href="#user_div"><?lsmb text('User') ?></a></li>
  38. -->
  39. <?lsmb END ?>
  40. </ul>
  41. </div>
  42. <?lsmb IF entity_class == 3 ?>
  43. <div id="hr_div" class="container">
  44. <div class="listtop"><strong><?lsmb text("$operation Employee") ?></strong></div>
  45. <form name="hr" action="<?lsmb script ?>" method="post">
  46. <?lsmb PROCESS input element_data = {
  47. type = "hidden"
  48. name = "entity_id"
  49. value = entity_id
  50. } ?>
  51. <div class="input" id="person_name_div"><?lsmb text('Name:')?>&nbsp;
  52. <!-- TODO: Add Saluatation -->
  53. <?lsmb PROCESS input element_data = {
  54. label = text('First')
  55. name = "first_name"
  56. value = first_name
  57. type = "text"
  58. size = 20
  59. } ?>
  60. <?lsmb PROCESS input element_data = {
  61. label = text('Middle')
  62. name = "middle_name"
  63. value = middle_name
  64. type = "text"
  65. size = 20
  66. } ?>
  67. <?lsmb PROCESS input element_data = {
  68. label = text('Last')
  69. name = "last_name"
  70. value = last_name
  71. type = "text"
  72. size = 20
  73. } ?>
  74. </div>
  75. <div id="job_title_div">
  76. <!-- Note that the strange # ' constructs are only necessary to help VIM avoid
  77. problems with multi-word single-quoted constructs in PI tags. -CT -->
  78. <?lsmb PROCESS input element_data = {
  79. label = text('Job Title:')
  80. name = "role"
  81. value = role
  82. type = "text"
  83. size = 20
  84. } # ' ?>
  85. <?lsmb PROCESS input element_data = {
  86. label = text('Sales:')
  87. value = 1
  88. type = "checkbox"
  89. checked = sales
  90. name = "sales"
  91. } ?>
  92. <?lsmb PROCESS input element_data = {
  93. label = text('Employee Number')
  94. value = employee_number
  95. name = "employee_number"
  96. type = "text"
  97. size = 20
  98. } # ' ?>
  99. <label for="manager_select"><?lsmb text('Manager:') ?></label>
  100. <select id="manager_select" name="manager_id">
  101. <?lsmb FOREACH e = employee ?>
  102. <option value = e.entity_id <?lsmb (manager_id == e.entity_id) ? "SELECTED" : ""?><?lsmb e.name ?></option>
  103. <?lsmb END ?>
  104. </select>
  105. <div>
  106. <?lsmb PROCESS input element_data = {
  107. label = text('DOB:')
  108. name = "dob"
  109. value = dob
  110. type = "text"
  111. class = "date"
  112. size = 10
  113. } ?>
  114. <?lsmb PROCESS input element_data = {
  115. label = text('Start Date:')
  116. name = "start_date"
  117. value = start_date
  118. type = "text"
  119. class = "date"
  120. size = 10
  121. } # ' ?>
  122. <?lsmb PROCESS input element_data = {
  123. label = text('End Date:')
  124. name = "end_date"
  125. value = end_date
  126. class = "text"
  127. type = "text"
  128. size = 10
  129. } # ' ?>
  130. <div>
  131. <?lsmb PROCESS button element_data = {
  132. text = text('Save')
  133. class = "submit"
  134. type = "submit"
  135. value = "save_employee"
  136. } ?>
  137. </div>
  138. </form>
  139. <?lsmb ELSE ?>
  140. <div class="container" id="company_div">
  141. <?lsmb SWITCH entity_class
  142. ?><?lsmb CASE 1 ?><?lsmb entity_classname = "Vendor"
  143. ?><?lsmb CASE 2 ?><?lsmb entity_classname = "Customer"
  144. ?><?lsmb END ?>
  145. <div class="listtop"><strong><?lsmb text("$operation $entity_classname") ?></strong></div>
  146. <form name="customer" method="post" action="<?lsmb script ?>">
  147. <?lsmb PROCESS input element_data = {
  148. type = "hidden"
  149. name = "entity_id"
  150. value = entity_id
  151. } ?>
  152. <?lsmb PROCESS input element_data = {
  153. type = "hidden"
  154. name = "id"
  155. value = id
  156. } ?>
  157. <?lsmb PROCESS input element_data = {
  158. type = "hidden"
  159. name = "account_class"
  160. value = account_class
  161. } ?>
  162. <?lsmb PROCESS input element_data = {
  163. label = text('Control Code:') #'
  164. type= "text"
  165. name = "control_code"
  166. value = control_code
  167. size = "20"
  168. } ?>
  169. <?lsmb IF !created_as_class;
  170. created_as_class = entity_class;
  171. END; # IF !created_as_class ?>
  172. <?lsmb PROCESS select element_data = {
  173. name = "created_as_class"
  174. options = entity_classes
  175. default_values = [created_as_class]
  176. text_attr = 'class'
  177. value_attr = 'id'
  178. label = text('Class:')
  179. } ?>
  180. <?lsmb PROCESS button element_data = {
  181. text = text('Generate Control Code')
  182. type = "submit"
  183. name = "action"
  184. value = "generate_control_code"
  185. class = "submit"
  186. } ?><br/>
  187. <?lsmb PROCESS input element_data = {
  188. label = text('Name:')
  189. type= "text"
  190. name = "name"
  191. value = name
  192. size = "20"
  193. } ?><br/>
  194. <table>
  195. <tr>
  196. <td>
  197. <?lsmb INCLUDE input element_data = {
  198. label = text('Tax Number/SSN:'),
  199. name = "tax_id",
  200. value = tax_id,
  201. type = "text",
  202. size = "19"
  203. } #' ?>
  204. </td>
  205. <td>
  206. <?lsmb INCLUDE input element_data = {
  207. label = text('SIC:'),
  208. name = "sic_code",
  209. value = sic_code,
  210. type = "text",
  211. size = "19",
  212. class = 'sic'
  213. } ?>
  214. </td>
  215. </tr>
  216. </table>
  217. <hr/>
  218. <?lsmb INCLUDE button element_data = {
  219. text = text('Save'),
  220. class="submit"
  221. type="submit"
  222. name="action"
  223. value="save"
  224. accesskey="S"
  225. title="Save [Alt-S]"
  226. } ?>
  227. </form>
  228. <?lsmb FOREACH n = notes ?>
  229. <div class="note">
  230. <div class="note_contents"><?lsmb n.note ?></div>
  231. </div>
  232. <?lsmb END ?>
  233. </div>
  234. <?lsmb IF entity_id;
  235. INCLUDE 'rates_div.html';
  236. END -?>
  237. <?lsmb IF entity_id ?>
  238. <div id="credit_div">
  239. <div class="listtop"><strong>Accounts</strong></div>
  240. <table width="100%">
  241. <tr class="listheading">
  242. <th class="account_class"><?lsmb text('Type') ?></th>
  243. <th class="number"><?lsmb text("Number") ?></th>
  244. <th class="description"><?lsmb text("Description") ?></th>
  245. <th class="credit_limit"><?lsmb text('Credit Limit') ?></th>
  246. <th class="start_date"><?lsmb text('Start Date') ?></th>
  247. <th class="end_date"><?lsmb text('End Date') ?></th>
  248. </tr>
  249. <?lsmb FOREACH cl_item = credit_list ?>
  250. <tr <?lsmb IF meta_number == cl_item.meta_number ?> class="active"<?lsmb END ?>>
  251. <td><?lsmb IF cl_item.entity_class == 1 ?><?lsmb text('Vendor') ?>
  252. <?lsmb ELSIF cl_item.entity_class == 2 ?><?lsmb text('Customer') ?>
  253. <?lsmb END ?>
  254. </td>
  255. <td><a href="<?lsmb script ?>?action=get&account_class=<?lsmb
  256. account_class ?>&entity_id=<?lsmb entity_id
  257. ?>&meta_number=<?lsmb cl_item.meta_number ?>"><?lsmb cl_item.meta_number ?></a></td>
  258. <td><?lsmb cl_item.description ?></td>
  259. <td><?lsmb cl_item.credit_limit ?></td>
  260. <td><?lsmb cl_item.start_date ?></td>
  261. <td><?lsmb cl_item.end_date ?></td>
  262. </tr>
  263. <?lsmb END ?>
  264. </table>
  265. <form id="credit_form" name="credit_form" method="post"
  266. action="<?lsmb script ?>">
  267. <?lsmb PROCESS input element_data = {
  268. type = "hidden"
  269. name = "entity_id"
  270. value = entity_id
  271. } ?>
  272. <?lsmb PROCESS input element_data = {
  273. type = "hidden"
  274. name = "credit_id"
  275. value = credit_id
  276. } ?>
  277. <?lsmb PROCESS input element_data = {
  278. type = "hidden"
  279. name = "account_class"
  280. value = account_class
  281. } ?>
  282. <table>
  283. <tr class="eca_row">
  284. <td>
  285. <?lsmb PROCESS input element_data = {
  286. label = text("$entity_classname Number:"),
  287. type= "text",
  288. name = "meta_number",
  289. value = meta_number,
  290. size = "20"
  291. } # " ?></td>
  292. <td><?lsmb PROCESS input element_data = {
  293. label = text("Description:"),
  294. type= "text",
  295. name = "description",
  296. value = description,
  297. size = "20"
  298. } ?></td>
  299. </tr>
  300. <tr id="date-row">
  301. <td>
  302. <?lsmb PROCESS input element_data = {
  303. label = text('Starting Date:'),
  304. name = "startdate",
  305. class = "date",
  306. value = startdate,
  307. type = "text",
  308. size = "12",
  309. maxlength = "10"
  310. } #' ?>
  311. </td>
  312. <td>
  313. <?lsmb PROCESS input element_data = {
  314. label = text('End Date:'),
  315. name = "enddate",
  316. class = "date",
  317. value = enddate,
  318. type = "text",
  319. size = "12",
  320. maxlength = "10"
  321. } #' ?>
  322. </td>
  323. </tr>
  324. <tr id="credit-row">
  325. <td>
  326. <?lsmb INCLUDE input element_data = {
  327. label = text('Credit Limit:'),
  328. name = "creditlimit",
  329. value = creditlimit,
  330. type = "text",
  331. size = "20"
  332. } #' ?>
  333. </td>
  334. <td><span id="terms-span">
  335. <?lsmb INCLUDE input element_data = {
  336. label = text('Terms:'),
  337. name = "terms",
  338. value = terms,
  339. type = "text",
  340. size = "5"
  341. } ?> <?lsmb text('days') ?></span>
  342. </td>
  343. </tr>
  344. <tr id="discount-gifi-row">
  345. <td>
  346. <?lsmb INCLUDE input element_data = {
  347. label = text('Discount:'),
  348. name = "discount",
  349. value = discount,
  350. type = "text",
  351. size = "3",
  352. maxlength = 3
  353. } ?>% /
  354. <?lsmb INCLUDE input element_data = {
  355. name = "discount_terms",
  356. value = discount_terms,
  357. type = "text",
  358. size = "3",
  359. maxlength = 3
  360. } ?> <?lsmb text('days') ?>
  361. </td>
  362. <td>
  363. <?lsmb INCLUDE input element_data = {
  364. label = text('Subcontract GIFI:'),
  365. name = "gifi_accno",
  366. value = gifi_accno,
  367. type = "text",
  368. size = "19"
  369. } #' ?>
  370. </td>
  371. </tr>
  372. <tr id="account-link-row">
  373. <td> <?lsmb INCLUDE select element_data = {
  374. name = "ar_ap_account_id"
  375. default_values = [ar_ap_account_id]
  376. options = ar_ap_acc_list
  377. label = text((account_class == 1) ? 'AP' : 'AR')
  378. text_attr = "text"
  379. value_attr = "id"
  380. } ?>
  381. </td>
  382. <td> <?lsmb INCLUDE select element_data = {
  383. name = "cash_account_id"
  384. default_values = [cash_account_id]
  385. options = cash_acc_list
  386. label = text('Payment')
  387. text_attr = "text"
  388. value_attr = "id"
  389. } ?>
  390. </td>
  391. </tr>
  392. <tr id="business-threshold-row">
  393. <td> <?lsmb INCLUDE select element_data = {
  394. name = "business_id"
  395. options = business_types
  396. default_values = [business_id]
  397. text_attr = "description"
  398. value_attr = "id"
  399. label = text('Business Type:') #'
  400. } ?>
  401. </td>
  402. <td> <?lsmb INCLUDE input element_data = {
  403. name = "threshold"
  404. value = threshold
  405. type = "text"
  406. size = "20"
  407. label = text('Threshold')
  408. class = "numeric"
  409. } ?>
  410. </tr>
  411. </table>
  412. <?lsmb IF credit_id;
  413. INCLUDE button element_data = {
  414. text = text('Save Changes'),
  415. class="submit"
  416. type="submit"
  417. name="action"
  418. value="save_credit"
  419. accesskey="C"
  420. title="Save Credit Account[Alt-C]"
  421. };
  422. END ?>
  423. <?lsmb INCLUDE button element_data = {
  424. text = text('Save New'),
  425. class="submit"
  426. type="submit"
  427. name="action"
  428. value="save_credit_new"
  429. title="Save Credit Account as New" #'
  430. } ?>
  431. <?lsmb INCLUDE button element_data = {
  432. class="submit"
  433. type="submit"
  434. name="action"
  435. value="add_transaction"
  436. accesskey="A"
  437. title="Transaction [Alt-A]"
  438. text = (entity_class == 1) ? text('AP Transaction') : text('AR Transaction')
  439. } ?>
  440. <?lsmb INCLUDE button element_data = {
  441. class="submit"
  442. type="submit"
  443. name="action"
  444. value="add_invoice"
  445. accesskey="I"
  446. title="Invoice [Alt-I]"
  447. text = (entity_class == 1) ? text('Vendor Invoice') : text('Customer Invoice')
  448. } ?>
  449. <?lsmb INCLUDE button element_data = {
  450. class="submit"
  451. type="submit"
  452. name="action"
  453. value="add_order"
  454. accesskey="O"
  455. title="Order [Alt-O]"
  456. text = (entity_class == 1) ? text('Purchase Order') : text('Sales Order')
  457. } ?>
  458. <?lsmb INCLUDE button element_data = {
  459. class="submit"
  460. type="submit"
  461. name="action"
  462. value="rfq"
  463. accesskey="Q"
  464. title="Quotation [Alt-Q]"
  465. text = (entity_class == 1) ? text('RFQ') : text('Quotation')
  466. } ?>
  467. <?lsmb INCLUDE button element_data = {
  468. class="submit"
  469. type="submit"
  470. name="action"
  471. value="pricelist"
  472. accesskey="P"
  473. title="Pricelist [Alt-P]"
  474. text = text('Pricelist')
  475. } ?>
  476. </form>
  477. </div>
  478. <?lsmb END ?>
  479. <?lsmb END ?>
  480. <?lsmb IF entity_id && credit_id ?>
  481. <div id="location_div" class="container">
  482. <div class="listtop"><?lsmb text('Locations') ?></div>
  483. <!-- This entire form should probably be optionaly automated with AJAX
  484. in order to prevent user confusion -CT -->
  485. <form id="location_form" action="<?lsmb script ?>">
  486. <?lsmb PROCESS input element_data = {
  487. type="hidden"
  488. name="entity_id"
  489. value=entity_id
  490. } ?>
  491. <?lsmb PROCESS input element_data = {
  492. type="hidden"
  493. name="credit_id"
  494. value=credit_id
  495. } ?>
  496. <?lsmb PROCESS input element_data = {
  497. type="hidden"
  498. name="location_id"
  499. value=location_id
  500. } ?>
  501. <table width="100%">
  502. <tr class="listheading">
  503. <th class="type"><?lsmb text('Type') ?></th>
  504. <th class="line_one"><?lsmb text('Address1') ?></th>
  505. <th class="city"><?lsmb text('City') ?></th>
  506. <th class="state"><?lsmb text('State/Province') ?></th>
  507. <th class="mail_code"><?lsmb text('ZIP/Post Code') ?></th>
  508. <th class="country"><?lsmb text('Country') ?></th>
  509. <th class="actions"><?lsmb text('Actions') ?></th>
  510. </tr>
  511. <?lsmb FOREACH loc = locations ?>
  512. <tr <?lsmb IF location_id == loc.id ?> class="active" <?lsmb END ?>>
  513. <td class="type"><?lsmb loc.class ?></td>
  514. <td class="line_one"><?lsmb loc.line_one ?></td>
  515. <td class="city"><?lsmb loc.city ?></td>
  516. <td class="state"><?lsmb loc.state ?></td>
  517. <td class="mail_code"><?lsmb loc.mail_code ?></td>
  518. <td class="country"><?lsmb loc.country ?></td>
  519. <td class="actions">
  520. <!-- TODO: Automate links with AJAX -->
  521. <a href="<?lsmb script ?>?action=edit&entity_id=<?lsmb entity_id
  522. ?>&location_id=<?lsmb loc.id ?>&credit_id=<?lsmb
  523. credit_id ?>">[edit]</a>
  524. <a href="<?lsmb script ?>?action=delete_location&entity_id=<?lsmb
  525. entity_id ?>&location_id=<?lsmb loc.id
  526. ?>&credit_id = <?lsmb credit_id ?>">[delete]</a>
  527. </td>
  528. </tr>
  529. <?lsmb END ?>
  530. </table>
  531. <div> <!-- TODO: Move to elements.html -CT -->
  532. <label for="loc_type"><?lsmb text('Type:') ?></label>
  533. <select id='loc_type' name="location_class">
  534. <?lsmb FOREACH lc = location_class_list ?>
  535. <option value="<?lsmb lc.id ?>"><?lsmb lc.class ?></option>
  536. <?lsmb END ?>
  537. </select>
  538. </div>
  539. <div>
  540. <?lsmb PROCESS input element_data = {
  541. label = text('Address:'),
  542. name = "line_one",
  543. value = line_one,
  544. type = "text",
  545. size = "20"
  546. } ?>
  547. <!--
  548. if the following button and script show up in svn
  549. /trunk, please remove them. -CT -->
  550. <script type="text/javascript">
  551. function show_lines(){
  552. var e;
  553. e = document.getElementById('line-two');
  554. e.style.display = 'inline';
  555. e = document.getElementById('line-three');
  556. e.style.display = 'inline';
  557. e = document.getElementById('show-lines-button');
  558. e.style.display = 'none';
  559. return false;
  560. }
  561. </script>
  562. <button onclick="javascript: return show_lines()"
  563. id="show-lines-button" type="button"><?lsmb text('Show More Lines') ?>
  564. </button> <!-- end custom section -->
  565. </div>
  566. <div>
  567. <?lsmb PROCESS input element_data = {
  568. name = "line_two"
  569. class = "addl-address"
  570. value = line_two
  571. type = "text"
  572. size = "20"
  573. } ?>
  574. </div>
  575. <div>
  576. <?lsmb PROCESS input element_data = {
  577. name = "line_three"
  578. class = "addl-address"
  579. value = line_three
  580. type = "text"
  581. size = "20"
  582. } ?>
  583. </div>
  584. <div>
  585. <?lsmb PROCESS input element_data = {
  586. label = text('City:'),
  587. name = "city",
  588. value = city,
  589. type = "text",
  590. size = "20"
  591. } ?>
  592. </div>
  593. <div>
  594. <?lsmb PROCESS input element_data = {
  595. label = text('State/Province:'),
  596. name = "state",
  597. value = state,
  598. type = "text",
  599. size = "20"
  600. } ?>
  601. </div>
  602. <div>
  603. <?lsmb PROCESS input element_data = {
  604. label = text('Zip/Post Code:'),
  605. name = "mail_code",
  606. value = mail_code,
  607. type = "text",
  608. size = "20"
  609. } #' ?>
  610. </div>
  611. <div> <!-- TODO: Move to elements.html -CT -->
  612. <?lsmb INCLUDE select element_data = {
  613. text_attr = "name"
  614. value_attr = "id"
  615. default_values = [country]
  616. options = country_list
  617. name = "country_code"
  618. label = text('Country:')
  619. } ?>
  620. </div>
  621. <div><?lsmb PROCESS button element_data = {
  622. class = "submit"
  623. name = "action"
  624. value = "add_location"
  625. id = "loc_save_location"
  626. text = text('Save Location')
  627. } #' ?>
  628. </div>
  629. </form>
  630. </div>
  631. <div class="container" id="contact_div">
  632. <div class="listtop"><?lsmb text('Contact Information') ?></div>
  633. <table width="100%">
  634. <tr class="listheading">
  635. <th class="contact_class"><?lsmb text('Type:') ?></th>
  636. <th class="contact"><?lsmb text('Contact Info:') ?></th>
  637. <th class="contact_actions"><?lsmb text('Actions:') ?></th>
  638. </tr>
  639. <?lsmb FOREACH ct = contacts ?>
  640. <tr>
  641. <td class="contact_class"><?lsmb ct.class ?></td>
  642. <td class="contact"><?lsmb ct.contact ?></td>
  643. <td class="contact_actions">
  644. <a href="<?lsmb tt_url(script)
  645. ?>?entity_id=<?lsmb tt_url(entity_id)
  646. ?>&contact=<?lsmb tt_url(ct.contact)
  647. ?>&contact_class=<?lsmb tt_url(ct.class_id)
  648. ?>&description=<?lsmb tt_url(ct.description)
  649. ?>&action=edit&credit_id=<?lsmb
  650. tt_url(credit_id) ?>"
  651. >[<?lsmb text('Edit'); ?>]</a>&nbsp;&nbsp;
  652. <a href="<?lsmb tt_url(script)
  653. ?>?entity_id=<?lsmb tt_url(entity_id)
  654. ?>&contact_id=<?lsmb tt_url(ct.id)
  655. ?>&action=delete_contact&credit_id=<?lsmb
  656. tt_url(credit_id) ?>"
  657. >[<?lsmb text('Delete'); ?>]</a>
  658. </td>
  659. </tr>
  660. <?lsmb END ?>
  661. </table>
  662. <form action="<?lsmb script ?>">
  663. <?lsmb PROCESS input element_data = {
  664. type="hidden"
  665. name="entity_id"
  666. value=entity_id
  667. } ?>
  668. <?lsmb PROCESS input element_data = {
  669. type="hidden"
  670. name="credit_id"
  671. value=credit_id
  672. } ?>
  673. <?lsmb PROCESS input element_data = {
  674. type="hidden"
  675. name="old_contact_class"
  676. value=contact_class
  677. } ?>
  678. <?lsmb PROCESS input element_data = {
  679. type="hidden"
  680. name="old_contact"
  681. value=contact
  682. } ?>
  683. <?lsmb PROCESS input element_data = {
  684. type="hidden"
  685. name="contact_id"
  686. value=contact_id
  687. } ?>
  688. <div>
  689. <?lsmb PROCESS select element_data = {
  690. name = "contact_class"
  691. label = "Type"
  692. text_attr = "class"
  693. value_attr = "id"
  694. default_values = [contact_class]
  695. options = contact_class_list
  696. } ?>
  697. </div>
  698. <div>
  699. <?lsmb PROCESS input element_data = {
  700. label = text('Description:'),
  701. name = "description"
  702. value = description
  703. type = "text"
  704. size = "20"
  705. } #' ?>
  706. </div>
  707. <div>
  708. <?lsmb PROCESS input element_data = {
  709. label = text('Contact Info:'),
  710. name = "contact"
  711. value = contact
  712. type = "text"
  713. size = "20"
  714. } #' ?>
  715. </div>
  716. <div><?lsmb PROCESS button element_data = {
  717. name = "action",
  718. value = "save_contact",
  719. text = text('Save Contact'),
  720. class = "submit"
  721. } #' ?>
  722. <?lsmb IF contact.defined ?>
  723. <?lsmb PROCESS button element_data = {
  724. name = "action",
  725. value = "save_contact_new",
  726. text = text('Save As New'),
  727. class = "submit"
  728. } #' ?>
  729. <?lsmb END # IF old_contact.defined ?>
  730. </div>
  731. </form>
  732. </div>
  733. <div class="container" id="bank_div">
  734. <div class="listtop"><?lsmb text('Bank Accounts') ?></div>
  735. <table width="100%">
  736. <tr class="listheading">
  737. <th class="bic"><?lsmb text('BIC/SWIFT Code') ?></th>
  738. <th class="iban"><?lsmb text('Account Number') ?></th>
  739. <th class="actions"><?lsmb text('Actions') ?></th>
  740. </tr>
  741. <?lsmb FOREACH ba = bank_account ?>
  742. <tr>
  743. <td class="bic"><?lsmb ba.bic ?></td>
  744. <td class="iban"><?lsmb ba.iban ?></td>
  745. <td class="actions">
  746. <a href="<?lsmb script ?>?action=edit_bank_acct&entity_id=<?lsmb
  747. entity_id ?>&bank_account_id=<?lsmb ba.id ?>"
  748. >[Edit]</a>
  749. <a href="<?lsmb script ?>?action=delete_bank_acct&entity_id=<?lsmb
  750. entity_id ?>&bank_account_id=<?lsmb ba.id ?>"
  751. >[Delete]</a>
  752. </td>
  753. </tr>
  754. <?lsmb END ?>
  755. </table>
  756. <form name="bank_acct" action="<?lsmb script ?>">
  757. <?lsmb PROCESS input element_data = {
  758. type="hidden"
  759. name="entity_id"
  760. value=entity_id
  761. } ?>
  762. <?lsmb PROCESS input element_data = {
  763. type="hidden"
  764. name="credit_id"
  765. value=credit_id
  766. } ?>
  767. <?lsmb PROCESS input element_data = {
  768. type="hidden"
  769. name="bank_account_id"
  770. value=bank_account_id
  771. } ?>
  772. <div><label for="bic">
  773. <?lsmb INCLUDE input element_data = {
  774. type="text"
  775. label = text('BIC/SWIFT Code:')
  776. name="bic"
  777. value=bic
  778. size=20
  779. } #' ?>
  780. </div>
  781. <div><label for="iban">
  782. <?lsmb PROCESS input element_data = {
  783. type="text"
  784. label = text('Bank Account:')
  785. name="iban"
  786. value=iban
  787. size=20
  788. } #' ?>
  789. </div>
  790. <div><?lsmb PROCESS button element_data = {
  791. name="action"
  792. value="save_bank_account"
  793. class="submit"
  794. text = text('Save')
  795. } ?>
  796. </div>
  797. </form>
  798. </div>
  799. <div id="notes_div">
  800. <div class="listtop"><?lsmb text('Notes') ?></div>
  801. <form action="<?lsmb script ?>" method="post">
  802. <?lsmb PROCESS input element_data = {
  803. type="hidden"
  804. name="entity_id"
  805. value=entity_id
  806. } ?>
  807. <?lsmb PROCESS input element_data = {
  808. type="hidden"
  809. name="credit_id"
  810. value=credit_id
  811. } ?>
  812. <?lsmb IF credit_id -?>
  813. <div class="input"><?lsmb PROCESS select element_data = {
  814. name = "note_class"
  815. default_values = [note_class]
  816. options = note_class_options
  817. label = text("Note Class") #"
  818. text_attr = "label"
  819. value_attr = "value"
  820. } ?>
  821. </div>
  822. <?lsmb END # IF credit_id -?>
  823. <div class="input"><?lsmb PROCESS textarea element_data = {
  824. label = text('Notes:<br />')
  825. name = 'note'
  826. } ?></div>
  827. <div class="input">
  828. <?lsmb PROCESS button element_data = {
  829. text = text('Save')
  830. class = 'submit'
  831. name = 'action'
  832. value = 'save_notes'
  833. } ?>
  834. </form>
  835. <?lsmb FOREACH n = notes ?>
  836. <div class="note">
  837. <div class="timestamp"><?lsmb text('Entered at: [_1]', n.created) ?></div>
  838. <div class="author"><?lsmb text("Author: [_1]", n.created_by) ?></div>
  839. <div class="note_contents"><?lsmb n.note ?></div>
  840. </div>
  841. <?lsmb END ?>
  842. </div>
  843. <?lsmb END ?>
  844. </body>
  845. </html>