From 61aa00899d33a3b9706cf321555405fedf044775 Mon Sep 17 00:00:00 2001 From: Georg Ehrke <georg.stefan.germany@googlemail.com> Date: Tue, 27 Sep 2011 21:56:16 +0200 Subject: [PATCH] show only most essential stuff in add and edit event form --- apps/calendar/js/calendar.js | 4 ++++ apps/calendar/templates/part.eventform.php | 24 ++++++++++++++-------- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/apps/calendar/js/calendar.js b/apps/calendar/js/calendar.js index f8d1c8e650..1b34545291 100644 --- a/apps/calendar/js/calendar.js +++ b/apps/calendar/js/calendar.js @@ -352,6 +352,10 @@ Calendar={ } },"json"); }, + showadvancedoptions:function(){ + $("#advanced_options").css("display", "block"); + $("#advanced_options_button").css("display", "none"); + }, createEventPopup:function(e){ var popup = $(this).data('popup'); if (!popup){ diff --git a/apps/calendar/templates/part.eventform.php b/apps/calendar/templates/part.eventform.php index 5bb072cc23..4c34b3e1fc 100644 --- a/apps/calendar/templates/part.eventform.php +++ b/apps/calendar/templates/part.eventform.php @@ -5,12 +5,6 @@ <input type="text" style="width:350px;" size="100" placeholder="<?php echo $l->t("Title of the Event");?>" value="<?php echo isset($_['title']) ? $_['title'] : '' ?>" maxlength="100" name="title"/> </td> </tr> - <tr> - <th width="75px"><?php echo $l->t("Location");?>:</th> - <td> - <input type="text" style="width:350px;" size="100" placeholder="<?php echo $l->t("Location of the Event");?>" value="<?php echo isset($_['location']) ? $_['location'] : '' ?>" maxlength="100" name="location" /> - </td> - </tr> </table> <table> <tr> @@ -60,7 +54,12 @@ <input type="time" value="<?php echo $_['endtime'];?>" name="totime" id="totime"> </td><!--use jquery--> - </tr><!-- + </tr> + </table> + <input type="button" class="submit" value="<?php echo $l->t("Advanced options"); ?>" onclick="Calendar.UI.showadvancedoptions();" id="advanced_options_button"> + <div id="advanced_options" style="display: none;"> + <!-- + <table> <tr> <th width="75px"><?php echo $l->t("Repeat");?>:</th> <td> @@ -85,7 +84,16 @@ <hr>--> <table> <tr> - <th width="75px" style="vertical-align: top;"><?php echo $l->t("Description");?>:</th> + <th width="85px"><?php echo $l->t("Location");?>:</th> + <td> + <input type="text" style="width:350px;" size="100" placeholder="<?php echo $l->t("Location of the Event");?>" value="<?php echo isset($_['location']) ? $_['location'] : '' ?>" maxlength="100" name="location" /> + </td> + </tr> + </table> + <table> + <tr> + <th width="85px" style="vertical-align: top;"><?php echo $l->t("Description");?>:</th> <td><textarea style="width:350px;height: 150px;" placeholder="<?php echo $l->t("Description of the Event");?>" name="description"><?php echo isset($_['description']) ? $_['description'] : '' ?></textarea></td> </tr> </table> + </div> -- GitLab