Revision: 2504
          https://sourceforge.net/p/mrbs/code/2504/
Author:   cimorrison
Date:     2012-10-16 09:32:19 +0000 (Tue, 16 Oct 2012)
Log Message:
-----------
Converted the day of the month field into a <select> box in order to remove any 
need for field validation.

Modified Paths:
--------------
    mrbs/branches/improved_repeat_interface/web/edit_entry.php
    mrbs/branches/improved_repeat_interface/web/edit_entry_handler.php

Modified: mrbs/branches/improved_repeat_interface/web/edit_entry.php
===================================================================
--- mrbs/branches/improved_repeat_interface/web/edit_entry.php  2012-10-15 
16:44:15 UTC (rev 2503)
+++ mrbs/branches/improved_repeat_interface/web/edit_entry.php  2012-10-16 
09:32:19 UTC (rev 2504)
@@ -1373,11 +1373,16 @@
       
       // We could in the future allow -1 to -31, meaning "the nth last day of
       // the month", but for the moment we'll keep it simple
+      $options = array();
+      for ($i=1; $i<=31; $i++)
+      {
+        $options[] = $i;
+      }
       $params = array('name'       => 'month_absolute',
                       'value'      => $month_absolute,
-                      'disabled'   => $disabled,
-                      'attributes' => 'type="number" min="1" max="31" 
step="1"');
-      generate_input($params);
+                      'options'    => $options,
+                      'disabled'   => $disabled);
+      generate_select($params);
       echo "</fieldset>\n";
       
       // MONTH RELATIVE (eg the second Thursday of every month)

Modified: mrbs/branches/improved_repeat_interface/web/edit_entry_handler.php
===================================================================
--- mrbs/branches/improved_repeat_interface/web/edit_entry_handler.php  
2012-10-15 16:44:15 UTC (rev 2503)
+++ mrbs/branches/improved_repeat_interface/web/edit_entry_handler.php  
2012-10-16 09:32:19 UTC (rev 2504)
@@ -169,15 +169,14 @@
   if (($rep_type == REP_WEEKLY) && ($rep_num_weeks < 1))
   {
     print_header($day, $month, $year, $area, isset($room) ? $room : "");
-  ?>
-         <h1><?php echo get_vocab('invalid_booking'); ?></h1>
-         <p>
-           <?php echo get_vocab('you_have_not_entered')." 
".get_vocab("useful_n-weekly_value"); ?>
-         </p>
-  <?php
+    echo "<h1>" . get_vocab('invalid_booking') . "</h1>\n";
+    echo "<p>\n";
+    echo  get_vocab('you_have_not_entered') . " " . 
get_vocab("useful_n-weekly_value");
+    echo "</p>\n";
     // Print footer and exit
     print_footer(TRUE);
   }
+  
 
   if (count($is_mandatory_field))
   {
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to