part.edit_address_dialog.php 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. $adr = isset($_['adr'])?$_['adr']:array();
  3. $id = $_['id'];
  4. $types = array();
  5. foreach(isset($adr['parameters']['TYPE'])?array($adr['parameters']['TYPE']):array() as $type) {
  6. $types[] = strtoupper($type);
  7. }
  8. ?>
  9. <div id="edit_address_dialog" title="<?php echo $l->t('Edit address'); ?>">
  10. <!-- ?php print_r($types); ? -->
  11. <fieldset id="address">
  12. <dl class="form">
  13. <dt>
  14. <label class="label" for="adr_type"><?php echo $l->t('Type'); ?></label>
  15. </dt>
  16. <dd>
  17. <select id="adr_type" name="parameters[ADR][TYPE]" size="1">
  18. <?php echo OCP\html_select_options($_['adr_types'], $types) ?>
  19. </select>
  20. </dd>
  21. <dt>
  22. <label class="label" for="adr_pobox"><?php echo $l->t('PO Box'); ?></label>
  23. </dt>
  24. <dd>
  25. <input type="text" id="adr_pobox" name="value[ADR][0]" placeholder="<?php echo $l->t('PO Box'); ?>" value="<?php echo isset($adr['value'][0])?$adr['value'][0]:''; ?>">
  26. </dd>
  27. <dd>
  28. <dt>
  29. <label class="label" for="adr_extended"><?php echo $l->t('Extended'); ?></label>
  30. </dt>
  31. <dd>
  32. <input type="text" id="adr_extended" name="value[ADR][1]" placeholder="<?php echo $l->t('Extended'); ?>" value="<?php echo isset($adr['value'][1])?$adr['value'][1]:''; ?>">
  33. </dd>
  34. <dt>
  35. <label class="label" for="adr_street"><?php echo $l->t('Street'); ?></label>
  36. </dt>
  37. <dd>
  38. <input type="text" id="adr_street" name="value[ADR][2]" placeholder="<?php echo $l->t('Street'); ?>" value="<?php echo isset($adr['value'][2])?$adr['value'][2]:''; ?>">
  39. </dd>
  40. <dt>
  41. <label class="label" for="adr_city"><?php echo $l->t('City'); ?></label>
  42. </dt>
  43. <dd>
  44. <input type="text" id="adr_city" name="value[ADR][3]" placeholder="<?php echo $l->t('City'); ?>" value="<?php echo isset($adr['value'][3])?$adr['value'][3]:''; ?>">
  45. </dd>
  46. <dt>
  47. <label class="label" for="adr_region"><?php echo $l->t('Region'); ?></label>
  48. </dt>
  49. <dd>
  50. <input type="text" id="adr_region" name="value[ADR][4]" placeholder="<?php echo $l->t('Region'); ?>" value="<?php echo isset($adr['value'][4])?$adr['value'][4]:''; ?>">
  51. </dd>
  52. <dt>
  53. <label class="label" for="adr_zipcode"><?php echo $l->t('Zipcode'); ?></label>
  54. </dt>
  55. <dd>
  56. <input type="text" id="adr_zipcode" name="value[ADR][5]" placeholder="<?php echo $l->t('Zipcode'); ?>" value="<?php echo isset($adr['value'][5])?$adr['value'][5]:''; ?>">
  57. </dd>
  58. <dt>
  59. <label class="label" for="adr_country"><?php echo $l->t('Country'); ?></label>
  60. </dt>
  61. <dd>
  62. <input type="text" id="adr_country" name="value[ADR][6]" placeholder="<?php echo $l->t('Country'); ?>" value="<?php echo isset($adr['value'][6])?$adr['value'][6]:''; ?>">
  63. </dd>
  64. </dl>
  65. </fieldset>
  66. </form>
  67. </div>