Revision: 1053
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1053&view=rev
Author:   cimorrison
Date:     2009-03-18 20:38:36 +0000 (Wed, 18 Mar 2009)

Log Message:
-----------
Made representation of 12 midnight with a 12 hour clock consistent with the 
rest of MRBS - ie written as 12:00AM not 0:00AM.

Modified Paths:
--------------
    mrbs/trunk/web/edit_entry.php

Modified: mrbs/trunk/web/edit_entry.php
===================================================================
--- mrbs/trunk/web/edit_entry.php       2009-03-18 20:18:09 UTC (rev 1052)
+++ mrbs/trunk/web/edit_entry.php       2009-03-18 20:38:36 UTC (rev 1053)
@@ -454,25 +454,38 @@
     <?php 
     if(! $enable_periods ) 
     { 
-    ?>
-      <div class="div_time">
-        <label><?php echo get_vocab("time")?>:</label>
-        <input class="time_hour" name="hour" value="<?php if 
(!$twentyfourhour_format && ($start_hour > 12)){ echo ($start_hour - 12);} else 
{ echo $start_hour;} ?>" maxlength="2">
-        <span>:</span>
-        <input class="time_minute" name="minute" value="<?php echo 
$start_min;?>" maxlength="2">
-        <?php
-        if (!$twentyfourhour_format)
-        {
-          echo "<div class=\"group ampm\">\n";
-          $checked = ($start_hour < 12) ? "checked=\"checked\"" : "";
-          echo "      <label><input name=\"ampm\" type=\"radio\" value=\"am\" 
$checked>" . utf8_strftime("%p",mktime(1,0,0,1,1,2000)) . "</label>\n";
-          $checked = ($start_hour >= 12) ? "checked=\"checked\"" : "";
-          echo "      <label><input name=\"ampm\" type=\"radio\" value=\"pm\" 
$checked>". utf8_strftime("%p",mktime(13,0,0,1,1,2000)) . "</label>\n";
-          echo "</div>\n";
-        }
-        ?>
-      </div>
-      <?php
+      echo "<div class=\"div_time\">\n";
+      echo "<label>" . get_vocab("time") . ":</label>\n";
+      echo "<input type=\"text\" class=\"time_hour\" name=\"hour\" value=\"";
+      if ($twentyfourhour_format)
+      {
+        echo $start_hour;
+      }
+      elseif ($start_hour > 12)
+      {
+        echo ($start_hour - 12);
+      } 
+      elseif ($start_hour == 0)
+      {
+        echo "12";
+      }
+      else
+      {
+        echo $start_hour;
+      } 
+      echo "\" maxlength=\"2\">\n";
+      echo "<span>:</span>\n";
+      echo "<input type=\"text\" class=\"time_minute\" name=\"minute\" 
value=\"" . $start_min . "\" maxlength=\"2\">\n";
+      if (!$twentyfourhour_format)
+      {
+        echo "<div class=\"group ampm\">\n";
+        $checked = ($start_hour < 12) ? "checked=\"checked\"" : "";
+        echo "      <label><input name=\"ampm\" type=\"radio\" value=\"am\" 
$checked>" . utf8_strftime("%p",mktime(1,0,0,1,1,2000)) . "</label>\n";
+        $checked = ($start_hour >= 12) ? "checked=\"checked\"" : "";
+        echo "      <label><input name=\"ampm\" type=\"radio\" value=\"pm\" 
$checked>". utf8_strftime("%p",mktime(13,0,0,1,1,2000)) . "</label>\n";
+        echo "</div>\n";
+      }
+      echo "</div>\n";
     }
     
     else


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to