part.editcalendar.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * Copyright (c) 2011 Bart Visscher <bartv@thisnet.nl>
  4. * This file is licensed under the Affero General Public License version 3 or
  5. * later.
  6. * See the COPYING-README file.
  7. */
  8. ?>
  9. <td id="<?php echo $_['new'] ? 'new' : 'edit' ?>calendar_dialog" title="<?php echo $_['new'] ? $l->t("New calendar") : $l->t("Edit calendar"); ?>" colspan="6">
  10. <table width="100%" style="border: 0;">
  11. <tr>
  12. <th><?php echo $l->t('Displayname') ?></th>
  13. <td>
  14. <input id="displayname_<?php echo $_['calendar']['id'] ?>" type="text" value="<?php echo $_['calendar']['displayname'] ?>">
  15. </td>
  16. </tr>
  17. <?php if (!$_['new']): ?>
  18. <tr>
  19. <td></td>
  20. <td>
  21. <input id="edit_active_<?php echo $_['calendar']['id'] ?>" type="checkbox"<?php echo $_['calendar']['active'] ? ' checked="checked"' : '' ?>>
  22. <label for="edit_active_<?php echo $_['calendar']['id'] ?>">
  23. <?php echo $l->t('Active') ?>
  24. </label>
  25. </td>
  26. </tr>
  27. <?php endif; ?>
  28. <tr>
  29. <th><?php echo $l->t('Calendar color') ?></th>
  30. <td>
  31. <select id="calendarcolor_<?php echo $_['calendar']['id'] ?>" class="colorpicker">
  32. <?php
  33. if (!isset($_['calendar']['calendarcolor'])) {$_['calendar']['calendarcolor'] = false;}
  34. foreach($_['calendarcolor_options'] as $color){
  35. echo '<option value="' . $color . '"' . ($_['calendar']['calendarcolor'] == $color ? ' selected="selected"' : '') . '>' . $color . '</option>';
  36. }
  37. ?>
  38. </select>
  39. </td>
  40. </tr>
  41. </table>
  42. <input style="float: left;" type="button" onclick="Calendar.UI.Calendar.submit(this, <?php echo $_['new'] ? "'new'" : $_['calendar']['id'] ?>);" value="<?php echo $_['new'] ? $l->t("Save") : $l->t("Submit"); ?>">
  43. <input style="float: left;" type="button" onclick="Calendar.UI.Calendar.cancel(this, <?php echo $_['new'] ? "'new'" : $_['calendar']['id'] ?>);" value="<?php echo $l->t("Cancel"); ?>">
  44. </td>