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