part.eventform.php 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. <script type="text/javascript">
  2. <?php
  3. echo 'Calendar.UI.Share.idtype = "event";' . "\n" . 'Calendar.UI.Share.currentid = "' . $_['eventid'] . '";';
  4. ?>
  5. </script>
  6. <ul>
  7. <li><a href="#tabs-1"><?php echo $l->t('Eventinfo'); ?></a></li>
  8. <li><a href="#tabs-2"><?php echo $l->t('Repeating'); ?></a></li>
  9. <!--<li><a href="#tabs-3"><?php echo $l->t('Alarm'); ?></a></li>
  10. <li><a href="#tabs-4"><?php echo $l->t('Attendees'); ?></a></li>-->
  11. <?php if($_['access'] == 'owner' && $_['eventid'] != 'new') { ?>
  12. <li><a href="#tabs-5"><?php echo $l->t('Share'); ?></a></li>
  13. <?php } ?>
  14. </ul>
  15. <div id="tabs-1">
  16. <table width="100%">
  17. <tr>
  18. <th width="75px"><?php echo $l->t("Title");?>:</th>
  19. <td>
  20. <input type="text" style="width:350px;" size="100" placeholder="<?php echo $l->t("Title of the Event");?>" value="<?php echo isset($_['title']) ? htmlspecialchars($_['title']) : '' ?>" maxlength="100" name="title"/>
  21. </td>
  22. </tr>
  23. </table>
  24. <table width="100%">
  25. <tr>
  26. <th width="75px"><?php echo $l->t("Category");?>:</th>
  27. <td>
  28. <input id="category" name="categories" type="text" placeholder="<?php echo $l->t('Separate categories with commas'); ?>" value="<?php echo isset($_['categories']) ? htmlspecialchars($_['categories']) : '' ?>">
  29. <a class="action edit" onclick="$(this).tipsy('hide');OCCategories.edit();" title="<?php echo $l->t('Edit categories'); ?>"><img alt="<?php echo $l->t('Edit categories'); ?>" src="<?php echo OCP\image_path('core','actions/rename.svg')?>" class="svg action" style="width: 16px; height: 16px;"></a>
  30. </td>
  31. <?php if(count($_['calendar_options']) > 1) { ?>
  32. <th width="75px">&nbsp;&nbsp;&nbsp;<?php echo $l->t("Calendar");?>:</th>
  33. <td>
  34. <select style="width:140px;" name="calendar">
  35. <?php
  36. if (!isset($_['calendar'])) {$_['calendar'] = false;}
  37. echo OCP\html_select_options($_['calendar_options'], $_['calendar'], array('value'=>'id', 'label'=>'displayname'));
  38. ?>
  39. </select>
  40. </td>
  41. <?php } else { ?>
  42. <th width="75px">&nbsp;</th>
  43. <td>
  44. <input type="hidden" name="calendar" value="<?php echo $_['calendar_options'][0]['id']; ?>">
  45. </td>
  46. <?php } ?>
  47. </tr>
  48. </table>
  49. <hr>
  50. <table width="100%">
  51. <tr>
  52. <th width="75px"></th>
  53. <td>
  54. <input onclick="Calendar.UI.lockTime();" type="checkbox"<?php if($_['allday']){echo 'checked="checked"';} ?> id="allday_checkbox" name="allday">
  55. <label for="allday_checkbox"><?php echo $l->t("All Day Event");?></label>
  56. </td>
  57. </tr>
  58. <tr>
  59. <th width="75px"><?php echo $l->t("From");?>:</th>
  60. <td>
  61. <input type="text" value="<?php echo $_['startdate'];?>" name="from" id="from">
  62. &nbsp;&nbsp;
  63. <input type="time" value="<?php echo $_['starttime'];?>" name="fromtime" id="fromtime">
  64. </td>
  65. </tr>
  66. <tr>
  67. <th width="75px"><?php echo $l->t("To");?>:</th>
  68. <td>
  69. <input type="text" value="<?php echo $_['enddate'];?>" name="to" id="to">
  70. &nbsp;&nbsp;
  71. <input type="time" value="<?php echo $_['endtime'];?>" name="totime" id="totime">
  72. </td>
  73. </tr>
  74. </table>
  75. <input type="button" class="submit" value="<?php echo $l->t("Advanced options"); ?>" onclick="Calendar.UI.showadvancedoptions();" id="advanced_options_button">
  76. <div id="advanced_options" style="display: none;">
  77. <hr>
  78. <table>
  79. <tr>
  80. <th width="85px"><?php echo $l->t("Location");?>:</th>
  81. <td>
  82. <input type="text" style="width:350px;" size="100" placeholder="<?php echo $l->t("Location of the Event");?>" value="<?php echo isset($_['location']) ? htmlspecialchars($_['location']) : '' ?>" maxlength="100" name="location" />
  83. </td>
  84. </tr>
  85. </table>
  86. <table>
  87. <tr>
  88. <th width="85px" style="vertical-align: top;"><?php echo $l->t("Description");?>:</th>
  89. <td>
  90. <textarea style="width:350px;height: 150px;" placeholder="<?php echo $l->t("Description of the Event");?>" name="description"><?php echo isset($_['description']) ? htmlspecialchars($_['description']) : '' ?></textarea>
  91. </td>
  92. </tr>
  93. </table>
  94. </div>
  95. </div>
  96. <div id="tabs-2">
  97. <table style="width:100%">
  98. <tr>
  99. <th width="75px"><?php echo $l->t("Repeat");?>:</th>
  100. <td>
  101. <select id="repeat" name="repeat">
  102. <?php
  103. echo OCP\html_select_options($_['repeat_options'], $_['repeat']);
  104. ?>
  105. </select></td>
  106. <td><input type="button" style="float:right;" class="submit" value="<?php echo $l->t("Advanced"); ?>" onclick="Calendar.UI.showadvancedoptionsforrepeating();" id="advanced_options_button"></td>
  107. </tr>
  108. </table>
  109. <div id="advanced_options_repeating" style="display:none;">
  110. <table style="width:100%">
  111. <tr id="advanced_month" style="display:none;">
  112. <th width="75px"></th>
  113. <td>
  114. <select id="advanced_month_select" name="advanced_month_select">
  115. <?php
  116. echo OCP\html_select_options($_['repeat_month_options'], $_['repeat_month']);
  117. ?>
  118. </select>
  119. </td>
  120. </tr>
  121. </table>
  122. <table style="width:100%">
  123. <tr id="advanced_year" style="display:none;">
  124. <th width="75px"></th>
  125. <td>
  126. <select id="advanced_year_select" name="advanced_year_select">
  127. <?php
  128. echo OCP\html_select_options($_['repeat_year_options'], $_['repeat_year']);
  129. ?>
  130. </select>
  131. </td>
  132. </tr>
  133. </table>
  134. <table style="width:100%">
  135. <tr id="advanced_weekofmonth" style="display:none;">
  136. <th width="75px"></th>
  137. <td id="weekofmonthcheckbox">
  138. <select id="weekofmonthoptions" name="weekofmonthoptions">
  139. <?php
  140. echo OCP\html_select_options($_['repeat_weekofmonth_options'], $_['repeat_weekofmonth']);
  141. ?>
  142. </select>
  143. </td>
  144. </tr>
  145. </table>
  146. <table style="width:100%">
  147. <tr id="advanced_weekday" style="display:none;">
  148. <th width="75px"></th>
  149. <td id="weeklycheckbox">
  150. <select id="weeklyoptions" name="weeklyoptions[]" multiple="multiple" style="width: 150px;" title="<?php echo $l->t("Select weekdays") ?>">
  151. <?php
  152. if (!isset($_['weekdays'])) {$_['weekdays'] = array();}
  153. echo OCP\html_select_options($_['repeat_weekly_options'], $_['repeat_weekdays'], array('combine'=>true));
  154. ?>
  155. </select>
  156. </td>
  157. </tr>
  158. </table>
  159. <table style="width:100%">
  160. <tr id="advanced_byyearday" style="display:none;">
  161. <th width="75px"></th>
  162. <td id="byyeardaycheckbox">
  163. <select id="byyearday" name="byyearday[]" multiple="multiple" title="<?php echo $l->t("Select days") ?>">
  164. <?php
  165. if (!isset($_['repeat_byyearday'])) {$_['repeat_byyearday'] = array();}
  166. echo OCP\html_select_options($_['repeat_byyearday_options'], $_['repeat_byyearday'], array('combine'=>true));
  167. ?>
  168. </select><?php echo $l->t('and the events day of year.'); ?>
  169. </td>
  170. </tr>
  171. </table>
  172. <table style="width:100%">
  173. <tr id="advanced_bymonthday" style="display:none;">
  174. <th width="75px"></th>
  175. <td id="bymonthdaycheckbox">
  176. <select id="bymonthday" name="bymonthday[]" multiple="multiple" title="<?php echo $l->t("Select days") ?>">
  177. <?php
  178. if (!isset($_['repeat_bymonthday'])) {$_['repeat_bymonthday'] = array();}
  179. echo OCP\html_select_options($_['repeat_bymonthday_options'], $_['repeat_bymonthday'], array('combine'=>true));
  180. ?>
  181. </select><?php echo $l->t('and the events day of month.'); ?>
  182. </td>
  183. </tr>
  184. </table>
  185. <table style="width:100%">
  186. <tr id="advanced_bymonth" style="display:none;">
  187. <th width="75px"></th>
  188. <td id="bymonthcheckbox">
  189. <select id="bymonth" name="bymonth[]" multiple="multiple" title="<?php echo $l->t("Select months") ?>">
  190. <?php
  191. if (!isset($_['repeat_bymonth'])) {$_['repeat_bymonth'] = array();}
  192. echo OCP\html_select_options($_['repeat_bymonth_options'], $_['repeat_bymonth'], array('combine'=>true));
  193. ?>
  194. </select>
  195. </td>
  196. </tr>
  197. </table>
  198. <table style="width:100%">
  199. <tr id="advanced_byweekno" style="display:none;">
  200. <th width="75px"></th>
  201. <td id="bymonthcheckbox">
  202. <select id="byweekno" name="byweekno[]" multiple="multiple" title="<?php echo $l->t("Select weeks") ?>">
  203. <?php
  204. if (!isset($_['repeat_byweekno'])) {$_['repeat_byweekno'] = array();}
  205. echo OCP\html_select_options($_['repeat_byweekno_options'], $_['repeat_byweekno'], array('combine'=>true));
  206. ?>
  207. </select><?php echo $l->t('and the events week of year.'); ?>
  208. </td>
  209. </tr>
  210. </table>
  211. <table style="width:100%">
  212. <tr>
  213. <th width="75px"><?php echo $l->t('Interval'); ?>:</th>
  214. <td>
  215. <input style="width:350px;" type="number" min="1" size="4" max="1000" value="<?php echo isset($_['repeat_interval']) ? $_['repeat_interval'] : '1'; ?>" name="interval">
  216. </td>
  217. </tr>
  218. <tr>
  219. <th width="75px"><?php echo $l->t('End'); ?>:</th>
  220. <td>
  221. <select id="end" name="end">
  222. <?php
  223. if($_['repeat_end'] == '') $_['repeat_end'] = 'never';
  224. echo OCP\html_select_options($_['repeat_end_options'], $_['repeat_end']);
  225. ?>
  226. </select>
  227. </td>
  228. </tr>
  229. <tr>
  230. <th></th>
  231. <td id="byoccurrences" style="display:none;">
  232. <input type="number" min="1" max="99999" id="until_count" name="byoccurrences" value="<?php echo $_['repeat_count']; ?>"><?php echo $l->t('occurrences'); ?>
  233. </td>
  234. </tr>
  235. <tr>
  236. <th></th>
  237. <td id="bydate" style="display:none;">
  238. <input type="text" name="bydate" value="<?php echo $_['repeat_date']; ?>">
  239. </td>
  240. </tr>
  241. </table>
  242. </div>
  243. </div>
  244. <!--<div id="tabs-3">//Alarm</div>
  245. <div id="tabs-4">//Attendees</div>-->
  246. <?php if($_['access'] == 'owner') { ?>
  247. <div id="tabs-5">
  248. <?php if($_['eventid'] != 'new'){ echo $this->inc('share.dropdown'); } ?>
  249. </div>
  250. <?php } ?>