[dev] [kronolith-patch] remove old(?) alarm fields

Francois Marier francois at nit.ca
Tue Aug 3 12:05:09 PDT 2004


On Fri, Jul 30, 2004 at 10:27:17AM +0200, Jan Schneider wrote:
> >Right, so wouldn't the best way to support that be :
> >
> >1- show only Span if it matches and hide the other alternative
> >2- show both date and time if they match and hide span
> >3- show both alternatives (span, date and time) otherwise
> 
> Convinced. If we could ease the import process for almost everyone with the
> little unlikely drawback described above, we should do so.

Here's an updated patch that does the above.  It is now against Horde,
not Kronolith.  I have tested it against the 3 cases listed above.

Francois
-------------- next part --------------
diff -rpuN -X ../ignorelist ../build/horde/templates/data/csvmap.inc horde/templates/data/csvmap.inc
--- ../build/horde/templates/data/csvmap.inc	Tue Sep 16 19:08:08 2003
+++ horde/templates/data/csvmap.inc	Tue Aug  3 14:49:29 2004
@@ -84,7 +84,17 @@ function removePair()
         <select name="select2" size="10">
 <?php foreach ($app_fields as $key => $value):
       if (!isset($_SESSION['import_data']['data'][0][$key])): ?>
-          <option value="<?php echo $key ?>"><?php echo $value ?></option>
+      <?php if (($key == 'alarm_time') || ($key == 'alarm_date')): ?>
+            <?php if (!isset($_SESSION['import_data']['data'][0]['alarm'])): ?>
+            <option value="<?php echo $key ?>"><?php echo $value ?></option>
+            <?php endif; ?>
+      <?php elseif ($key == 'alarm'): ?> 
+            <?php if (!(isset($_SESSION['import_data']['data'][0]['alarm_time']) && isset($_SESSION['import_data']['data'][0]['alarm_date']))): ?>
+            <option value="<?php echo $key ?>"><?php echo $value ?></option>
+            <?php endif; ?>
+      <?php else: ?>
+      <option value="<?php echo $key ?>"><?php echo $value ?></option>
+      <?php endif; ?>
 <?php endif;
       endforeach; ?>
         </select>


More information about the dev mailing list