fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [14355] fixing forms


From: Saul
Subject: [Fmsystem-commits] [14355] fixing forms
Date: Fri, 13 Nov 2015 23:56:55 +0000

Revision: 14355
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14355
Author:   psaul
Date:     2015-11-13 23:56:52 +0000 (Fri, 13 Nov 2015)
Log Message:
-----------
fixing forms

Modified Paths:
--------------
    branches/dev-syncromind/bookingfrontend/css/bookingfrontend.css
    branches/dev-syncromind/bookingfrontend/inc/class.uibuilding.inc.php
    branches/dev-syncromind/bookingfrontend/inc/class.uievent.inc.php
    branches/dev-syncromind/bookingfrontend/templates/base/application.xsl

Added Paths:
-----------
    branches/dev-syncromind/bookingfrontend/templates/base/event_delete.xsl
    branches/dev-syncromind/bookingfrontend/templates/base/event_edit.xsl

Modified: branches/dev-syncromind/bookingfrontend/css/bookingfrontend.css
===================================================================
--- branches/dev-syncromind/bookingfrontend/css/bookingfrontend.css     
2015-11-13 16:55:33 UTC (rev 14354)
+++ branches/dev-syncromind/bookingfrontend/css/bookingfrontend.css     
2015-11-13 23:56:52 UTC (rev 14355)
@@ -709,7 +709,7 @@
 #field_customer_ssn {display: block;}
 #field_customer_organization_number {display: block;}
 
-.pure-g [class*="pure-u"] {padding: 0;}
+.pure-g [class*="pure-u"] {padding: 0;font-family: verdana,​sans-serif;}
 .pure-g [class*="pure-u"] button,
 .pure-g [class*="pure-u"] input,
 .pure-g [class*="pure-u"] select,

Modified: branches/dev-syncromind/bookingfrontend/inc/class.uibuilding.inc.php
===================================================================
--- branches/dev-syncromind/bookingfrontend/inc/class.uibuilding.inc.php        
2015-11-13 16:55:33 UTC (rev 14354)
+++ branches/dev-syncromind/bookingfrontend/inc/class.uibuilding.inc.php        
2015-11-13 23:56:52 UTC (rev 14355)
@@ -300,6 +300,8 @@
         }
         $building['deactivate_application'] = 1;
         self::add_javascript('bookingfrontend', 'bookingfrontend', 
'schedule.js');
+        phpgwapi_jquery::load_widget("datepicker");
+        $building['picker_img'] = 
$GLOBALS['phpgw']->common->image('phpgwapi','cal');
         self::render_template('building_schedule', array('building' => 
$building, 'backend' => $backend));
     }
 

Modified: branches/dev-syncromind/bookingfrontend/inc/class.uievent.inc.php
===================================================================
--- branches/dev-syncromind/bookingfrontend/inc/class.uievent.inc.php   
2015-11-13 16:55:33 UTC (rev 14354)
+++ branches/dev-syncromind/bookingfrontend/inc/class.uievent.inc.php   
2015-11-13 23:56:52 UTC (rev 14355)
@@ -88,6 +88,10 @@
             if($_SERVER['REQUEST_METHOD'] == 'POST')
             {
                 $test = $this->bo->read_single($event['id']);
+                
+                $_POST['org_from'] = date("Y-m-d H:i:s", 
phpgwapi_datetime::date_to_timestamp($_POST['org_from']));
+                $_POST['org_to'] = date("Y-m-d H:i:s", 
phpgwapi_datetime::date_to_timestamp($_POST['org_to']));
+                
                 $event['from_'] = 
substr($_POST['org_from'],0,11).$_POST['from_'].":00";
                 $event['to_'] = 
substr($_POST['org_to'],0,11).$_POST['to_'].":00";
                 array_set_default($_POST, 'resources', array());
@@ -128,15 +132,28 @@
             self::add_javascript('bookingfrontend', 'bookingfrontend', 
'event.js');
             $event['resources_json'] = json_encode(array_map('intval', 
$event['resources']));
             $event['cancel_link'] = self::link(array('menuaction' => 
'bookingfrontend.uibuilding.schedule', 'id'=> $event['building_id'], 'date' => 
$date));
+            
+            $activity_path = 
$this->activity_bo->get_path($event['activity_id']);
+            $top_level_activity = $activity_path ? $activity_path[0]['id'] : 
.1;
+            
             $activities = $this->activity_bo->fetch_activities();
             $activities = $activities['results'];
             $comments = $this->bo->so->get_ordered_comments($id);
-            $agegroups = $this->agegroup_bo->fetch_age_groups();
+            $agegroups = 
$this->agegroup_bo->fetch_age_groups($top_level_activity);
             $agegroups = $agegroups['results'];
-            $audience = $this->audience_bo->fetch_target_audience();
+            $audience = 
$this->audience_bo->fetch_target_audience($top_level_activity);
             $audience = $audience['results'];
             $this->install_customer_identifier_ui($event);
             $this->add_template_helpers();
+            
+            $event['from_'] = pretty_timestamp($event['from_']);
+            $event['to_'] = pretty_timestamp($event['to_']);
+            $event['from_2'] = date("H:i", 
phpgwapi_datetime::date_to_timestamp($event['from_']));
+            $event['to_2'] = date("H:i", 
phpgwapi_datetime::date_to_timestamp($event['to_']));
+            
+            $GLOBALS['phpgw']->jqcal->add_listener('from_', 'time');
+            $GLOBALS['phpgw']->jqcal->add_listener('to_', 'time');
+            phpgwapi_jquery::load_widget('datepicker');
 
             self::render_template('event_edit', array('event' => $event, 
'activities' => $activities, 'agegroups' => $agegroups, 'audience' => 
$audience, 'comments' => $comments));
         }
@@ -333,7 +350,11 @@
                        $step = 1;
                        $id = intval(phpgw::get_var('id', 'GET'));
                        $event = $this->bo->read_single($id);
-                       $agegroups = $this->agegroup_bo->fetch_age_groups();
+
+            $activity_path = 
$this->activity_bo->get_path($event['activity_id']);
+            $top_level_activity = $activity_path ? $activity_path[0]['id'] : 
.1;
+            
+            $agegroups = 
$this->agegroup_bo->fetch_age_groups($top_level_activity);
                        $agegroups = $agegroups['results'];
 
                        $building_info = $this->bo->so->get_building_info($id);

Modified: branches/dev-syncromind/bookingfrontend/templates/base/application.xsl
===================================================================
--- branches/dev-syncromind/bookingfrontend/templates/base/application.xsl      
2015-11-13 16:55:33 UTC (rev 14354)
+++ branches/dev-syncromind/bookingfrontend/templates/base/application.xsl      
2015-11-13 23:56:52 UTC (rev 14355)
@@ -37,243 +37,274 @@
 
         <xsl:call-template name="msgbox"/>
                <!--xsl:call-template name="yui_booking_i18n"/-->
+        
+        <div class="pure-g">
+            <div class="pure-u-1">
+                <xsl:if test="not(frontend)">
+                    <div style="border: 3px solid red; padding: 3px 4px 3px 
4px">
+                        <xsl:choose>
+                            <xsl:when test="not(application/case_officer)">
+                                <xsl:value-of select="php:function('lang', 'In 
order to work with this application, you must first')"/>
+                                <xsl:text> </xsl:text><a 
href="#assign"><xsl:value-of select="php:function('lang', 'assign 
yourself')"/></a><xsl:text> </xsl:text>
+                                <xsl:value-of select="php:function('lang', 'as 
the case officer responsible for this application.')"/>
+                            </xsl:when>
+                            <xsl:when test="application/case_officer and 
not(application/case_officer/is_current_user)">
+                                <xsl:value-of select="php:function('lang', 
'The user currently assigned as the responsible case officer for this 
application is')"/>'<xsl:text> </xsl:text><xsl:value-of 
select="application/case_officer/name"/>'.
+                                <br/>
+                                <xsl:value-of select="php:function('lang', 'In 
order to work with this application, you must therefore first')"/>
+                                <xsl:text> </xsl:text><a 
href="#assign"><xsl:value-of select="php:function('lang', 'assign 
yourself')"/></a><xsl:text> </xsl:text>
+                                <xsl:value-of select="php:function('lang', 'as 
the case officer responsible for this application.')"/>
+                            </xsl:when>
+                            <xsl:otherwise>
+                                <xsl:attribute 
name="style">display:none</xsl:attribute>
+                            </xsl:otherwise>
+                        </xsl:choose>
+                    </div>
+                </xsl:if>
 
-                       <xsl:if test="not(frontend)">
-                               <div style="border: 3px solid red; padding: 3px 
4px 3px 4px">
-                                       <xsl:choose>
-                                               <xsl:when 
test="not(application/case_officer)">
-                                                       <xsl:value-of 
select="php:function('lang', 'In order to work with this application, you must 
first')"/>
-                                                       <xsl:text> 
</xsl:text><a href="#assign"><xsl:value-of select="php:function('lang', 'assign 
yourself')"/></a><xsl:text> </xsl:text>
-                                                       <xsl:value-of 
select="php:function('lang', 'as the case officer responsible for this 
application.')"/>
-                                               </xsl:when>
-                                               <xsl:when 
test="application/case_officer and 
not(application/case_officer/is_current_user)">
-                                                       <xsl:value-of 
select="php:function('lang', 'The user currently assigned as the responsible 
case officer for this application is')"/>'<xsl:text> </xsl:text><xsl:value-of 
select="application/case_officer/name"/>'.
-                                                       <br/>
-                                                       <xsl:value-of 
select="php:function('lang', 'In order to work with this application, you must 
therefore first')"/>
-                                                       <xsl:text> 
</xsl:text><a href="#assign"><xsl:value-of select="php:function('lang', 'assign 
yourself')"/></a><xsl:text> </xsl:text>
-                                                       <xsl:value-of 
select="php:function('lang', 'as the case officer responsible for this 
application.')"/>
-                                               </xsl:when>
-                                               <xsl:otherwise>
-                                                       <xsl:attribute 
name="style">display:none</xsl:attribute>
-                                               </xsl:otherwise>
-                                       </xsl:choose>
-                               </div>
-                       </xsl:if>
-                                       
-               <xsl:if test="not(frontend)">
-               <dl class="proplist-col">
-                   <dt><xsl:value-of select="php:function('lang', 'Status')" 
/></dt>
-                   <dd><xsl:value-of select="php:function('lang', 
string(application/status))"/></dd>
-               </dl>
-               <dl class="proplist-col">
-                   <dt><xsl:value-of select="php:function('lang', 'Created')" 
/></dt>
-                   <dd><xsl:value-of select="php:function('pretty_timestamp', 
application/created)"/></dd>
-               </dl>
-               <dl class="proplist-col">
-                   <dt><xsl:value-of select="php:function('lang', 'Modified')" 
/></dt>
-                   <dd><xsl:value-of select="php:function('pretty_timestamp', 
application/modified)"/></dd>
-               </dl>
-               </xsl:if>
-               <xsl:if test="frontend">
-                       <dl class="proplist">
-                       <span style="font-size: 110%; font-weight: bold;">Din 
søknad har status <xsl:value-of select="php:function('lang', 
string(application/status))"/></span><span class="text">, opprettet 
<xsl:value-of select="php:function('pretty_timestamp', application/created)"/>, 
sist endret <xsl:value-of select="php:function('pretty_timestamp', 
application/modified)"/></span>
-                       <span class="text"><br />Melding fra saksbehandler 
ligger under historikk, deretter vises kopi av din søknad.<br /> Skal du gi en 
melding til saksbehandler skriver du denne inn i feltet under "Legg til en 
kommentar"</span> 
-                       </dl>
-               </xsl:if>
+                <xsl:if test="not(frontend)">
+                    <dl class="proplist-col">
+                        <dt><xsl:value-of select="php:function('lang', 
'Status')" /></dt>
+                        <dd><xsl:value-of select="php:function('lang', 
string(application/status))"/></dd>
+                    </dl>
+                    <dl class="proplist-col">
+                        <dt><xsl:value-of select="php:function('lang', 
'Created')" /></dt>
+                        <dd><xsl:value-of 
select="php:function('pretty_timestamp', application/created)"/></dd>
+                    </dl>
+                    <dl class="proplist-col">
+                        <dt><xsl:value-of select="php:function('lang', 
'Modified')" /></dt>
+                        <dd><xsl:value-of 
select="php:function('pretty_timestamp', application/modified)"/></dd>
+                    </dl>
+                </xsl:if>
+                <xsl:if test="frontend">
+                    <dl class="proplist">
+                    <span style="font-size: 110%; font-weight: bold;">Din 
søknad har status <xsl:value-of select="php:function('lang', 
string(application/status))"/></span><span class="text">, opprettet 
<xsl:value-of select="php:function('pretty_timestamp', application/created)"/>, 
sist endret <xsl:value-of select="php:function('pretty_timestamp', 
application/modified)"/></span>
+                    <span class="text"><br />Melding fra saksbehandler ligger 
under historikk, deretter vises kopi av din søknad.<br /> Skal du gi en melding 
til saksbehandler skriver du denne inn i feltet under "Legg til en 
kommentar"</span> 
+                    </dl>
+                </xsl:if>
 
-        <dl class="proplist">
-            <dt class="heading"><xsl:value-of select="php:function('lang', 
'Add a comment')" /></dt>
-                       <dd>
-                               <form method="POST">
-                                       <textarea name="comment" style="width: 
60%; height: 7em"></textarea><br/>
-                                   <input type="submit" 
value="{php:function('lang', 'Add comment')}" />
-                               </form>
-                       </dd>
-        </dl>
+                <dl class="proplist">
+                    <dt class="heading"><xsl:value-of 
select="php:function('lang', 'Add a comment')" /></dt>
+                    <dd>
+                        <form method="POST">
+                            <textarea name="comment" style="width: 60%; 
height: 7em"></textarea><br/>
+                            <input type="submit" value="{php:function('lang', 
'Add comment')}" />
+                        </form>
+                    </dd>
+                </dl>
+            </div>
+        </div>
 
-               <dl class="proplist">
-            <dt class="heading">1. <xsl:value-of select="php:function('lang', 
'History and comments (%1)', count(application/comments/author))" /></dt>
-                       <xsl:for-each select="application/comments[author]">
-                               <dt>
-                                       <xsl:value-of 
select="php:function('pretty_timestamp', time)"/>: <xsl:value-of 
select="author"/>
-                               </dt>
-                               <xsl:choose>
-                                       <xsl:when 
test='contains(comment,"bookingfrontend.uidocument_building.download")'>        
                      
-                                               <dd><xsl:value-of 
select="comment" disable-output-escaping="yes"/></dd>
-                                       </xsl:when>
-                                       <xsl:otherwise>                         
-                                               <dd><div style="width: 
80%;"><xsl:value-of select="comment"/></div></dd>
-                                       </xsl:otherwise>
-                               </xsl:choose>
-                       </xsl:for-each>
-               </dl>
+        <div class="pure-g">
+            <div class="pure-u-1">
+                <dl class="proplist">
+                    <dt class="heading">1. <xsl:value-of 
select="php:function('lang', 'History and comments (%1)', 
count(application/comments/author))" /></dt>
+                    <xsl:for-each select="application/comments[author]">
+                        <dt>
+                            <xsl:value-of 
select="php:function('pretty_timestamp', time)"/>: <xsl:value-of 
select="author"/>
+                        </dt>
+                        <xsl:choose>
+                            <xsl:when 
test='contains(comment,"bookingfrontend.uidocument_building.download")'>
+                                <dd><xsl:value-of select="comment" 
disable-output-escaping="yes"/></dd>
+                            </xsl:when>
+                            <xsl:otherwise>
+                                <dd><div style="width: 80%;"><xsl:value-of 
select="comment"/></div></dd>
+                            </xsl:otherwise>
+                        </xsl:choose>
+                    </xsl:for-each>
+                </dl>
+            </div>
+        </div>
 
-        <dl class="proplist">
-            <dt class="heading">2. <xsl:value-of select="php:function('lang', 
'Why?')" /></dt>
-            <dt><xsl:value-of select="php:function('lang', 'Activity')" /></dt>
-            <dd><xsl:value-of select="application/activity_name"/></dd>
-            <dt><xsl:value-of select="php:function('lang', 'Description')" 
/></dt>
-                       <dd><div style="width: 80%;"><xsl:value-of 
select="application/description"/></div></dd>
-               </dl>
-        <dl class="proplist-col">
-            <dt class="heading">3. <xsl:value-of select="php:function('lang', 
'Where?')" /></dt>
-                       <dt><xsl:value-of select="php:function('lang', 
'Building')" /></dt>
-            <dd><xsl:value-of select="application/building_name"/>
-                       (<a href="javascript: void(0)" 
-                               
onclick="window.open('{application/schedule_link}', 
-                                            '', 
-                                                  'width=1048, height=600, 
scrollbars=yes');
-                                                     return 
false;"><xsl:value-of select="php:function('lang', 'Building schedule')" 
/></a>)</dd>
-            <dd><div id="resources_container"/></dd>
-        </dl>
-        <dl class="proplist-col">
-            <dt class="heading">4. <xsl:value-of select="php:function('lang', 
'When?')" /></dt>
-                       <script type="text/javascript">
-                               var allocationParams = {};
-                               var bookingParams = {};
-                               var eventParams = {};
-                       </script>
-                       <xsl:for-each select="application/dates">
-                               <dd><span 
style="font-weight:bold;"><xsl:value-of select="php:function('lang', 'From')" 
/>: &nbsp;</span><span><xsl:value-of select="php:function('pretty_timestamp', 
from_)"/></span></dd>
-                               <dd><span 
style="font-weight:bold;"><xsl:value-of select="php:function('lang', 'To')" />: 
&nbsp;</span><span><xsl:value-of select="php:function('pretty_timestamp', 
to_)"/></span></dd>
-                               <xsl:if test="../edit_link">
-                               <script type="text/javascript">
-                                       allocationParams[<xsl:value-of 
select="id"/>] = <xsl:value-of select="allocation_params"/>;
-                                       bookingParams[<xsl:value-of 
select="id"/>] = <xsl:value-of select="booking_params"/>;
-                                       eventParams[<xsl:value-of 
select="id"/>] = <xsl:value-of select="event_params"/>;
-                               </script>
-                               <select name="create" 
onchange="if(this.selectedIndex==1) 
JqueryPortico.booking.postToUrl('index.php?menuaction=booking.uiallocation.add',
 allocationParams[{id}]); if(this.selectedIndex==2) 
JqueryPortico.booking.postToUrl('index.php?menuaction=booking.uibooking.add', 
eventParams[{id}]); if(this.selectedIndex==3) 
JqueryPortico.booking.postToUrl('index.php?menuaction=booking.uievent.add', 
eventParams[{id}]);">
-                                       <xsl:if 
test="not(../case_officer/is_current_user)">
-                                               <xsl:attribute 
name="disabled">disabled</xsl:attribute>         
-                                       </xsl:if>
-                                       
-                                       <option><xsl:value-of 
select="php:function('lang', '- Actions -')" /></option>
-                                       <option><xsl:value-of 
select="php:function('lang', 'Create allocation')" /></option>
-                                       <option><xsl:value-of 
select="php:function('lang', 'Create booking')" /></option>
-                                       <option><xsl:value-of 
select="php:function('lang', 'Create event')" /></option>
-                               </select>
-                               </xsl:if>
-                       </xsl:for-each>
-        </dl>
-        <dl class="proplist-col">
-            <dt class="heading">5. <xsl:value-of select="php:function('lang', 
'Who?')" /></dt>
-            <dt><xsl:value-of select="php:function('lang', 'Target audience')" 
/></dt>
-                       <dd>
-                               <ul>
-                                       <xsl:for-each select="audience">
-                                               <xsl:if 
test="../application/audience=id">
-                                                       <li><xsl:value-of 
select="name"/></li>
-                                               </xsl:if>
-                                       </xsl:for-each>
-                               </ul>
-                       </dd>
-            <dt><xsl:value-of select="php:function('lang', 'Number of 
participants')" /></dt>
-                       <dd>
-                               <table id="agegroup" class="pure-table 
pure-table-bordered">
-                    <thead>
-                        <tr><th/><th><xsl:value-of 
select="php:function('lang', 'Male')" /></th>
-                        <th><xsl:value-of select="php:function('lang', 
'Female')" /></th></tr>
-                    </thead>
-                    <tbody>
-                        <xsl:for-each select="agegroups">
-                            <xsl:variable name="id"><xsl:value-of 
select="id"/></xsl:variable>
-                            <tr>
-                                <th><xsl:value-of select="name"/></th>
-                                <td><xsl:value-of 
select="../application/agegroups/male[../agegroup_id = $id]"/></td>
-                                <td><xsl:value-of 
select="../application/agegroups/female[../agegroup_id = $id]"/></td>
-                            </tr>
-                        </xsl:for-each>
-                    </tbody>
-                               </table>
-                       </dd>
-        </dl>
-        <div class="clr"/>
-               <dl class="form-col">
-                       <div class="heading"><br />6. <xsl:value-of 
select="php:function('lang', 'Contact information')" /></div>
-                       <dt><label for="field_contact_name"><xsl:value-of 
select="php:function('lang', 'Name')" /></label></dt>
-                       <dd>
-                                       <xsl:value-of 
select="application/contact_name"/>
-                       </dd>
-                       <dt><label for="field_contact_email"><xsl:value-of 
select="php:function('lang', 'Email')" /></label></dt>
-                       <dd>
-                                       <xsl:value-of 
select="application/contact_email"/>
-                       </dd>
-                       <dt><label for="field_contact_phone"><xsl:value-of 
select="php:function('lang', 'Phone')" /></label></dt>
-                       <dd>
-                                       <xsl:value-of 
select="application/contact_phone"/>
-                       </dd>
-               </dl>
-               <dl class="form-col">
-                       <div class="heading">7. <xsl:value-of 
select="php:function('lang', 'responsible applicant')" /> / <xsl:value-of 
select="php:function('lang', 'invoice information')" /></div>
-                       <xsl:if test="application/customer_identifier_type = 
'organization_number'">
-                               <dt><label 
for="field_organization_number"><xsl:value-of select="php:function('lang', 
'organization number')" /></label></dt>
-                               <dd><xsl:value-of 
select="application/customer_organization_number"/></dd>
-                       </xsl:if>
-                       <xsl:if test="application/customer_identifier_type = 
'ssn'">
-                               <dt><label for="field_ssn_number"><xsl:value-of 
select="php:function('lang', 'Date of birth or SSN')" /></label></dt>
-                               <dd><xsl:value-of 
select="application/customer_ssn"/></dd>
-                       </xsl:if>
-               </dl>
-               <dl class="form-col">
-                       <div class="heading"><br />8. <xsl:value-of 
select="php:function('lang', 'Terms and conditions')" /></div>
-                       <p><xsl:value-of select="php:function('lang', 'All that 
borrow premises from Bergen Kommune must verify that they have read the terms 
and conditions, this is usually fire regulations and house rules.')" /></p>
-                       <br />
-                       <div id='regulation_documents'>&nbsp;</div>
-                       <br />
-                       <p><xsl:value-of select="php:function('lang', 'To 
borrow premises you must verify that you have read terms and conditions')" 
/></p>
-               </dl>
+        <div class="pure-g">
+            <div class="pure-u-1 pure-u-md-1-2 pure-u-lg-1-3">
+                <dl class="proplist">
+                    <dt class="heading">2. <xsl:value-of 
select="php:function('lang', 'Why?')" /></dt>
+                    <dt><xsl:value-of select="php:function('lang', 
'Activity')" /></dt>
+                    <dd><xsl:value-of select="application/activity_name"/></dd>
+                    <dt><xsl:value-of select="php:function('lang', 
'Description')" /></dt>
+                    <dd><div style="width: 80%;"><xsl:value-of 
select="application/description"/></div></dd>
+                </dl>
+            </div>
+            <div class="pure-u-1 pure-u-md-1-2 pure-u-lg-1-3">
+                <dl class="proplist-col">
+                    <dt class="heading">3. <xsl:value-of 
select="php:function('lang', 'Where?')" /></dt>
+                    <dt><xsl:value-of select="php:function('lang', 
'Building')" /></dt>
+                    <dd><xsl:value-of select="application/building_name"/>
+                    (<a href="javascript: void(0)" 
+                        onclick="window.open('{application/schedule_link}', 
+                                 '', 
+                                   'width=1048, height=600, scrollbars=yes');
+                                      return false;"><xsl:value-of 
select="php:function('lang', 'Building schedule')" /></a>)</dd>
+                    <dd><div id="resources_container"/></dd>
+                </dl>
+            </div>
+            <div class="pure-u-1 pure-u-md-1-2 pure-u-lg-1-3">
+                <dl class="proplist-col">
+                    <dt class="heading">4. <xsl:value-of 
select="php:function('lang', 'When?')" /></dt>
+                    <script type="text/javascript">
+                        var allocationParams = {};
+                        var bookingParams = {};
+                        var eventParams = {};
+                    </script>
+                    <xsl:for-each select="application/dates">
+                        <dd><span style="font-weight:bold;"><xsl:value-of 
select="php:function('lang', 'From')" />: &nbsp;</span><span><xsl:value-of 
select="php:function('pretty_timestamp', from_)"/></span></dd>
+                        <dd><span style="font-weight:bold;"><xsl:value-of 
select="php:function('lang', 'To')" />: &nbsp;</span><span><xsl:value-of 
select="php:function('pretty_timestamp', to_)"/></span></dd>
+                        <xsl:if test="../edit_link">
+                        <script type="text/javascript">
+                            allocationParams[<xsl:value-of select="id"/>] = 
<xsl:value-of select="allocation_params"/>;
+                            bookingParams[<xsl:value-of select="id"/>] = 
<xsl:value-of select="booking_params"/>;
+                            eventParams[<xsl:value-of select="id"/>] = 
<xsl:value-of select="event_params"/>;
+                        </script>
+                        <select name="create" 
onchange="if(this.selectedIndex==1) 
JqueryPortico.booking.postToUrl('index.php?menuaction=booking.uiallocation.add',
 allocationParams[{id}]); if(this.selectedIndex==2) 
JqueryPortico.booking.postToUrl('index.php?menuaction=booking.uibooking.add', 
eventParams[{id}]); if(this.selectedIndex==3) 
JqueryPortico.booking.postToUrl('index.php?menuaction=booking.uievent.add', 
eventParams[{id}]);">
+                            <xsl:if 
test="not(../case_officer/is_current_user)">
+                                <xsl:attribute 
name="disabled">disabled</xsl:attribute>
+                            </xsl:if>
 
-        <div class="clr"/>
+                            <option><xsl:value-of select="php:function('lang', 
'- Actions -')" /></option>
+                            <option><xsl:value-of select="php:function('lang', 
'Create allocation')" /></option>
+                            <option><xsl:value-of select="php:function('lang', 
'Create booking')" /></option>
+                            <option><xsl:value-of select="php:function('lang', 
'Create event')" /></option>
+                        </select>
+                        </xsl:if>
+                    </xsl:for-each>
+                </dl>
+            </div>
+        </div>
+
+        <div class="pure-g">
+            <div class="pure-u-1 pure-u-md-1-2 pure-u-lg-1-3">
+                <dl class="proplist-col">
+                    <dt class="heading">5. <xsl:value-of 
select="php:function('lang', 'Who?')" /></dt>
+                    <dt><xsl:value-of select="php:function('lang', 'Target 
audience')" /></dt>
+                    <dd>
+                        <ul>
+                            <xsl:for-each select="audience">
+                                <xsl:if test="../application/audience=id">
+                                    <li><xsl:value-of select="name"/></li>
+                                </xsl:if>
+                            </xsl:for-each>
+                        </ul>
+                    </dd>
+                    <dt><xsl:value-of select="php:function('lang', 'Number of 
participants')" /></dt>
+                    <dd>
+                        <table id="agegroup" class="pure-table 
pure-table-bordered">
+                            <thead>
+                                <tr><th/><th><xsl:value-of 
select="php:function('lang', 'Male')" /></th>
+                                <th><xsl:value-of select="php:function('lang', 
'Female')" /></th></tr>
+                            </thead>
+                            <tbody>
+                                <xsl:for-each select="agegroups">
+                                    <xsl:variable name="id"><xsl:value-of 
select="id"/></xsl:variable>
+                                    <tr>
+                                        <th><xsl:value-of select="name"/></th>
+                                        <td><xsl:value-of 
select="../application/agegroups/male[../agegroup_id = $id]"/></td>
+                                        <td><xsl:value-of 
select="../application/agegroups/female[../agegroup_id = $id]"/></td>
+                                    </tr>
+                                </xsl:for-each>
+                            </tbody>
+                        </table>
+                    </dd>
+                </dl>
+            </div>
+            <div class="pure-u-1 pure-u-md-1-2 pure-u-lg-1-3">
+                <dl class="form-col">
+                    <div class="heading">6. <xsl:value-of 
select="php:function('lang', 'Contact information')" /></div>
+                    <dt><label for="field_contact_name"><xsl:value-of 
select="php:function('lang', 'Name')" /></label></dt>
+                    <dd>
+                        <xsl:value-of select="application/contact_name"/>
+                    </dd>
+                    <dt><label for="field_contact_email"><xsl:value-of 
select="php:function('lang', 'Email')" /></label></dt>
+                    <dd>
+                        <xsl:value-of select="application/contact_email"/>
+                    </dd>
+                    <dt><label for="field_contact_phone"><xsl:value-of 
select="php:function('lang', 'Phone')" /></label></dt>
+                    <dd>
+                        <xsl:value-of select="application/contact_phone"/>
+                    </dd>
+                </dl>
+            </div>
+            <div class="pure-u-1 pure-u-md-1-2 pure-u-lg-1-3">
+                <dl class="form-col">
+                    <div class="heading">7. <xsl:value-of 
select="php:function('lang', 'responsible applicant')" /> / <xsl:value-of 
select="php:function('lang', 'invoice information')" /></div>
+                    <xsl:if test="application/customer_identifier_type = 
'organization_number'">
+                        <dt><label 
for="field_organization_number"><xsl:value-of select="php:function('lang', 
'organization number')" /></label></dt>
+                        <dd><xsl:value-of 
select="application/customer_organization_number"/></dd>
+                    </xsl:if>
+                    <xsl:if test="application/customer_identifier_type = 
'ssn'">
+                        <dt><label for="field_ssn_number"><xsl:value-of 
select="php:function('lang', 'Date of birth or SSN')" /></label></dt>
+                        <dd><xsl:value-of 
select="application/customer_ssn"/></dd>
+                    </xsl:if>
+                </dl>
+            </div>
+        </div>
+
+        <div class="pure-g">
+            <div class="pure-u-1">
+                <dl class="form-col">
+                    <div class="heading"><br />8. <xsl:value-of 
select="php:function('lang', 'Terms and conditions')" /></div>
+                    <p><xsl:value-of select="php:function('lang', 'All that 
borrow premises from Bergen Kommune must verify that they have read the terms 
and conditions, this is usually fire regulations and house rules.')" /></p>
+                    <br />
+                    <div id='regulation_documents'>&nbsp;</div>
+                    <br />
+                    <p><xsl:value-of select="php:function('lang', 'To borrow 
premises you must verify that you have read terms and conditions')" /></p>
+                </dl>
+            </div>
+        </div>
+
                <xsl:if test="application/edit_link">
                <button>
-                                       <xsl:if 
test="application/case_officer/is_current_user">
-                       <xsl:attribute 
name="onclick">window.location.href='<xsl:value-of                              
 select="application/edit_link"/>'</xsl:attribute>
-                                       </xsl:if>
-                                       <xsl:if 
test="not(application/case_officer/is_current_user)">
-                                               <xsl:attribute 
name="disabled">disabled</xsl:attribute> 
-                                       </xsl:if>
+                <xsl:if test="application/case_officer/is_current_user">
+                       <xsl:attribute 
name="onclick">window.location.href='<xsl:value-of 
select="application/edit_link"/>'</xsl:attribute>
+                </xsl:if>
+                <xsl:if test="not(application/case_officer/is_current_user)">
+                    <xsl:attribute name="disabled">disabled</xsl:attribute>    
+                </xsl:if>
                    <xsl:value-of select="php:function('lang', 'Edit')" />
                </button>
                </xsl:if>
                <xsl:if test="not(frontend)">
-                       <dl class="proplist">
-                   <dt class="heading"><xsl:value-of 
select="php:function('lang', 'Associated items')" /></dt>
-                               <dd><div id="associated_container"/></dd>
-                       </dl>
+            <div class="pure-g">
+                <div class="pure-u-1">
+                    <dl class="proplist">
+                        <dt class="heading"><xsl:value-of 
select="php:function('lang', 'Associated items')" /></dt>
+                        <dd><div id="associated_container"/></dd>
+                    </dl>
+                </div>
+            </div>
                </xsl:if>
 
                <xsl:if test="application/edit_link">
                        <dl class="proplist">
-                               <dt class="heading"><xsl:value-of 
select="php:function('lang', 'Actions')" /></dt>
-                               
-                                       <dt>
-                                               <xsl:if 
test="application/case_officer/is_current_user">
-                                                       <form method="POST" 
style="display:inline">
-                                                               <input 
type="hidden" name="unassign_user"/>
-                                                               <input 
type="submit" value="{php:function('lang', 'Unassign me')}"/>
-                                                       </form>
-                                                       <form method="POST" 
style="display:inline">
-                                                               <input 
type="hidden" name="display_in_dashboard" 
value="{phpgw:conditional(application/display_in_dashboard='1', '0', '1')}"/>
-                                                               <input 
type="submit" value="{php:function('lang', 
phpgw:conditional(application/display_in_dashboard='1', 'Hide from my Dashboard 
until new activity occurs', 'Display in my Dashboard'))}"/>
-                                                       </form>
-                                               </xsl:if>
-                                                       
-                                                       <xsl:if 
test="not(application/case_officer/is_current_user)">
-                                                               <a 
name="assign"/>
-                                                               <form 
method="POST">
-                                                                       <input 
type="hidden" name="assign_to_user"/>
-                                                                       <input 
type="hidden" name="status" value="PENDING"/>
-                                                                       <input 
type="submit" value="{php:function('lang', 
phpgw:conditional(application/case_officer, 'Re-assign to me', 'Assign to 
me'))}"/>
-                                                       
-                                                                       <xsl:if 
test="application/case_officer">
-                                                                               
<xsl:value-of select="php:function('lang', 'Currently assigned to user:')"/>
-                                                                               
<xsl:text> </xsl:text>                                  
-                                                                               
<xsl:value-of select="application/case_officer/name"/>
-                                                                       
</xsl:if>
-                                                               </form>
-                                                       </xsl:if>               
                                
-                                       </dt>
-                               
+                               <dt class="heading"><xsl:value-of 
select="php:function('lang', 'Actions')" /></dt>                              
+                <dt>
+                    <xsl:if test="application/case_officer/is_current_user">
+                        <form method="POST" style="display:inline">
+                            <input type="hidden" name="unassign_user"/>
+                            <input type="submit" value="{php:function('lang', 
'Unassign me')}"/>
+                        </form>
+                        <form method="POST" style="display:inline">
+                            <input type="hidden" name="display_in_dashboard" 
value="{phpgw:conditional(application/display_in_dashboard='1', '0', '1')}"/>
+                            <input type="submit" value="{php:function('lang', 
phpgw:conditional(application/display_in_dashboard='1', 'Hide from my Dashboard 
until new activity occurs', 'Display in my Dashboard'))}"/>
+                        </form>
+                    </xsl:if>
+
+                    <xsl:if 
test="not(application/case_officer/is_current_user)">
+                        <a name="assign"/>
+                        <form method="POST">
+                            <input type="hidden" name="assign_to_user"/>
+                            <input type="hidden" name="status" 
value="PENDING"/>
+                            <input type="submit" value="{php:function('lang', 
phpgw:conditional(application/case_officer, 'Re-assign to me', 'Assign to 
me'))}"/>
+
+                            <xsl:if test="application/case_officer">
+                                <xsl:value-of select="php:function('lang', 
'Currently assigned to user:')"/>
+                                <xsl:text> </xsl:text>
+                                <xsl:value-of 
select="application/case_officer/name"/>
+                            </xsl:if>
+                        </form>
+                    </xsl:if>
+                </dt>
+
                                <xsl:if test="application/status!='REJECTED'">
                                        <dt>
                                                <form method="POST">
@@ -308,7 +339,7 @@
                        </dl>
                </xsl:if>
     </div>
-    
+
     <script type="text/javascript">
         var resourceIds = '<xsl:value-of select="application/resource_ids" />';
         if (!resourceIds || resourceIds == "") {
@@ -318,15 +349,15 @@
         var app_id = <xsl:value-of select="application/id" />;
         var building_id = <xsl:value-of select="application/building_id" />;
         var resources = <xsl:value-of select="application/resources" />;
-        
+
         <![CDATA[
             var resourcesURL = 
'index.php?menuaction=bookingfrontend.uiresource.index_json&sort=name&phpgw_return_as=json&'
 + resourceIds;
             var applicationURL = 
'index.php?menuaction=bookingfrontend.uiapplication.associated&phpgw_return_as=json&filter_application_id='
 + app_id;
             var documentURL = 
'index.php?menuaction=booking.uidocument_view.regulations&sort=name&phpgw_return_as=json&owner[]=building::'
 + building_id;
                 documentURL += 
'index.php?menuaction=booking.uidocument_view.regulations&sort=name&phpgw_return_as=json&owner[]=resource::'+
 resources;
-               
+
         ]]>
-        
+
         if (resourceIds) {
             var colDefsResource = [{key: 'name', label: lang['Resources'], 
formatter: genericLink}, {key: 'type', label: lang['Resource Type']}];
             createTable('resources_container', resourcesURL, colDefsResource, 
'results');
@@ -338,11 +369,9 @@
             ];
             createTable('associated_container', applicationURL, 
colDefsApplication);
         }
-        
+
         var colDefsDocument = [{key: 'name', label: lang['Document'], 
formatter: genericLink}];
         createTable('regulation_documents', documentURL, colDefsDocument);
-        
-        
     </script>
 
 <!--script type="text/javascript">
@@ -354,11 +383,11 @@
        var app_id = <xsl:value-of select="application/id"/>;
        var building_id = <xsl:value-of select="application/building_id"/>;     
        var resources = <xsl:value-of select="application/resources"/>;
-       
+
 YAHOO.util.Event.addListener(window, "load", function() {
        <![CDATA[
-       var url3 = 
'index.php?menuaction=booking.uidocument_view.regulations&sort=name&phpgw_return_as=json&owner[]=building::'
 + building_id;          
-               url3 += 
'index.php?menuaction=booking.uidocument_view.regulations&sort=name&phpgw_return_as=json&owner[]=resource::'+
 resources; 
+       var url3 = 
'index.php?menuaction=booking.uidocument_view.regulations&sort=name&phpgw_return_as=json&owner[]=building::'
 + building_id;
+               url3 += 
'index.php?menuaction=booking.uidocument_view.regulations&sort=name&phpgw_return_as=json&owner[]=resource::'+
 resources;
 
        ]]>
        var colDefs = [{key: 'name', label: lang['Document'], formatter: 
YAHOO.booking.formatLink}];

Added: branches/dev-syncromind/bookingfrontend/templates/base/event_delete.xsl
===================================================================
--- branches/dev-syncromind/bookingfrontend/templates/base/event_delete.xsl     
                        (rev 0)
+++ branches/dev-syncromind/bookingfrontend/templates/base/event_delete.xsl     
2015-11-13 23:56:52 UTC (rev 14355)
@@ -0,0 +1,101 @@
+<xsl:template match="data" xmlns:php="http://php.net/xsl";>
+    <div id="content">
+
+        <dl class="form">
+            <dt class="heading"><xsl:value-of select="php:function('lang', 
'Delete Event')"/></dt>
+        </dl>
+        <xsl:call-template name="msgbox"/>
+        <!--xsl:call-template name="yui_booking_i18n"/-->
+        <dl class="form">
+            <xsl:if test="can_delete_events=1">
+                <dd><xsl:value-of select="php:function('lang', 'Event Delete 
Information')"/></dd>
+            </xsl:if>
+            <xsl:if test="can_delete_events=0">
+                <dd><xsl:value-of select="php:function('lang', 'Event Delete 
Information2')"/></dd>
+            </xsl:if>
+
+        </dl>
+        <div class="clr"/>
+        <form action="" method="POST">
+            <dl class="form-col">
+                <dt><label for="field_building"><xsl:value-of 
select="php:function('lang', 'Building')" /></label></dt>
+                <dd>
+                    <div>
+                        <xsl:value-of select="event/building_name"/>
+                    </div>
+                </dd>
+                <dt><label for="field_building"><xsl:value-of 
select="php:function('lang', 'Description')" /></label></dt>
+                <dd>
+                    <div>
+                        <xsl:value-of select="event/description"/>
+                    </div>
+                </dd>
+                <dt><label for="field_activity"><xsl:value-of 
select="php:function('lang', 'Activity')" /></label></dt>
+                <dd>
+                    <div>
+                        <xsl:for-each select="activities">
+                            <xsl:if test="../event/activity_id = id">
+                                <xsl:value-of select="name"/>
+                            </xsl:if>
+                        </xsl:for-each>
+                    </div>
+                </dd>
+                <dt><label for="field_from"><xsl:value-of 
select="php:function('lang', 'From')" /></label></dt>
+                <dd>
+                    <div>
+                        <xsl:value-of select="event/from_"/>
+                    </div>
+                </dd>
+                <dt><label for="field_to"><xsl:value-of 
select="php:function('lang', 'To')"/></label></dt>
+                <dd>
+                    <div>
+                        <xsl:value-of select="event/to_"/>
+                    </div>
+                </dd>
+            </dl>
+            <div style='clear:left; padding:0; margin:0'/>
+
+            <dl class="form-col">
+                <dt><label for="field_message"><xsl:value-of 
select="php:function('lang', 'Message')" /></label></dt>
+                <dd class="yui-skin-sam">
+                    <textarea id="field-message" name="message" 
type="text"><xsl:value-of select="system_message/message"/></textarea>
+                </dd>
+            </dl>
+            <div class="form-buttons">
+                <input type="submit">
+                    <xsl:attribute name="value"><xsl:value-of 
select="php:function('lang', 'Delete')"/></xsl:attribute>
+                </input>
+                <a class="cancel">
+                    <xsl:attribute name="href"><xsl:value-of 
select="event/cancel_link"/></xsl:attribute>
+                    <xsl:value-of select="php:function('lang', 'Cancel')"/>
+                </a>
+            </div>
+        </form>
+    </div>
+    <script type="text/javascript">
+        YAHOO.event.initialSelection = <xsl:value-of 
select="booking/resources_json"/>;
+        var lang = <xsl:value-of select="php:function('js_lang', 'Resource 
Type')"/>;
+        <![CDATA[
+        var descEdit = new YAHOO.widget.SimpleEditor('field-message', {
+            height: '150px',
+            width: '522px',
+            dompath: true,
+            animate: true,
+           handleSubmit: true,
+            toolbar: {
+                titlebar: '',
+                buttons: [
+                   { group: 'textstyle', label: ' ',
+                        buttons: [
+                            { type: 'push', label: 'Bold', value: 'bold' },
+                            { type: 'separator' },
+                            { type: 'push', label: 'HTML Link CTRL + SHIFT + 
L', value: 'createlink'}
+                        ]
+                    }
+                ]
+            }
+        });
+        descEdit.render();
+        ]]>
+    </script>
+</xsl:template>

Added: branches/dev-syncromind/bookingfrontend/templates/base/event_edit.xsl
===================================================================
--- branches/dev-syncromind/bookingfrontend/templates/base/event_edit.xsl       
                        (rev 0)
+++ branches/dev-syncromind/bookingfrontend/templates/base/event_edit.xsl       
2015-11-13 23:56:52 UTC (rev 14355)
@@ -0,0 +1,223 @@
+<xsl:template match="data" xmlns:php="http://php.net/xsl";>
+    <div id="content">
+        <ul class="pathway">
+            <li><xsl:value-of select="php:function('lang', 'Edit Events')" 
/></li>
+            <li>#<xsl:value-of select="event/id"/></li>
+        </ul>
+        <xsl:call-template name="msgbox"/>
+        <!--xsl:call-template name="yui_booking_i18n"/-->
+
+        <form action="" method="POST">
+            <div class="pure-g">
+                <div class="pure-u-1">
+                    <dl class="form-col">
+                        <dt class="heading"><xsl:value-of 
select="php:function('lang', 'Why')" /></dt>
+                        <dt><label for="field_activity"><xsl:value-of 
select="php:function('lang', 'Activity')" /></label></dt>
+                        <dd>
+                            <select name="activity_id" id="field_activity">
+                                <option value=""><xsl:value-of 
select="php:function('lang', '-- select an activity --')" /></option>
+                                <xsl:for-each select="activities">
+                                    <option>
+                                        <xsl:if test="../event/activity_id = 
id">
+                                            <xsl:attribute 
name="selected">selected</xsl:attribute>
+                                        </xsl:if>
+                                        <xsl:attribute 
name="value"><xsl:value-of select="id"/></xsl:attribute>
+                                        <xsl:value-of select="name"/>
+                                    </option>
+                                </xsl:for-each>
+                            </select>
+                        </dd>
+                        <div class="clr"/>
+                        <dt><label for="field_public"><xsl:value-of 
select="php:function('lang', 'Event type')"/></label></dt>
+                        <dd>
+                            <select id="field_public" name="is_public">
+                                <option value="1">
+                                    <xsl:if test="event/is_public=1">
+                                        <xsl:attribute 
name="selected">checked</xsl:attribute>
+                                    </xsl:if>
+                                    <xsl:value-of select="php:function('lang', 
'Public event')"/>
+                                </option>
+                                <option value="0">
+                                    <xsl:if test="event/is_public=0">
+                                        <xsl:attribute 
name="selected">checked</xsl:attribute>
+                                    </xsl:if>
+                                    <xsl:value-of select="php:function('lang', 
'Private event')"/>
+                                </option>
+                            </select>
+                        </dd>
+
+                        <div class="clr"/>
+
+                        <dt><label for="field_description"><xsl:value-of 
select="php:function('lang', 'Description')" /></label></dt>
+                        <dd>
+                            <textarea id="field_description" 
class="full-width" name="description"><xsl:value-of 
select="event/description"/></textarea>
+                        </dd>
+                    </dl>
+                </div>
+            </div>
+            <div class="pure-g">
+                <div class="pure-u-1 pure-u-md-1-2 pure-u-lg-1-3">
+                    <dl class="form-col">
+                        <dt class="heading"><xsl:value-of 
select="php:function('lang', 'Where')" /></dt>
+                        <dt><label for="field_building"><xsl:value-of 
select="php:function('lang', 'Building')" /></label></dt>
+                        <dd>
+                            <div class="autocomplete">
+                                <input id="field_building_id" 
name="building_id" type="hidden">
+                                    <xsl:attribute name="value"><xsl:value-of 
select="event/building_id"/></xsl:attribute>
+                                </input>
+                                <input id="field_building_name" 
name="building_name" type="text">
+                                    <xsl:attribute name="value"><xsl:value-of 
select="event/building_name"/></xsl:attribute>
+                                </input>
+                                <div id="building_container"/>
+                            </div>
+                        </dd>
+                        <dt><label for="field_resources"><xsl:value-of 
select="php:function('lang', 'Resources')" /></label></dt>
+                        <dd>
+                            <div id="resources_container"><span 
class="select_first_text"><xsl:value-of select="php:function('lang', 'Select a 
building first')" /></span></div>
+                        </dd>
+                    </dl>
+                </div>
+                <div class="pure-u-1 pure-u-md-1-2 pure-u-lg-1-3">
+                    <dl class="form-col">
+                        <dt class="heading"><xsl:value-of 
select="php:function('lang', 'When')" /></dt>
+                        <dt><label for="field_from"><xsl:value-of 
select="php:function('lang', 'From')" /></label></dt>
+                        <dd>
+                            <xsl:value-of select="event/from_"/><br />
+                            <input name="org_from" 
type="hidden"><xsl:attribute name="value"><xsl:value-of 
select="event/from_"/></xsl:attribute></input>
+                            <!--div class="time-picker">
+                                <input id="field_from" name="from_" 
type="text">
+                                    <xsl:attribute name="value"><xsl:value-of 
select="event/from_"/></xsl:attribute>
+                                </input>
+                            </div-->
+                            <input class="datetime pure-input-2-3" id="from_" 
name="from_" type="text">
+                                <xsl:if test="event/from_ != ''">
+                                    <xsl:attribute name="value"><xsl:value-of 
select="event/from_2" /></xsl:attribute>
+                                </xsl:if>
+                            </input>
+                        </dd>
+                        <dt><label for="field_to"><xsl:value-of 
select="php:function('lang', 'To')" /></label></dt>
+                        <dd>
+                            <xsl:value-of select="event/to_"/><br />
+                            <input name="org_to" type="hidden"><xsl:attribute 
name="value"><xsl:value-of select="event/to_"/></xsl:attribute></input>
+                            <!--div class="time-picker">
+                                <input id="field_to" name="to_" type="text">
+                                    <xsl:attribute name="value"><xsl:value-of 
select="event/to_"/></xsl:attribute>
+                                </input>
+                            </div-->
+                            <input class="datetime pure-input-2-3" id="to_" 
name="to_" type="text">
+                                <xsl:if test="event/to_ != ''">
+                                    <xsl:attribute name="value"><xsl:value-of 
select="event/to_2" /></xsl:attribute>
+                                </xsl:if>
+                            </input>
+                        </dd>
+                    </dl>
+                </div>
+                <div class="pure-u-1 pure-u-md-1-2 pure-u-lg-1-3">
+                    <dl class="form-col">
+                        <dt class="heading"><xsl:value-of 
select="php:function('lang', 'Who')" /></dt>
+                        <dt><label><xsl:value-of select="php:function('lang', 
'Target audience')" /></label></dt>
+                        <dd>
+                            <ul id="audience">
+                                <xsl:for-each select="audience">
+                                    <li>
+                                        <input type="checkbox" 
name="audience[]">
+                                            <xsl:attribute 
name="value"><xsl:value-of select="id"/></xsl:attribute>
+                                            <xsl:if 
test="../event/audience=id">
+                                                <xsl:attribute 
name="checked">checked</xsl:attribute>
+                                            </xsl:if>
+                                        </input>
+                                        <label><xsl:value-of 
select="name"/></label>
+                                    </li>
+                                </xsl:for-each>
+                            </ul>
+                        </dd>
+                        <dt><label for="field_from"><xsl:value-of 
select="php:function('lang', 'Number of participants')" /></label></dt>
+                        <dd>
+                            <table id="agegroup" class="pure-table 
pure-table-bordered">
+                                <thead>
+                                    <tr><th/><th><xsl:value-of 
select="php:function('lang', 'Male')" /></th>
+                                    <th><xsl:value-of 
select="php:function('lang', 'Female')" /></th></tr>
+                                </thead>
+                                <tbody id="agegroup_tbody">
+                                    <xsl:for-each select="agegroups">
+                                        <xsl:variable name="id"><xsl:value-of 
select="id"/></xsl:variable>
+                                        <tr>
+                                            <th><xsl:value-of 
select="name"/></th>
+                                            <td>
+                                                <input type="text">
+                                                    <xsl:attribute 
name="name">male[<xsl:value-of select="id"/>]</xsl:attribute>
+                                                    <xsl:attribute 
name="value"><xsl:value-of select="../event/agegroups/male[../agegroup_id = 
$id]"/></xsl:attribute>
+                                                </input>
+                                            </td>
+                                            <td>
+                                                <input type="text">
+                                                    <xsl:attribute 
name="name">female[<xsl:value-of select="id"/>]</xsl:attribute>
+                                                    <xsl:attribute 
name="value"><xsl:value-of select="../event/agegroups/female[../agegroup_id = 
$id]"/></xsl:attribute>
+                                                </input>
+                                            </td>
+                                        </tr>
+                                    </xsl:for-each>
+                                </tbody>
+                            </table>
+                        </dd>
+                    </dl>
+                </div>
+            </div>
+            <div class="pure-g">
+                <div class="pure-u-1 pure-u-md-1-2 pure-u-lg-1-3">
+                    <dl class="form-col">
+                        <dt class="heading"><xsl:value-of 
select="php:function('lang', 'Contact information')" /></dt>
+                        <dt><label for="field_contact_name"><xsl:value-of 
select="php:function('lang', 'Name')" /></label></dt>
+                        <dd>
+                            <input id="field_contact_name" name="contact_name" 
type="text">
+                                <xsl:attribute name="value"><xsl:value-of 
select="event/contact_name"/></xsl:attribute>
+                            </input>
+                        </dd>
+                        <dt><label for="field_contact_email"><xsl:value-of 
select="php:function('lang', 'Email')" /></label></dt>
+                        <dd>
+                            <input id="field_contact_mail" 
name="contact_email" type="text">
+                                <xsl:attribute name="value"><xsl:value-of 
select="event/contact_email"/></xsl:attribute>
+                            </input>
+                        </dd>
+                        <dt><label for="field_contact_phone"><xsl:value-of 
select="php:function('lang', 'Phone')" /></label></dt>
+                        <dd>
+                            <input id="field_contact_phone" 
name="contact_phone" type="text">
+                                <xsl:attribute name="value"><xsl:value-of 
select="event/contact_phone"/></xsl:attribute>
+                            </input>
+                        </dd>
+                        <dt><label for="field_cost"><xsl:value-of 
select="php:function('lang', 'Cost')" /></label></dt>
+                        <dd>
+                            <input id="field_cost" name="cost" type="text" 
readonly="readonly">
+                                <xsl:attribute name="value"><xsl:value-of 
select="event/cost"/></xsl:attribute>
+                            </input>
+                        </dd>
+                    </dl>
+                </div>
+                <div class="pure-u-1 pure-u-md-1-2 pure-u-lg-1-3">
+                    <dl class="form-col">
+                        <dt class="heading"><xsl:value-of 
select="php:function('lang', 'Invoice information')" /></dt>
+                        <xsl:copy-of 
select="phpgw:booking_customer_identifier(event, '')"/>
+                    </dl>
+                </div>
+            </div>
+
+            <div class="form-buttons">
+                <input type="submit">
+                    <xsl:attribute name="value"><xsl:value-of 
select="php:function('lang', 'Save')"/></xsl:attribute>
+                </input>
+                <a class="cancel">
+                    <xsl:attribute name="href"><xsl:value-of 
select="event/cancel_link"/></xsl:attribute>
+                    <xsl:value-of select="php:function('lang', 'Cancel')" />
+                </a>
+            </div>
+        </form>
+    </div>
+    <script type="text/javascript">
+        var initialSelection = <xsl:value-of select="event/resources_json" />;
+        var lang = <xsl:value-of select="php:function('js_lang', 'Name', 
'Resources Type')" />;
+    </script>
+    <!--script type="text/javascript">
+        YAHOO.booking.initialSelection = <xsl:value-of 
select="event/resources_json"/>;
+        var lang = <xsl:value-of select="php:function('js_lang', 'Resource 
Type')"/>;
+    </script-->
+</xsl:template>




reply via email to

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