diff options
author | Georg Ehrke <dev@georgswebsite.de> | 2012-07-03 13:43:18 +0200 |
---|---|---|
committer | Georg Ehrke <dev@georgswebsite.de> | 2012-07-03 13:43:18 +0200 |
commit | 29a9559fa9df7f08947dabbba270bd97c3419d54 (patch) | |
tree | 74f7504e4b808d30eff24ffc8ede1bdd81bc1f97 /apps/calendar/templates | |
parent | e89a0949c45972aa45b8eed02b498f8487685330 (diff) | |
download | nextcloud-server-29a9559fa9df7f08947dabbba270bd97c3419d54.tar.gz nextcloud-server-29a9559fa9df7f08947dabbba270bd97c3419d54.zip |
some work on calendar import dialog
Diffstat (limited to 'apps/calendar/templates')
-rw-r--r-- | apps/calendar/templates/part.import.php | 58 |
1 files changed, 30 insertions, 28 deletions
diff --git a/apps/calendar/templates/part.import.php b/apps/calendar/templates/part.import.php index 2a3ca9dae92..c7156c79d75 100644 --- a/apps/calendar/templates/part.import.php +++ b/apps/calendar/templates/part.import.php @@ -7,37 +7,39 @@ if(!$file){ $import = new OC_Calendar_Import($file); $newcalendarname = strip_tags($import->createCalendarName()); $guessedcalendarname = $import->guessCalendarName(); -?> -<div id="calendar_import_dialog" title="<?php echo $l->t("Import a calendar file");?>"> -<div id="form_container"> -<input type="hidden" id="filename" value="<?php echo $_['filename'];?>"> -<input type="hidden" id="path" value="<?php echo $_['path'];?>"> -<input type="hidden" id="progresskey" value="<?php echo rand() ?>"> -<p style="text-align:center;"><b><?php echo $l->t('Please choose a calendar'); ?></b></p> -<select style="width:100%;" id="calendar" name="calendar"> -<?php +//loading calendars for select box $calendar_options = OC_Calendar_Calendar::allCalendars(OCP\USER::getUser()); $calendar_options[] = array('id'=>'newcal', 'displayname'=>$l->t('create a new calendar')); -for($i = 0;$i<count($calendar_options);$i++){ - $calendar_options[$i]['displayname'] = $calendar_options[$i]['displayname']; -} -echo OCP\html_select_options($calendar_options, $calendar_options[0]['id'], array('value'=>'id', 'label'=>'displayname')); ?> -</select> -<div id="newcalform" style="display: none;"> - <input type="text" style="width: 97%;" placeholder="<?php echo $l->t('Name of new calendar'); ?>" id="newcalendar" name="newcalendar" value="<?php echo $newcalendarname ?>"> -</div> -<div id="namealreadyused" style="display: none;text-align:center;"> - <span class="hint"><?php echo $l->t('A Calendar with this name already exists. If you continue anyhow, these calendars will be merged.'); ?></span> -</div> -<input type="button" value="<?php echo $l->t("Import") . ' ' . $_['filename']; ?>!" id="startimport"> -</div> -<div id="progressbar_container" style="display: none"> -<p style="text-align:center;"><b><?php echo $l->t('Importing calendar'); ?></b></p> -<div id="progressbar"></div> -<div id="import_done" style="display: none;"> -<p style="text-align:center;"><b><?php echo $l->t('Calendar imported successfully'); ?></b></p> -<input type="button" value="<?php echo $l->t('Close Dialog'); ?>" id="import_done_button"> +<div id="calendar_import_dialog" title="<?php echo $l->t("Import a calendar file");?>"> +<div id="calendar_import_form"> + <form> + <input type="hidden" id="calendar_import_filename" value="<?php echo $_['filename'];?>"> + <input type="hidden" id="calendar_import_path" value="<?php echo $_['path'];?>"> + <input type="hidden" id="calendar_import_progresskey" value="<?php echo rand() ?>"> + <span id="calendar_import_form_message"><?php echo $l->t('Please choose a calendar'); ?></span> + <select style="width:100%;" id="calendar_import_calendar" name="calendar_import_calendar"> + <?php + for($i = 0;$i<count($calendar_options);$i++){ + $calendar_options[$i]['displayname'] = $calendar_options[$i]['displayname']; + } + echo OCP\html_select_options($calendar_options, $calendar_options[0]['id'], array('value'=>'id', 'label'=>'displayname')); + ?> + </select> + <div id="calendar_import_newcalform"> + <input id="calendar_import_newcalendar" type="text" placeholder="<?php echo $l->t('Name of new calendar'); ?>" value="<?php echo $newcalendarname ?>"><br> + <!--<input id="calendar_import_generatename" type="button" class="button" value="<?php echo $l->t('Take an available name!'); ?>"><br>--> + <span id="calendar_import_mergewarning" class="hint"><?php echo $l->t('A Calendar with this name already exists. If you continue anyhow, these calendars will be merged.'); ?></span> + </div> + <input id="calendar_import_submit" type="button" class="button" value="» <?php echo $l->t('Import'); ?> »" id="startimport"> + <form> </div> +<div id="calendar_import_process"> + <span id="calendar_import_process_message"></span> + <div id="calendar_import_progressbar"></div> + <br> + <div id="calendar_import_status" class="hint"></div> + <br> + <input id="calendar_import_done" type="button" value="<?php echo $l->t('Close Dialog'); ?>"> </div> </div>
\ No newline at end of file |