part.edit_name_dialog.php 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. $name = isset($_['name'])?$_['name']:'';
  3. //print_r($name);
  4. $id = isset($_['id'])?$_['id']:'';
  5. $addressbooks = isset($_['addressbooks'])?$_['addressbooks']:null;
  6. ?>
  7. <div id="edit_name_dialog" title="Edit name">
  8. <form>
  9. <fieldset>
  10. <dl class="form">
  11. <?php if(!is_null($addressbooks)) {
  12. if(count($_['addressbooks'])==1) {
  13. ?>
  14. <input type="hidden" id="aid" name="aid" value="<?php echo $_['addressbooks'][0]['id']; ?>">
  15. <?php } else { ?>
  16. <dt><label for="addressbook"><?php echo $l->t('Addressbook'); ?></label></dt>
  17. <dd>
  18. <select id="aid" name="aid" size="1">
  19. <?php echo OCP\html_select_options($_['addressbooks'], null, array('value'=>'id', 'label'=>'displayname')); ?>
  20. </select>
  21. </dd>
  22. <?php }} ?>
  23. <dt><label for="pre"><?php echo $l->t('Hon. prefixes'); ?></label></dt>
  24. <dd>
  25. <input name="pre" id="pre" value="<?php echo isset($name['value'][3]) ? $name['value'][3] : ''; ?>" type="text" list="prefixes" />
  26. <datalist id="prefixes">
  27. <option value="<?php echo $l->t('Miss'); ?>">
  28. <option value="<?php echo $l->t('Ms'); ?>">
  29. <option value="<?php echo $l->t('Mr'); ?>">
  30. <option value="<?php echo $l->t('Sir'); ?>">
  31. <option value="<?php echo $l->t('Mrs'); ?>">
  32. <option value="<?php echo $l->t('Dr'); ?>">
  33. </datalist>
  34. </dd>
  35. <dt><label for="giv"><?php echo $l->t('Given name'); ?></label></dt>
  36. <dd><input name="giv" id="giv" value="<?php echo isset($name['value'][1]) ? $name['value'][1] : ''; ?>" type="text" /></dd>
  37. <dt><label for="add"><?php echo $l->t('Additional names'); ?></label></dt>
  38. <dd><input name="add" id="add" value="<?php echo isset($name['value'][2]) ? $name['value'][2] : ''; ?>" type="text" /></dd>
  39. <dt><label for="fam"><?php echo $l->t('Family name'); ?></label></dt>
  40. <dd><input name="fam" id="fam" value="<?php echo isset($name['value'][0]) ? $name['value'][0] : ''; ?>" type="text" /></dd>
  41. <dt><label for="suf"><?php echo $l->t('Hon. suffixes'); ?></label></dt>
  42. <dd>
  43. <input name="suf" id="suf" value="<?php echo isset($name['value'][4]) ? $name['value'][4] : ''; ?>" type="text" list="suffixes" />
  44. <datalist id="suffixes">
  45. <option value="<?php echo $l->t('J.D.'); ?>">
  46. <option value="<?php echo $l->t('M.D.'); ?>">
  47. <option value="<?php echo $l->t('D.O.'); ?>">
  48. <option value="<?php echo $l->t('D.C.'); ?>">
  49. <option value="<?php echo $l->t('Ph.D.'); ?>">
  50. <option value="<?php echo $l->t('Esq.'); ?>">
  51. <option value="<?php echo $l->t('Jr.'); ?>">
  52. <option value="<?php echo $l->t('Sn.'); ?>">
  53. </datalist>
  54. </dd>
  55. </dl>
  56. </fieldset>
  57. </form>
  58. </div>