aboutsummaryrefslogtreecommitdiffstats
path: root/apps/calendar/templates/part.eventform.php
diff options
context:
space:
mode:
authorTom Needham <needham.thomas@gmail.com>2011-11-29 22:11:42 +0000
committerTom Needham <needham.thomas@gmail.com>2011-11-29 22:11:42 +0000
commitdd7a411f9aaceab1bf8eab551e5f95ff5feff6fb (patch)
tree8c21a5aa4e397e9987389b65b82c2181e900d930 /apps/calendar/templates/part.eventform.php
parent88de9e40503833f76e79e8ac722025ceafd15c4b (diff)
downloadnextcloud-server-dd7a411f9aaceab1bf8eab551e5f95ff5feff6fb.tar.gz
nextcloud-server-dd7a411f9aaceab1bf8eab551e5f95ff5feff6fb.zip
Disable save button while saving. Streamlined code.
Diffstat (limited to 'apps/calendar/templates/part.eventform.php')
-rw-r--r--apps/calendar/templates/part.eventform.php12
1 files changed, 3 insertions, 9 deletions
diff --git a/apps/calendar/templates/part.eventform.php b/apps/calendar/templates/part.eventform.php
index 8588b9168f7..dfa5fb8c78a 100644
--- a/apps/calendar/templates/part.eventform.php
+++ b/apps/calendar/templates/part.eventform.php
@@ -13,9 +13,7 @@
<select id="category" name="categories[]" multiple="multiple" title="<?php echo $l->t("Select category") ?>">
<?php
if (!isset($_['categories'])) {$_['categories'] = array();}
- foreach($_['category_options'] as $category){
- echo '<option value="' . $category . '"' . (in_array($category, $_['categories']) ? ' selected="selected"' : '') . '>' . $category . '</option>';
- }
+ echo html_select_options($_['category_options'], $_['categories'], array('combine'=>true));
?>
</select></td>
<th width="75px">&nbsp;&nbsp;&nbsp;<?php echo $l->t("Calendar");?>:</th>
@@ -23,9 +21,7 @@
<select style="width:140px;" name="calendar">
<?php
if (!isset($_['calendar'])) {$_['calendar'] = false;}
- foreach($_['calendar_options'] as $calendar){
- echo '<option value="' . $calendar['id'] . '"' . ($_['calendar'] == $calendar['id'] ? ' selected="selected"' : '') . '>' . $calendar['displayname'] . '</option>';
- }
+ echo html_select_options($_['calendar_options'], $_['calendar'], array('value'=>'id', 'label'=>'displayname'));
?>
</select></td>
</tr>
@@ -66,9 +62,7 @@
<select name="repeat" style="width:350px;">
<?php
if (isset($_['repeat_options'])) {
- foreach($_['repeat_options'] as $id => $label){
- echo '<option value="' . $id . '"' . ($_['repeat'] == $id ? ' selected="selected"' : '') . '>' . $label . '</option>';
- }
+ echo html_select_options($_['repeat_options'], $_['repeat']);
}
?>
</select></td>