summaryrefslogtreecommitdiff
path: root/UI/Contact/contact.html
blob: 3b69c90269014a3932fc4b8eb95d5c3a92762175 (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. } ?>
  179. <?lsmb PROCESS button element_data = {
  180. text = text('Generate')
  181. type = "submit"
  182. name = "action"
  183. value = "generate_control_code"
  184. class = "submit"
  185. } ?><br/>
  186. <?lsmb PROCESS input element_data = {
  187. label = text('Name:')
  188. type= "text"
  189. name = "name"
  190. value = name
  191. size = "20"
  192. } ?><br/>
  193. <table>
  194. <tr>
  195. <td>
  196. <?lsmb INCLUDE input element_data = {
  197. label = text('Tax Number/SSN:'),
  198. name = "tax_id",
  199. value = tax_id,
  200. type = "text",
  201. size = "19"
  202. } #' ?>
  203. </td>
  204. <td>
  205. <?lsmb INCLUDE input element_data = {
  206. label = text('SIC:'),
  207. name = "sic_code",
  208. value = sic_code,
  209. type = "text",
  210. size = "19",
  211. class = 'sic'
  212. } ?>
  213. </td>
  214. </tr>
  215. </table>
  216. <hr/>
  217. <?lsmb INCLUDE button element_data = {
  218. text = text('Save'),
  219. class="submit"
  220. type="submit"
  221. name="action"
  222. value="save"
  223. accesskey="S"
  224. title="Save [Alt-S]"
  225. } ?>
  226. </form>
  227. <?lsmb FOREACH n = notes ?>
  228. <div class="note">
  229. <div class="note_contents"><?lsmb n.note ?></div>
  230. </div>
  231. <?lsmb END ?>
  232. </div>
  233. <?lsmb IF entity_id ?>
  234. <div id="credit_div">
  235. <div class="listtop"><strong>Accounts</strong></div>
  236. <table width="100%">
  237. <tr class="listheading">
  238. <th class="account_class"><?lsmb text('Type') ?></th>
  239. <th class="number"><?lsmb text("Number") ?></th>
  240. <th class="description"><?lsmb text("Description") ?></th>
  241. <th class="credit_limit"><?lsmb text('Credit Limit') ?></th>
  242. <th class="start_date"><?lsmb text('Start Date') ?></th>
  243. <th class="end_date"><?lsmb text('End Date') ?></th>
  244. </tr>
  245. <?lsmb FOREACH cl_item = credit_list ?>
  246. <tr <?lsmb IF meta_number == cl_item.meta_number ?> class="active"<?lsmb END ?>>
  247. <td><?lsmb IF cl_item.entity_class == 1 ?><?lsmb text('Vendor') ?>
  248. <?lsmb ELSIF cl_item.entity_class == 2 ?><?lsmb text('Customer') ?>
  249. <?lsmb END ?>
  250. </td>
  251. <td><a href="<?lsmb script ?>?action=get&account_class=<?lsmb
  252. account_class ?>&entity_id=<?lsmb entity_id
  253. ?>&meta_number=<?lsmb cl_item.meta_number ?>"><?lsmb cl_item.meta_number ?></a></td>
  254. <td><?lsmb cl_item.description ?></td>
  255. <td><?lsmb cl_item.credit_limit ?></td>
  256. <td><?lsmb cl_item.start_date ?></td>
  257. <td><?lsmb cl_item.end_date ?></td>
  258. </tr>
  259. <?lsmb END ?>
  260. </table>
  261. <form id="credit_form" name="credit_form" method="post"
  262. action="<?lsmb script ?>">
  263. <?lsmb PROCESS input element_data = {
  264. type = "hidden"
  265. name = "entity_id"
  266. value = entity_id
  267. } ?>
  268. <?lsmb PROCESS input element_data = {
  269. type = "hidden"
  270. name = "credit_id"
  271. value = credit_id
  272. } ?>
  273. <?lsmb PROCESS input element_data = {
  274. type = "hidden"
  275. name = "account_class"
  276. value = account_class
  277. } ?>
  278. <table>
  279. <tr class="eca_row">
  280. <td>
  281. <?lsmb PROCESS input element_data = {
  282. label = text("$entity_classname Number:"),
  283. type= "text",
  284. name = "meta_number",
  285. value = meta_number,
  286. size = "20"
  287. } # " ?></td>
  288. <td><?lsmb PROCESS input element_data = {
  289. label = text("Description:"),
  290. type= "text",
  291. name = "description",
  292. value = description,
  293. size = "20"
  294. } ?></td>
  295. </tr>
  296. <tr id="date-row">
  297. <td>
  298. <?lsmb PROCESS input element_data = {
  299. label = text('Starting Date:'),
  300. name = "startdate",
  301. class = "date",
  302. value = startdate,
  303. type = "text",
  304. size = "12",
  305. maxlength = "10"
  306. } #' ?>
  307. </td>
  308. <td>
  309. <?lsmb PROCESS input element_data = {
  310. label = text('End Date:'),
  311. name = "enddate",
  312. class = "date",
  313. value = enddate,
  314. type = "text",
  315. size = "12",
  316. maxlength = "10"
  317. } #' ?>
  318. </td>
  319. </tr>
  320. <tr id="credit-row">
  321. <td>
  322. <?lsmb INCLUDE input element_data = {
  323. label = text('Credit Limit:'),
  324. name = "creditlimit",
  325. value = creditlimit,
  326. type = "text",
  327. size = "20"
  328. } #' ?>
  329. </td>
  330. <td><span id="terms-span">
  331. <?lsmb INCLUDE input element_data = {
  332. label = text('Terms:'),
  333. name = "terms",
  334. value = terms,
  335. type = "text",
  336. size = "5"
  337. } ?> <?lsmb text('days') ?></span>
  338. </td>
  339. </tr>
  340. <tr id="discount-gifi-row">
  341. <td>
  342. <?lsmb INCLUDE input element_data = {
  343. label = text('Discount:'),
  344. name = "discount",
  345. value = discount,
  346. type = "text",
  347. size = "3",
  348. maxlength = 3
  349. } ?>% /
  350. <?lsmb INCLUDE input element_data = {
  351. name = "discount_terms",
  352. value = discount_terms,
  353. type = "text",
  354. size = "3",
  355. maxlength = 3
  356. } ?> <?lsmb text('days') ?>
  357. </td>
  358. <td>
  359. <?lsmb INCLUDE input element_data = {
  360. label = text('Subcontract GIFI:'),
  361. name = "gifi_accno",
  362. value = gifi_accno,
  363. type = "text",
  364. size = "19"
  365. } #' ?>
  366. </td>
  367. </tr>
  368. <tr id="account-link-row">
  369. <td> <?lsmb INCLUDE select element_data = {
  370. name = "ar_ap_account_id"
  371. default_values = [ar_ap_account_id]
  372. options = ar_ap_acc_list
  373. label = text((account_class == 1) ? 'AP' : 'AR')
  374. text_attr = "text"
  375. value_attr = "id"
  376. } ?>
  377. </td>
  378. <td> <?lsmb INCLUDE select element_data = {
  379. name = "cash_account_id"
  380. default_values = [cash_account_id]
  381. options = cash_acc_list
  382. label = text('Payment')
  383. text_attr = "text"
  384. value_attr = "id"
  385. } ?>
  386. </td>
  387. </tr>
  388. <tr id="business-threshold-row">
  389. <td> <?lsmb INCLUDE select element_data = {
  390. name = "business_id"
  391. options = business_types
  392. default_values = [business_id]
  393. text_attr = "description"
  394. value_attr = "id"
  395. label = text('Business Type:') #'
  396. } ?>
  397. </td>
  398. <td> <?lsmb INCLUDE input element_data = {
  399. name = "threshold"
  400. value = threshold
  401. type = "text"
  402. size = "20"
  403. label = text('Threshold')
  404. class = "numeric"
  405. } ?>
  406. </tr>
  407. </table>
  408. <?lsmb IF credit_id;
  409. INCLUDE button element_data = {
  410. text = text('Save Changes'),
  411. class="submit"
  412. type="submit"
  413. name="action"
  414. value="save_credit"
  415. accesskey="C"
  416. title="Save Credit Account[Alt-C]"
  417. };
  418. END ?>
  419. <?lsmb INCLUDE button element_data = {
  420. text = text('Save New'),
  421. class="submit"
  422. type="submit"
  423. name="action"
  424. value="save_credit_new"
  425. title="Save Credit Account as New" #'
  426. } ?>
  427. <?lsmb INCLUDE button element_data = {
  428. class="submit"
  429. type="submit"
  430. name="action"
  431. value="add_transaction"
  432. accesskey="A"
  433. title="Transaction [Alt-A]"
  434. text = (entity_class == 1) ? text('AP Transaction') : text('AR Transaction')
  435. } ?>
  436. <?lsmb INCLUDE button element_data = {
  437. class="submit"
  438. type="submit"
  439. name="action"
  440. value="add_invoice"
  441. accesskey="I"
  442. title="Invoice [Alt-I]"
  443. text = (entity_class == 1) ? text('Vendor Invoice') : text('Customer Invoice')
  444. } ?>
  445. <?lsmb INCLUDE button element_data = {
  446. class="submit"
  447. type="submit"
  448. name="action"
  449. value="add_order"
  450. accesskey="O"
  451. title="Order [Alt-O]"
  452. text = (entity_class == 1) ? text('Purchase Order') : text('Sales Order')
  453. } ?>
  454. <?lsmb INCLUDE button element_data = {
  455. class="submit"
  456. type="submit"
  457. name="action"
  458. value="rfq"
  459. accesskey="Q"
  460. title="Quotation [Alt-Q]"
  461. text = (entity_class == 1) ? text('RFQ') : text('Quotation')
  462. } ?>
  463. <?lsmb INCLUDE button element_data = {
  464. class="submit"
  465. type="submit"
  466. name="action"
  467. value="pricelist"
  468. accesskey="P"
  469. title="Pricelist [Alt-P]"
  470. text = text('Pricelist')
  471. } ?>
  472. </form>
  473. </div>
  474. <?lsmb END ?>
  475. <?lsmb END ?>
  476. <?lsmb IF entity_id && credit_id ?>
  477. <div id="location_div" class="container">
  478. <div class="listtop"><?lsmb text('Locations') ?></div>
  479. <!-- This entire form should probably be optionaly automated with AJAX
  480. in order to prevent user confusion -CT -->
  481. <form id="location_form" action="<?lsmb script ?>">
  482. <?lsmb PROCESS input element_data = {
  483. type="hidden"
  484. name="entity_id"
  485. value=entity_id
  486. } ?>
  487. <?lsmb PROCESS input element_data = {
  488. type="hidden"
  489. name="credit_id"
  490. value=credit_id
  491. } ?>
  492. <?lsmb PROCESS input element_data = {
  493. type="hidden"
  494. name="location_id"
  495. value=location_id
  496. } ?>
  497. <table width="100%">
  498. <tr class="listheading">
  499. <th class="type"><?lsmb text('Type') ?></th>
  500. <th class="line_one"><?lsmb text('Address1') ?></th>
  501. <th class="city"><?lsmb text('City') ?></th>
  502. <th class="state"><?lsmb text('State/Province') ?></th>
  503. <th class="mail_code"><?lsmb text('ZIP/Post Code') ?></th>
  504. <th class="country"><?lsmb text('Country') ?></th>
  505. <th class="actions"><?lsmb text('Actions') ?></th>
  506. </tr>
  507. <?lsmb FOREACH loc = locations ?>
  508. <tr <?lsmb IF location_id == loc.id ?> class="active" <?lsmb END ?>>
  509. <td class="type"><?lsmb loc.class ?></td>
  510. <td class="line_one"><?lsmb loc.line_one ?></td>
  511. <td class="city"><?lsmb loc.city ?></td>
  512. <td class="state"><?lsmb loc.state ?></td>
  513. <td class="mail_code"><?lsmb loc.mail_code ?></td>
  514. <td class="country"><?lsmb loc.country ?></td>
  515. <td class="actions">
  516. <!-- TODO: Automate links with AJAX -->
  517. <a href="<?lsmb script ?>?action=edit&entity_id=<?lsmb entity_id
  518. ?>&location_id=<?lsmb loc.id ?>&credit_id=<?lsmb
  519. credit_id ?>">[edit]</a>
  520. <a href="<?lsmb script ?>?action=delete_location&entity_id=<?lsmb
  521. entity_id ?>&location_id=<?lsmb loc.id
  522. ?>&credit_id = <?lsmb credit_id ?>">[delete]</a>
  523. </td>
  524. </tr>
  525. <?lsmb END ?>
  526. </table>
  527. <div> <!-- TODO: Move to elements.html -CT -->
  528. <label for="loc_type"><?lsmb text('Type:') ?></label>
  529. <select id='loc_type' name="location_class">
  530. <?lsmb FOREACH lc = location_class_list ?>
  531. <option value="<?lsmb lc.id ?>"><?lsmb lc.class ?></option>
  532. <?lsmb END ?>
  533. </select>
  534. </div>
  535. <div>
  536. <?lsmb PROCESS input element_data = {
  537. label = text('Address:'),
  538. name = "line_one",
  539. value = line_one,
  540. type = "text",
  541. size = "20"
  542. } ?>
  543. </div>
  544. <div>
  545. <?lsmb PROCESS input element_data = {
  546. name = "line_two"
  547. class = "addl-address"
  548. value = line_two
  549. type = "text"
  550. size = "20"
  551. } ?>
  552. </div>
  553. <div>
  554. <?lsmb PROCESS input element_data = {
  555. name = "line_three"
  556. class = "addl-address"
  557. value = line_three
  558. type = "text"
  559. size = "20"
  560. } ?>
  561. </div>
  562. <div>
  563. <?lsmb PROCESS input element_data = {
  564. label = text('City:'),
  565. name = "city",
  566. value = city,
  567. type = "text",
  568. size = "20"
  569. } ?>
  570. </div>
  571. <div>
  572. <?lsmb PROCESS input element_data = {
  573. label = text('State/Province:'),
  574. name = "state",
  575. value = state,
  576. type = "text",
  577. size = "20"
  578. } ?>
  579. </div>
  580. <div>
  581. <?lsmb PROCESS input element_data = {
  582. label = text('Zip/Post Code:'),
  583. name = "mail_code",
  584. value = mail_code,
  585. type = "text",
  586. size = "20"
  587. } #' ?>
  588. </div>
  589. <div> <!-- TODO: Move to elements.html -CT -->
  590. <?lsmb INCLUDE select element_data = {
  591. text_attr = "name"
  592. value_attr = "id"
  593. default_values = [country]
  594. options = country_list
  595. name = "country_code"
  596. label = text('Country:')
  597. } ?>
  598. </div>
  599. <div><?lsmb PROCESS button element_data = {
  600. class = "submit"
  601. name = "action"
  602. value = "add_location"
  603. id = "loc_save_location"
  604. text = text('Save Location')
  605. } #' ?>
  606. </div>
  607. </form>
  608. </div>
  609. <div class="container" id="contact_div">
  610. <div class="listtop"><?lsmb text('Contact Information') ?></div>
  611. <table width="100%">
  612. <tr class="listheading">
  613. <th class="contact_class"><?lsmb text('Type:') ?></th>
  614. <th class="contact"><?lsmb text('Contact Info:') ?></th>
  615. <th class="contact_actions"><?lsmb text('Actions:') ?></th>
  616. </tr>
  617. <?lsmb FOREACH ct = contacts ?>
  618. <tr>
  619. <td class="contact_class"><?lsmb ct.class ?></td>
  620. <td class="contact"><?lsmb ct.contact ?></td>
  621. <td class="contact_actions">
  622. <a href="<?lsmb tt_url(script)
  623. ?>?entity_id=<?lsmb tt_url(entity_id)
  624. ?>&contact=<?lsmb tt_url(ct.contact)
  625. ?>&contact_class=<?lsmb tt_url(ct.class_id)
  626. ?>&description=<?lsmb tt_url(ct.description)
  627. ?>&action=edit&credit_id=<?lsmb
  628. tt_url(credit_id) ?>"
  629. >[<?lsmb text('Edit'); ?>]</a>&nbsp;&nbsp;
  630. <a href="<?lsmb tt_url(script)
  631. ?>?entity_id=<?lsmb tt_url(entity_id)
  632. ?>&contact_id=<?lsmb tt_url(ct.id)
  633. ?>&action=delete_contact&credit_id=<?lsmb
  634. tt_url(credit_id) ?>"
  635. >[<?lsmb text('Delete'); ?>]</a>
  636. </td>
  637. </tr>
  638. <?lsmb END ?>
  639. </table>
  640. <form action="<?lsmb script ?>">
  641. <?lsmb PROCESS input element_data = {
  642. type="hidden"
  643. name="entity_id"
  644. value=entity_id
  645. } ?>
  646. <?lsmb PROCESS input element_data = {
  647. type="hidden"
  648. name="credit_id"
  649. value=credit_id
  650. } ?>
  651. <?lsmb PROCESS input element_data = {
  652. type="hidden"
  653. name="old_contact_class"
  654. value=contact_class
  655. } ?>
  656. <?lsmb PROCESS input element_data = {
  657. type="hidden"
  658. name="old_contact"
  659. value=contact
  660. } ?>
  661. <?lsmb PROCESS input element_data = {
  662. type="hidden"
  663. name="contact_id"
  664. value=contact_id
  665. } ?>
  666. <div>
  667. <?lsmb PROCESS select element_data = {
  668. name = "contact_class"
  669. label = "Type"
  670. text_attr = "class"
  671. value_attr = "id"
  672. default_values = [contact_class]
  673. options = contact_class_list
  674. } ?>
  675. </div>
  676. <div>
  677. <?lsmb PROCESS input element_data = {
  678. label = text('Description:'),
  679. name = "description"
  680. value = description
  681. type = "text"
  682. size = "20"
  683. } #' ?>
  684. </div>
  685. <div>
  686. <?lsmb PROCESS input element_data = {
  687. label = text('Contact Info:'),
  688. name = "contact"
  689. value = contact
  690. type = "text"
  691. size = "20"
  692. } #' ?>
  693. </div>
  694. <div><?lsmb PROCESS button element_data = {
  695. name = "action",
  696. value = "save_contact",
  697. text = text('Save Contact'),
  698. class = "submit"
  699. } #' ?>
  700. <?lsmb IF contact.defined ?>
  701. <?lsmb PROCESS button element_data = {
  702. name = "action",
  703. value = "save_contact_new",
  704. text = text('Save As New'),
  705. class = "submit"
  706. } #' ?>
  707. <?lsmb END # IF old_contact.defined ?>
  708. </div>
  709. </form>
  710. </div>
  711. <div class="container" id="bank_div">
  712. <div class="listtop"><?lsmb text('Bank Accounts') ?></div>
  713. <table width="100%">
  714. <tr class="listheading">
  715. <th class="bic"><?lsmb text('BIC/SWIFT Code') ?></th>
  716. <th class="iban"><?lsmb text('Account Number') ?></th>
  717. <th class="actions"><?lsmb text('Actions') ?></th>
  718. </tr>
  719. <?lsmb FOREACH ba = bank_account ?>
  720. <tr>
  721. <td class="bic"><?lsmb ba.bic ?></td>
  722. <td class="iban"><?lsmb ba.iban ?></td>
  723. <td class="actions">
  724. <a href="<?lsmb script ?>?action=edit_bank_acct&entity_id=<?lsmb
  725. entity_id ?>&bank_account_id=<?lsmb ba.id ?>"
  726. >[Edit]</a>
  727. <a href="<?lsmb script ?>?action=delete_bank_acct&entity_id=<?lsmb
  728. entity_id ?>&bank_account_id=<?lsmb ba.id ?>"
  729. >[Delete]</a>
  730. </td>
  731. </tr>
  732. <?lsmb END ?>
  733. </table>
  734. <form name="bank_acct" action="<?lsmb script ?>">
  735. <?lsmb PROCESS input element_data = {
  736. type="hidden"
  737. name="entity_id"
  738. value=entity_id
  739. } ?>
  740. <?lsmb PROCESS input element_data = {
  741. type="hidden"
  742. name="credit_id"
  743. value=credit_id
  744. } ?>
  745. <?lsmb PROCESS input element_data = {
  746. type="hidden"
  747. name="bank_account_id"
  748. value=bank_account_id
  749. } ?>
  750. <div><label for="bic">
  751. <?lsmb INCLUDE input element_data = {
  752. type="text"
  753. label = text('BIC/SWIFT Code:')
  754. name="bic"
  755. value=bic
  756. size=20
  757. } #' ?>
  758. </div>
  759. <div><label for="iban">
  760. <?lsmb PROCESS input element_data = {
  761. type="text"
  762. label = text('Bank Account:')
  763. name="iban"
  764. value=iban
  765. size=20
  766. } #' ?>
  767. </div>
  768. <div><?lsmb PROCESS button element_data = {
  769. name="action"
  770. value="save_bank_account"
  771. class="submit"
  772. text = text('Save')
  773. } ?>
  774. </div>
  775. </form>
  776. </div>
  777. <div id="notes_div">
  778. <div class="listtop"><?lsmb text('Notes') ?></div>
  779. <form action="<?lsmb script ?>" method="post">
  780. <?lsmb PROCESS input element_data = {
  781. type="hidden"
  782. name="entity_id"
  783. value=entity_id
  784. } ?>
  785. <?lsmb PROCESS input element_data = {
  786. type="hidden"
  787. name="credit_id"
  788. value=credit_id
  789. } ?>
  790. <?lsmb IF credit_id -?>
  791. <div class="input"><?lsmb PROCESS select element_data = {
  792. name = "note_class"
  793. default_values = [note_class]
  794. options = note_class_options
  795. label = text("Note Class") #"
  796. text_attr = "label"
  797. value_attr = "value"
  798. } ?>
  799. </div>
  800. <?lsmb END # IF credit_id -?>
  801. <div class="input"><?lsmb PROCESS textarea element_data = {
  802. label = text('Notes:<br />')
  803. name = 'note'
  804. } ?></div>
  805. <div class="input">
  806. <?lsmb PROCESS button element_data = {
  807. text = text('Save')
  808. class = 'submit'
  809. name = 'action'
  810. value = 'save_notes'
  811. } ?>
  812. </form>
  813. <?lsmb FOREACH n = notes ?>
  814. <div class="note">
  815. <div class="timestamp"><?lsmb text('Entered at: [_1]', n.created) ?></div>
  816. <div class="author"><?lsmb text("Author: [_1]", n.created_by) ?></div>
  817. <div class="note_contents"><?lsmb n.note ?></div>
  818. </div>
  819. <?lsmb END ?>
  820. </div>
  821. <?lsmb END ?>
  822. </body>
  823. </html>