fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [7368] bkbooking: update/bugfixes


From: Kjell Arne Espedal
Subject: [Fmsystem-commits] [7368] bkbooking: update/bugfixes
Date: Fri, 10 Jun 2011 11:54:22 +0000

Revision: 7368
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7368
Author:   kjell
Date:     2011-06-10 11:54:10 +0000 (Fri, 10 Jun 2011)
Log Message:
-----------
bkbooking: update/bugfixes

Modified Paths:
--------------
    trunk/booking/inc/class.uiallocation.inc.php
    trunk/booking/setup/phpgw_no.lang
    trunk/booking/templates/base/application.xsl
    trunk/booking/templates/base/application_new.xsl

Modified: trunk/booking/inc/class.uiallocation.inc.php
===================================================================
--- trunk/booking/inc/class.uiallocation.inc.php        2011-06-10 09:23:09 UTC 
(rev 7367)
+++ trunk/booking/inc/class.uiallocation.inc.php        2011-06-10 11:54:10 UTC 
(rev 7368)
@@ -413,10 +413,10 @@
                        {
                                $from_date = $_POST['from_'];
                                $to_date = $_POST['to_'];
-                $step++;
 
                                if ($_POST['recurring'] != 'on' && 
$_POST['outseason'] != 'on' )
                 {
+                                       
echo"<pre>single:";print_r($step);echo"\n";print_r($from_date);echo"\n";print_r($allocation);exit;
                     $err  = $this->bo->so->check_for_booking($id);
                     if ($err)
                     {
@@ -430,6 +430,7 @@
                 } 
                 else
                 { 
+                       $step++;
                                        if ($_POST['recurring'] == 'on') {
                                                $repeat_until = 
strtotime($_POST['repeat_until'])+60*60*24; 
                                        } 
@@ -444,6 +445,7 @@
                                        $i = 0;
                                        // calculating valid and invalid dates 
from the first booking's to-date to the repeat_until date is reached
                                        // the form from step 1 should validate 
and if we encounter any errors they are caused by double bookings.
+
                                        while (($max_dato+($interval*$i)) <= 
$repeat_until)
                                        {
                                                $fromdate = date('Y-m-d H:i', 
strtotime($_POST['from_']) + ($interval*$i));
@@ -452,7 +454,15 @@
                                                $allocation['to_'] = $todate;
 
                         $id = $this->bo->so->get_allocation_id($allocation);   
             
-                        $err  = $this->bo->so->check_for_booking($id);
+                                               if ($id) 
+                                               {
+                                                  $err  = 
$this->bo->so->check_for_booking($id);
+                                               }
+                                               else 
+                                               {
+                                                  $err = true;
+                                               }
+
                                if ($err) 
                                                {
                                                        
$invalid_dates[$i]['from_'] = $fromdate;
@@ -464,7 +474,8 @@
                                                        $valid_dates[$i]['to_'] 
= $todate;
                                                        if ($step == 3)
                                                        {
-                                $stat = $this->bo->so->delete_allocation($id); 
                           }                            
+                                $stat = $this->bo->so->delete_allocation($id);
+                            }                            
                         }
                                                $i++;
                     }

Modified: trunk/booking/setup/phpgw_no.lang
===================================================================
--- trunk/booking/setup/phpgw_no.lang   2011-06-10 09:23:09 UTC (rev 7367)
+++ trunk/booking/setup/phpgw_no.lang   2011-06-10 11:54:10 UTC (rev 7368)
@@ -476,7 +476,7 @@
 Recurring booking      booking no      Gjenta booking
 Repeat until   booking no      Gjenta til
 Bookings that can be created   booking no      Bookinger som kan lages
-Bookings and allocations       booking no      Bookinger og tildelinger
+Bookings and allocations       booking no      Kalender-ukeplan
 Send warning to building responsible   booking no      Send e-post til 
ansvarlig på bygget
 Optional e-mail adress booking no      Valgfri e-post adresse 
 Message about new event        booking no      Melding om nytt arrangement
@@ -518,3 +518,4 @@
 Backend        booking no      Backend
 Documentation  booking no      Dokumentasjon
 Upload manual  booking no      Last opp dokumentasjon
+Are you sure you want to delete?       booking no      Er du sikker på at 
søknad skal avvises?

Modified: trunk/booking/templates/base/application.xsl
===================================================================
--- trunk/booking/templates/base/application.xsl        2011-06-10 09:23:09 UTC 
(rev 7367)
+++ trunk/booking/templates/base/application.xsl        2011-06-10 11:54:10 UTC 
(rev 7368)
@@ -274,7 +274,7 @@
                                        <dt>
                                                <form method="POST">
                                                        <input type="hidden" 
name="status" value="REJECTED"/>
-                                                       <input type="submit" 
value="{php:function('lang', 'Reject application')}">
+                                                       <input onclick="return 
confirm('{php:function('lang', 'Are you sure you want to delete?')}')" 
type="submit" value="{php:function('lang', 'Reject application')}">
                                                                <xsl:if 
test="not(application/case_officer)">
                                                                        
<xsl:attribute name="disabled">disabled</xsl:attribute>
                                                                </xsl:if>

Modified: trunk/booking/templates/base/application_new.xsl
===================================================================
--- trunk/booking/templates/base/application_new.xsl    2011-06-10 09:23:09 UTC 
(rev 7367)
+++ trunk/booking/templates/base/application_new.xsl    2011-06-10 11:54:10 UTC 
(rev 7368)
@@ -16,7 +16,12 @@
                        <div class="heading">1. <xsl:value-of 
select="php:function('lang', 'Why?')" /></div>
                        <dt>
                                <label for="field_activity"><xsl:value-of 
select="php:function('lang', 'Activity')" /></label>
-                               <p>Velg en aktivitet fra listsen. Finner du 
ikke eksakt din aktivitet, velger du hovedaktivitet, for eksempel idrett eller 
kultur.</p>
+                               <p>Informasjon om aktiviteten/arrangementet
+                               Gi en kort beskrivelse av arrangementet 
/aktiviteten. 
+                               For åpne arrangement, aktiviteter og trening i 
regi av 
+                               organisasjoner og klubber vises denne 
informasjonen på internett. 
+                               For faste aktiviteter oppgi intervall og til 
dato, 
+                               f.eks. torsdager kl.19-20 frem til 23/6.</p>
                        </dt>
                        <dd>
                                <select name="activity_id" id="field_activity">
@@ -92,7 +97,7 @@
                </dl>
                <dl class="form-col">
                        <div class="heading">4. <xsl:value-of 
select="php:function('lang', 'When?')" /></div>
-                       <p>Velg fra dato og angi fra klokkeslett. Velg til dato 
og angi klokkeslett. Dato velges fra kalender. Klokkeslett angis med 
timer:minutter. Du kan søke om flere tider ved å velge Legg til dato.</p>
+                       <p>Velg fra dato og angi fra klokkeslett. Velg til dato 
og angi klokkeslett. Dato velges fra kalender. Klokkeslett angis med            
                timer:minutter. Du kan søke om flere tider ved å velge Legg til 
dato. For søknad om fast tid i en gitt periode legg inn startdato og            
                klokkeslett for den første gangen her og oppgi intervall og 
sluttdato i felt 1: "Informasjon om aktiviteten"</p>
                        <div id="dates-container">
                                <xsl:for-each select="application/dates">
                                        <div class="date-container">




reply via email to

[Prev in Thread] Current Thread [Next in Thread]