PageRenderTime 56ms CodeModel.GetById 28ms RepoModel.GetById 1ms app.codeStats 0ms

/htdocs/societe/canvas/individual/tpl/card_create.tpl.php

https://bitbucket.org/speedealing/speedealing
PHP | 180 lines | 135 code | 28 blank | 17 comment | 10 complexity | 35733ca5745f0d633aa8b69b091ad21f MD5 | raw file
Possible License(s): LGPL-3.0, LGPL-2.1, GPL-3.0, MIT
  1. <?php
  2. /* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@capnetworks.com>
  3. * Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. *
  18. */
  19. ?>
  20. <!-- BEGIN PHP TEMPLATE CARD_CREATE.TPL.PHP INDIVIDUAL -->
  21. <?php echo $this->control->tpl['title']; ?>
  22. <?php echo $this->control->tpl['error']; ?>
  23. <?php if ($conf->use_javascript_ajax) { ?>
  24. <?php echo $this->control->tpl['ajax_selecttype']; ?>
  25. <br>
  26. <?php echo $langs->trans("ThirdPartyType") ?>: &nbsp;
  27. <input type="radio" id="radiocompany" class="flat" name="private" value="0">
  28. <?php echo $langs->trans("Company/Fundation"); ?> &nbsp; &nbsp;
  29. <input type="radio" id="radioprivate" class="flat" name="private" value="1" checked="checked"> <?php echo $langs->trans("Individual"); ?> (<?php echo $langs->trans("ToCreateContactWithSameName") ?>)
  30. <br>
  31. <br>
  32. <?php echo $this->control->tpl['ajax_selectcountry']; ?>
  33. <?php } ?>
  34. <form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="POST" name="formsoc">
  35. <input type="hidden" name="action" value="add">
  36. <input type="hidden" name="canvas" value="<?php echo $canvas ?>">
  37. <input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>">
  38. <input type="hidden" name="private" value="<?php echo $this->control->tpl['particulier']; ?>">
  39. <?php if ($this->control->tpl['auto_customercode'] || $this->control->tpl['auto_suppliercode']) { ?>
  40. <input type="hidden" name="code_auto" value="1">
  41. <?php } ?>
  42. <table class="border allwidth">
  43. <tr>
  44. <td><span class="fieldrequired"><?php echo $langs->trans('LastName'); ?></span></td>
  45. <td><input type="text" size="30" maxlength="60" name="nom" value="<?php echo $this->control->tpl['nom']; ?>"></td>
  46. <?php if (! empty($conf->global->SOCIETE_USEPREFIX)) { ?>
  47. <td><?php echo $langs->trans('Prefix'); ?></td>
  48. <td><input type="text" size="5" maxlength="5" name="prefix_comm" value="<?php echo $this->control->tpl['prefix_comm']; ?>"></td>
  49. <?php } ?>
  50. </tr>
  51. <tr>
  52. <td><?php echo $langs->trans('FirstName'); ?></td>
  53. <td><input type="text" size="30" name="prenom" value="<?php echo $this->control->tpl['firstname']; ?>"></td>
  54. <td colspan="2">&nbsp;</td>
  55. </tr>
  56. <tr>
  57. <td><?php echo $langs->trans("UserTitle"); ?></td>
  58. <td><?php echo $this->control->tpl['select_civility']; ?></td>
  59. <td colspan="2">&nbsp;</td>
  60. </tr>
  61. <tr>
  62. <td width="25%"><span class="fieldrequired"><?php echo $langs->trans('ProspectCustomer'); ?></span></td>
  63. <td width="25%"><?php echo $this->control->tpl['select_customertype']; ?></td>
  64. <td width="25%"><?php echo $langs->trans('CustomerCode'); ?></td>
  65. <td width="25%">
  66. <table class="nobordernopadding">
  67. <tr>
  68. <td><input type="text" name="code_client" size="16" value="<?php echo $this->control->tpl['customercode']; ?>" maxlength="15"></td>
  69. <td><?php echo $this->control->tpl['help_customercode']; ?></td>
  70. </tr>
  71. </table>
  72. </td>
  73. </tr>
  74. <?php if ($this->control->tpl['supplier_enabled']) { ?>
  75. <tr>
  76. <td><span class="fieldrequired"><?php echo $langs->trans('Supplier'); ?></span></td>
  77. <td><?php echo $this->control->tpl['yn_supplier']; ?></td>
  78. <td><?php echo $langs->trans('SupplierCode'); ?></td>
  79. <td>
  80. <table class="nobordernopadding">
  81. <tr>
  82. <td><input type="text" name="code_fournisseur" size="16" value="<?php echo $this->control->tpl['suppliercode']; ?>" maxlength="15"></td>
  83. <td><?php echo $this->control->tpl['help_suppliercode']; ?></td>
  84. </tr>
  85. </table>
  86. </td>
  87. </tr>
  88. <?php if (count($this->control->tpl['suppliercategory']) > 0) { ?>
  89. <tr>
  90. <td><?php echo $langs->trans('SupplierCategory'); ?></td>
  91. <td colspan="3"><?php echo $this->control->tpl['select_suppliercategory']; ?></td>
  92. </tr>
  93. <?php } }?>
  94. <?php if (! empty($conf->barcode->enabled)) { ?>
  95. <tr>
  96. <td><?php echo $langs->trans('Gencod'); ?></td>
  97. <td colspan="3"><input type="text" name="barcode" value="<?php echo $this->control->tpl['barcode']; ?>"></td>
  98. </tr>
  99. <?php } ?>
  100. <tr>
  101. <td valign="top"><?php echo $langs->trans('Address'); ?></td>
  102. <td colspan="3"><textarea name="adresse" cols="40" rows="3"><?php echo $this->control->tpl['address']; ?></textarea></td>
  103. </tr>
  104. <tr>
  105. <td><?php echo $langs->trans('Zip'); ?></td>
  106. <td><input size="6" type="text" name="cp" value="<?php echo $this->control->tpl['cp']; ?>"><?php echo $this->control->tpl['autofilltownfromzip']; ?></td>
  107. <td><?php echo $langs->trans('Town'); ?></td>
  108. <td><input type="text" name="ville" value="<?php echo $this->control->tpl['ville']; ?>"></td>
  109. </tr>
  110. <tr>
  111. <td width="25%"><?php echo $langs->trans('Country'); ?></td>
  112. <td colspan="3"><?php echo $this->control->tpl['select_country']; echo $this->control->tpl['info_admin']; ?></td>
  113. </tr>
  114. <tr>
  115. <td><?php echo $langs->trans('State'); ?></td>
  116. <td colspan="3"><?php echo $this->control->tpl['select_state']; ?></td>
  117. </tr>
  118. <tr>
  119. <td><?php echo $langs->trans('Phone'); ?></td>
  120. <td><input type="text" name="tel" value="<?php echo $this->control->tpl['tel']; ?>"></td>
  121. <td><?php echo $langs->trans('Fax'); ?></td>
  122. <td><input type="text" name="fax" value="<?php echo $this->control->tpl['fax']; ?>"></td>
  123. </tr>
  124. <tr>
  125. <td><?php echo $langs->trans('EMail').($conf->global->SOCIETE_MAIL_REQUIRED?'*':''); ?></td>
  126. <td><input type="text" name="email" size="32" value="<?php echo $this->control->tpl['email']; ?>"></td>
  127. <td><?php echo $langs->trans('Web'); ?></td>
  128. <td><input type="text" name="url" size="32" value="<?php echo $this->control->tpl['url']; ?>"></td>
  129. </tr>
  130. <?php if (! empty($conf->global->MAIN_MULTILANGS)) { ?>
  131. <tr>
  132. <td><?php echo $langs->trans("DefaultLang"); ?></td>
  133. <td colspan="3"><?php echo $this->control->tpl['select_lang']; ?></td>
  134. </tr>
  135. <?php } ?>
  136. <tr>
  137. <td><?php echo $langs->trans('VATIsUsed'); ?></td>
  138. <td colspan="3"><?php echo $this->control->tpl['yn_assujtva']; ?></td>
  139. </tr>
  140. <?php if(!empty($this->control->tpl['localtax'])) echo $this->control->tpl['localtax']; ?>
  141. <?php if ($user->rights->societe->client->voir) { ?>
  142. <tr>
  143. <td><?php echo $langs->trans("AllocateCommercial"); ?></td>
  144. <td colspan="3"><?php echo $this->control->tpl['select_users']; ?></td>
  145. </tr>
  146. <?php } ?>
  147. <tr>
  148. <td colspan="4" align="center"><input type="submit" class="button" value="<?php echo $langs->trans('AddThirdParty'); ?>"></td>
  149. </tr>
  150. </table>
  151. </form>
  152. <!-- END PHP TEMPLATE -->