part.import.php 1.6 KB

123456789101112131415161718192021222324252627282930
  1. <div id="calendar_import_dialog" title="<?php echo $l->t("Import a calendar file"); ?>">
  2. <div id="form_container">
  3. <input type="hidden" id="filename" value="<?php echo $_['filename'];?>">
  4. <input type="hidden" id="path" value="<?php echo $_['path'];?>">
  5. <input type="hidden" id="progresskey" value="<?php echo rand() ?>">
  6. <p style="text-align:center;"><b><?php echo $l->t('Please choose the calendar'); ?></b></p>
  7. <select style="width:100%;" id="calendar" name="calendar">
  8. <?php
  9. $calendar_options = OC_Calendar_Calendar::allCalendars(OCP\USER::getUser());
  10. $calendar_options[] = array('id'=>'newcal', 'displayname'=>$l->t('create a new calendar'));
  11. for($i = 0;$i<count($calendar_options);$i++){
  12. $calendar_options[$i]['displayname'] = $calendar_options[$i]['displayname'];
  13. }
  14. echo OCP\html_select_options($calendar_options, $calendar_options[0]['id'], array('value'=>'id', 'label'=>'displayname'));
  15. ?>
  16. </select>
  17. <div id="newcalform" style="display: none;">
  18. <input type="text" style="width: 97%;" placeholder="<?php echo $l->t('Name of new calendar'); ?>" id="newcalendar" name="newcalendar">
  19. </div>
  20. <input type="button" value="<?php echo $l->t("Import");?>!" id="startimport">
  21. </div>
  22. <div id="progressbar_container" style="display: none">
  23. <p style="text-align:center;"><b><?php echo $l->t('Importing calendar'); ?></b></p>
  24. <div id="progressbar"></div>
  25. <div id="import_done" style="display: none;">
  26. <p style="text-align:center;"><b><?php echo $l->t('Calendar imported successfully'); ?></b></p>
  27. <input type="button" value="<?php echo $l->t('Close Dialog'); ?>" id="import_done_button">
  28. </div>
  29. </div>
  30. </div>