fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [13952] fixing forms


From: Saul
Subject: [Fmsystem-commits] [13952] fixing forms
Date: Thu, 17 Sep 2015 00:15:12 +0000

Revision: 13952
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13952
Author:   psaul
Date:     2015-09-17 00:15:11 +0000 (Thu, 17 Sep 2015)
Log Message:
-----------
fixing forms

Modified Paths:
--------------
    branches/dev-syncromind/booking/inc/class.uiallocation.inc.php
    branches/dev-syncromind/booking/inc/class.uiapplication.inc.php
    branches/dev-syncromind/booking/js/booking/allocation.js
    branches/dev-syncromind/booking/js/booking/application.js
    branches/dev-syncromind/booking/templates/base/allocation_delete.xsl
    branches/dev-syncromind/booking/templates/base/allocation_edit.xsl
    branches/dev-syncromind/booking/templates/base/application_edit.xsl
    branches/dev-syncromind/booking/templates/base/application_new.xsl
    branches/dev-syncromind/booking/templates/base/building.xsl

Modified: branches/dev-syncromind/booking/inc/class.uiallocation.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uiallocation.inc.php      
2015-09-17 00:07:41 UTC (rev 13951)
+++ branches/dev-syncromind/booking/inc/class.uiallocation.inc.php      
2015-09-17 00:15:11 UTC (rev 13952)
@@ -501,10 +501,10 @@
                        $repeat_until = phpgw::get_var('repeat_until', 'GET');
                        $field_interval = 
intval(phpgw::get_var('field_interval', 'GET'));
                        $allocation = $this->bo->read_single($id);
-               $season = 
$this->season_bo->read_single($allocation['season_id']);
+                        $season = 
$this->season_bo->read_single($allocation['season_id']);
                        $step = phpgw::get_var('step', 'str', 'POST');
-               if (! isset($step)) $step = 1;
-            $errors = array();
+                        if (! isset($step)) $step = 1;
+                        $errors = array();
                        $invalid_dates = array();
                        $valid_dates = array();
 
@@ -515,93 +515,100 @@
                                $to_date = $_POST['to_'];
 
                                if ($_POST['recurring'] != 'on' && 
$_POST['outseason'] != 'on' )
-                {
+                                {
 
-                    $err  = $this->bo->so->check_for_booking($id);
-                    if ($err)
-                    {
-                           $errors['booking'] = lang('Could not delete 
allocation due to a booking still use it');
-                    }
-                    else
-                    {
-                        $err = $this->bo->so->delete_allocation($id);
-                        $this->redirect(array('menuaction' => 
'booking.uimassbooking.schedule', 'id'=>$allocation['building_id']));
-                    }
-                } 
-                else
-                { 
-                       $step++;
-                                       if ($_POST['recurring'] == 'on') {
-                                               $repeat_until = 
strtotime($_POST['repeat_until'])+60*60*24; 
-                                       } 
-                                       else
-                                       {
-                                               $repeat_until = 
strtotime($season['to_'])+60*60*24; 
-                                               $_POST['repeat_until'] = 
$season['to_'];
-                                       } 
+                                    $err  = 
$this->bo->so->check_for_booking($id);
+                                    if ($err)
+                                    {
+                                            $errors['booking'] = lang('Could 
not delete allocation due to a booking still use it');
+                                    }
+                                    else
+                                    {
+                                        $err = 
$this->bo->so->delete_allocation($id);
+                                        $this->redirect(array('menuaction' => 
'booking.uimassbooking.schedule', 'id'=>$allocation['building_id']));
+                                    }
+                                } 
+                                else
+                                { 
+                                        $step++;
+                                        if ($_POST['recurring'] == 'on') {
+                                                $repeat_until = 
strtotime($_POST['repeat_until'])+60*60*24; 
+                                        } 
+                                        else
+                                        {
+                                                $repeat_until = 
strtotime($season['to_'])+60*60*24; 
+                                                $_POST['repeat_until'] = 
$season['to_'];
+                                        } 
 
-                                       $max_dato = strtotime($_POST['to_']); 
// highest date from input
-                                       $interval = 
$_POST['field_interval']*60*60*24*7; // weeks in seconds
-                                       $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.
+                                        $max_dato = strtotime($_POST['to_']); 
// highest date from input
+                                        $interval = 
$_POST['field_interval']*60*60*24*7; // weeks in seconds
+                                        $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));
-                                               $todate = date('Y-m-d H:i', 
strtotime($_POST['to_']) + ($interval*$i));
-                                               $allocation['from_'] = 
$fromdate;
-                                               $allocation['to_'] = $todate;
+                                        while (($max_dato+($interval*$i)) <= 
$repeat_until)
+                                        {
+                                                $fromdate = date('Y-m-d H:i', 
strtotime($_POST['from_']) + ($interval*$i));
+                                                $todate = date('Y-m-d H:i', 
strtotime($_POST['to_']) + ($interval*$i));
+                                                $allocation['from_'] = 
$fromdate;
+                                                $allocation['to_'] = $todate;
 
-                        $id = $this->bo->so->get_allocation_id($allocation);
-                                               if ($id)
-                                               {
-                                                  $err  = 
$this->bo->so->check_for_booking($id);
-                                               }
-                                               else 
-                                               {
-                                                  $err = true;
-                                               }
+                                                $id = 
$this->bo->so->get_allocation_id($allocation);
+                                                if ($id)
+                                                {
+                                                   $err  = 
$this->bo->so->check_for_booking($id);
+                                                }
+                                                else 
+                                                {
+                                                   $err = true;
+                                                }
 
-                               if ($err) 
-                                               {
-                                                       
$invalid_dates[$i]['from_'] = $fromdate;
-                                                       
$invalid_dates[$i]['to_'] = $todate;
-                                               } 
-                                               else 
-                                               {
-                                                       
$valid_dates[$i]['from_'] = $fromdate;
-                                                       $valid_dates[$i]['to_'] 
= $todate;
-                                                       if ($step == 3)
-                                                       {
-                                $stat = $this->bo->so->delete_allocation($id);
-                            }                            
-                        }
-                                               $i++;
-                    }
-                                       if ($step == 3) 
-                                       {
-                                               
$this->redirect(array('menuaction' => 'booking.uimassbooking.schedule', 
'id'=>$allocation['building_id']));
-                                       }
-                }
+                                                if ($err) 
+                                                {
+                                                        
$invalid_dates[$i]['from_'] = $fromdate;
+                                                        
$invalid_dates[$i]['to_'] = $todate;
+                                                } 
+                                                else 
+                                                {
+                                                        
$valid_dates[$i]['from_'] = $fromdate;
+                                                        
$valid_dates[$i]['to_'] = $todate;
+                                                        if ($step == 3)
+                                                        {
+                                                            $stat = 
$this->bo->so->delete_allocation($id);
+                                                        }                      
      
+                                                }
+                                                $i++;
+                                        }
+                                        if ($step == 3) 
+                                        {
+                                                
$this->redirect(array('menuaction' => 'booking.uimassbooking.schedule', 
'id'=>$allocation['building_id']));
+                                        }
+                                }
                        }
                        $this->flash_form_errors($errors);
                        self::add_javascript('booking', 'booking', 
'allocation.js');
                        $allocation['resources_json'] = 
json_encode(array_map('intval', $allocation['resources']));
                        $allocation['cancel_link'] = 
self::link(array('menuaction' => 'booking.uiallocation.show', 'id' => 
$allocation['id']));
                        $allocation['application_link'] = 
self::link(array('menuaction' => 'booking.uiapplication.show', 'id' => 
$allocation['application_id']));
-
+                        
+                        $tabs = array();
+                        $tabs['generic'] = array('label' => lang('Allocation 
Delete'), 'link' => '#allocation_delete');
+                        $active_tab = 'generic';
+                        $allocation['tabs'] = 
phpgwapi_jquery::tabview_generate($tabs, $active_tab);
+                        
+                        
$GLOBALS['phpgw']->jqcal->add_listener('field_repeat_until', 'datetime');
+                        
                        if ($step < 2) 
-            {
-                       self::render_template('allocation_delete', 
array('allocation' => $allocation,
-                                       'recurring' => $recurring,
-                                       'outseason' => $outseason,
-                                       'interval' => $field_interval,
-                                       'repeat_until' => $repeat_until,
-                ));
-            }
+                        {
+                                self::render_template('allocation_delete', 
array('allocation' => $allocation,
+                                                'recurring' => $recurring,
+                                                'outseason' => $outseason,
+                                                'interval' => $field_interval,
+                                                'repeat_until' => 
$repeat_until,
+                                ));
+                        }
                        elseif ($step == 2) 
-            {
+                        {
                                
self::render_template('allocation_delete_preview', array('allocation' => 
$allocation,
                                        'step' => $step,
                                        'recurring' => $_POST['recurring'],
@@ -613,7 +620,7 @@
                                        'valid_dates' => $valid_dates,
                                        'invalid_dates' => $invalid_dates
                                ));
-            }                
+                        }                
                }
                
                public function show()

Modified: branches/dev-syncromind/booking/inc/class.uiapplication.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uiapplication.inc.php     
2015-09-17 00:07:41 UTC (rev 13951)
+++ branches/dev-syncromind/booking/inc/class.uiapplication.inc.php     
2015-09-17 00:15:11 UTC (rev 13952)
@@ -793,11 +793,11 @@
                }
 
                public function edit()
-               {       
+               {
                        $id = intval(phpgw::get_var('id', 'GET'));
                        $application = $this->bo->read_single($id);
                        
-                       
$this->check_application_assigned_to_current_user($application);
+//                     
$this->check_application_assigned_to_current_user($application);
                        
                        $building_info = $this->bo->so->get_building_info($id);
                        $application['building_id'] = $building_info['id'];
@@ -846,7 +846,7 @@
                                }
                        }
                        $this->flash_form_errors($errors);
-//                     self::add_javascript('booking', 'booking', 
'application.js');
+                       self::add_javascript('booking', 'booking', 
'application.js');
                        self::add_javascript('booking', 'booking', 
'adddatetimepicker.js');
                        $this->set_case_officer($application);
                        
@@ -863,12 +863,12 @@
                        $application['customer_identifier_types']['ssn'] = 
'Date of birth or SSN';
                         //test
             
-            $GLOBALS['phpgw']->jqcal->add_listener('start_date', 'datetime');
-                       $GLOBALS['phpgw']->jqcal->add_listener('end_date', 
'datetime');
-//                     self::render_template('application_edit', 
array('application' => $application, 'activities' => $activities, 'agegroups' 
=> $agegroups, 'audience' => $audience));
-            $application['tabs'] = phpgwapi_jquery::tabview_generate($tabs, 
$active_tab);
-            
-            self::render_template_xsl('application_edit', array('application' 
=> $application, 'activities' => $activities, 'agegroups' => $agegroups, 
'audience' => $audience));
+                        $GLOBALS['phpgw']->jqcal->add_listener('start_date', 
'datetime');
+                                    
$GLOBALS['phpgw']->jqcal->add_listener('end_date', 'datetime');
+            //                 self::render_template('application_edit', 
array('application' => $application, 'activities' => $activities, 'agegroups' 
=> $agegroups, 'audience' => $audience));
+                        $application['tabs'] = 
phpgwapi_jquery::tabview_generate($tabs, $active_tab);
+
+                        self::render_template_xsl('application_edit', 
array('application' => $application, 'activities' => $activities, 'agegroups' 
=> $agegroups, 'audience' => $audience));
                }
 
                private function check_date_availability(&$allocation)

Modified: branches/dev-syncromind/booking/js/booking/allocation.js
===================================================================
--- branches/dev-syncromind/booking/js/booking/allocation.js    2015-09-17 
00:07:41 UTC (rev 13951)
+++ branches/dev-syncromind/booking/js/booking/allocation.js    2015-09-17 
00:15:11 UTC (rev 13952)
@@ -1,40 +1,48 @@
-
-
-
+var building_id_selection = "";
 $(document).ready(function() {
     
JqueryPortico.autocompleteHelper('index.php?menuaction=booking.uibuilding.index&phpgw_return_as=json&',
 
                                                   'field_building_name', 
'field_building_id', 'building_container');
 
-
     
JqueryPortico.autocompleteHelper('index.php?menuaction=booking.uiorganization.index&phpgw_return_as=json&',
 
                                          'field_org_name', 'field_org_id', 
'org_container');
+    
+    
 });
 
 
 $(window).load(function() {
+    var building_id = $('#field_building_id').val();
+    if(building_id) {
+        populateSelectSeason(building_id, season_id);
+        populateTableChkResources(building_id, initialSelection);
+        building_id_selection = building_id;
+    }
     $("#field_building_name").on("autocompleteselect", function(event, ui){
-        var building_id = ui.item.value;
-        populateSelectSeason(building_id);
-        populateTableChkResources(building_id)
+        var building_id = ui.item.value;        
+        if (building_id != building_id_selection){
+            populateSelectSeason(building_id, season_id);
+            populateTableChkResources(building_id, initialSelection);
+            building_id_selection = building_id;
+        }
     });
 });
 
-function populateSelectSeason (building_id) {
+function populateSelectSeason (building_id, selection) {
     var url = 
'index.php?menuaction=booking.uiseason.index&sort=name&filter_building_id=' +  
building_id + '&phpgw_return_as=json&';
     var container = $('#season_container');
-    populateSelect(url, container);    
+    populateSelect(url, selection, container);    
 }
-function populateTableChkResources (building_id) {
+function populateTableChkResources (building_id, initialSelection) {
     var url = 
'index.php?menuaction=booking.uiresource.index&sort=name&filter_building_id=' + 
 building_id + '&phpgw_return_as=json&'
     var container = 'resources_container';
-    populateTableChk(url, container)
+    var colDefsResources = [{label: '', object: [{type: 'input', attrs: 
[{name: 'type', value: 'checkbox'},{name: 'name', value: 'resources[]'}]}], 
value: 'id', checked: initialSelection},{key: 'name', label: lang['Name']}, 
{key: 'type', label: lang['Resource Type']}];
+    populateTableChk(url, container, colDefsResources)
 }
 
-function populateTableChk (url, container) {
-    var colDefsResources = [{label: '', object: [{type: 'checkbox', name: 
'resources[]', value: 'id'}]},{key: 'name', label: lang['Name']}, {key: 'type', 
label: lang['Resource Type']}];
-    createTable(container,url,colDefsResources);
+function populateTableChk (url, container, colDefs) {    
+    createTable(container,url,colDefs);
 }
-function populateSelect (url, container) {
+function populateSelect (url, selection, container) {
     container.html("");
     var select = document.createElement('select');
     var option = document.createElement('option');
@@ -47,6 +55,9 @@
             var option = document.createElement('option');
             option.text = value.name;
             option.setAttribute('value', value.id);
+            if(value.id == selection) {
+                    option.selected = true;
+            }
             select.appendChild(option);
         });
     });

Modified: branches/dev-syncromind/booking/js/booking/application.js
===================================================================
--- branches/dev-syncromind/booking/js/booking/application.js   2015-09-17 
00:07:41 UTC (rev 13951)
+++ branches/dev-syncromind/booking/js/booking/application.js   2015-09-17 
00:15:11 UTC (rev 13952)
@@ -1,3 +1,16 @@
+$(window).load(function(){
+    building_id = $('#field_building_id').val();
+    var url = 
'index.php?menuaction=booking.uidocument_view.regulations&sort=name&phpgw_return_as=json&owner[]=building::'+building_id;
+    var colDefs = [{key: 'name', label: lang['Name'], formatter: genericLink}];
+    createTable('regulation_documents',url,colDefs);
+});
+
+
+
+
+
+
+/*
 YAHOO.booking.RegulationsTable = function() { 
        this.building_id = null;
        this.resources = [];
@@ -146,3 +159,4 @@
 
 });
 
+*/
\ No newline at end of file

Modified: branches/dev-syncromind/booking/templates/base/allocation_delete.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/allocation_delete.xsl        
2015-09-17 00:07:41 UTC (rev 13951)
+++ branches/dev-syncromind/booking/templates/base/allocation_delete.xsl        
2015-09-17 00:15:11 UTC (rev 13952)
@@ -1,126 +1,138 @@
 <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 
allocation')"/></dt>
-       </dl>
     <xsl:call-template name="msgbox"/>
-       <xsl:call-template name="yui_booking_i18n"/>
-       <dl class="form">
-       <dd><xsl:value-of select="php:function('lang', 'Delete 
Information')"/></dd>
-       <dd><xsl:value-of select="php:function('lang', 'Delete 
Information2')"/></dd>
-       </dl>
-    <form action="" method="POST">
-               <input type="hidden" name="application_id" 
value="{allocation/application_id}"/>
-        <input id="field_org_id" name="organization_id" type="hidden" 
value="{allocation/organization_id}" />
-        <input id="field_building_id" name="building_id" type="hidden" 
value="{allocation/building_id}" />
-        <input id="field_from" name="from_" type="hidden" 
value="{allocation/from_}" />
-        <input id="field_to" name="to_" type="hidden" value="{allocation/to_}" 
/>
+       <!--xsl:call-template name="yui_booking_i18n"/-->
+    <form action="" method="POST" id='form'  class="pure-form 
pure-form-aligned" name="form">
+        <fieldset>
+            <input type="hidden" name="tab" value=""/>
+            <div id="tab-content">
+                <xsl:value-of disable-output-escaping="yes" 
select="allocation/tabs"/>
+                <div id="allocation_delete">
+                    <div class="heading">
+                        <legend><h3><xsl:value-of select="php:function('lang', 
'Delete allocation')"/></h3></legend>
+                    </div>
+                    
+                        <div class="pure-control-group">
+                            <h4><xsl:value-of select="php:function('lang', 
'Delete Information')"/></h4>
+                            <h4><xsl:value-of select="php:function('lang', 
'Delete Information2')"/></h4>
+                        </div>
+                        <div class="pure-control-group">
+                            <input type="hidden" name="application_id" 
value="{allocation/application_id}"/>
+                            <input id="field_org_id" name="organization_id" 
type="hidden" value="{allocation/organization_id}" />
+                            <input id="field_building_id" name="building_id" 
type="hidden" value="{allocation/building_id}" />
+                            <input id="field_from" name="from_" type="hidden" 
value="{allocation/from_}" />
+                            <input id="field_to" name="to_" type="hidden" 
value="{allocation/to_}" />
+                        </div>
+                        <div class="pure-control-group">
+                            <label for="field_building" 
style="vertical-align:top;">
+                                <h4><xsl:value-of select="php:function('lang', 
'Building')" /></h4>
+                            </label>
+                            <div class="autocomplete" 
style="display:inline-block;">
+                                <xsl:value-of 
select="allocation/building_name"/>
+                            </div>
+                        </div>
+                        <div class="pure-control-group">
+                            <label for="field_org" style="vertical-align:top;">
+                                <h4><xsl:value-of select="php:function('lang', 
'Organization')" /></h4>
+                            </label>
+                            <div class="autocomplete" 
style="display:inline-block;">
+                                <xsl:value-of 
select="allocation/organization_name"/>
+                            </div>
+                        </div>
+                        <div class="pure-control-group">
+                            <label for="field_from" 
style="vertical-align:top;">
+                                <h4><xsl:value-of select="php:function('lang', 
'From')" /></h4>
+                            </label>
+                            <div style="display:inline-block;">
+                                <xsl:value-of select="allocation/from_"/>
+                            </div>
+                        </div>
+                        <div class="pure-control-group">
+                            <label for="field_to" style="vertical-align:top;">
+                                <h4><xsl:value-of select="php:function('lang', 
'To')" /></h4>
+                            </label>
+                            <div style="display:inline-block;">
+                                <xsl:value-of select="allocation/to_"/>
+                            </div>
+                        </div>
+                        <div class="pure-control-group">                       
     
+                            <label for="field_repeat_until" 
style="vertical-align:top;">
+                                <h4><xsl:value-of select="php:function('lang', 
'Recurring allocation deletion')" /></h4>
+                            </label>
+                            <div style="display:inline-block;">
+                                <div>
+                                    <label style="display: block 
!important;text-align: left !important;">
+                                        <input type="checkbox" 
name="outseason" id="outseason">
+                                            <xsl:if test="outseason='on'">
+                                                <xsl:attribute 
name="checked">checked</xsl:attribute>
+                                            </xsl:if>
+                                        </input>
+                                        <xsl:value-of 
select="php:function('lang', 'Out season')" />
+                                    </label>
+                                    <label style="display: block 
!important;text-align: left !important;">
+                                        <input type="checkbox" 
name="recurring" id="recurring">
+                                            <xsl:if test="recurring='on'">
+                                                <xsl:attribute 
name="checked">checked</xsl:attribute>
+                                            </xsl:if>
+                                        </input>
+                                        <xsl:value-of 
select="php:function('lang', 'Delete until')" />
+                                    </label>
+                                </div>
+                                <div>
+                                    <input class="datetime" 
id="field_repeat_until" name="repeat_until" type="text">
+                                        <xsl:attribute 
name="value"><xsl:value-of select="repeat_until"/></xsl:attribute>
+                                    </input>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="pure-control-group">
+                            <label>
+                                <h4><xsl:value-of select="php:function('lang', 
'Interval')" /></h4>
+                            </label>
+                            <xsl:value-of select="../field_interval" />
+                            <select id="field_interval" name="field_interval">
+                                <option value="1">
+                                    <xsl:if test="interval=1">
+                                        <xsl:attribute 
name="selected">selected</xsl:attribute>
+                                    </xsl:if>
+                                    <xsl:value-of select="php:function('lang', 
'1 week')" />
+                                </option>
+                                <option value="2">
+                                    <xsl:if test="interval=2">
+                                        <xsl:attribute 
name="selected">selected</xsl:attribute>
+                                    </xsl:if>
+                                    <xsl:value-of select="php:function('lang', 
'2 weeks')" />
+                                </option>
+                                <option value="3">
+                                    <xsl:if test="interval=3">
+                                        <xsl:attribute 
name="selected">selected</xsl:attribute>
+                                    </xsl:if>
+                                    <xsl:value-of select="php:function('lang', 
'3 weeks')" />
+                                </option>
+                                <option value="4">
+                                    <xsl:if test="interval=4">
+                                        <xsl:attribute 
name="selected">selected</xsl:attribute>
+                                    </xsl:if>
+                                    <xsl:value-of select="php:function('lang', 
'4 weeks')" />
+                                </option>
+                            </select>
+                        </div>
 
-        <dl class="form-col">
-
-            <dt><label for="field_building"><xsl:value-of 
select="php:function('lang', 'Building')" /></label></dt>
-            <dd>
-                <div class="autocomplete">
-                        <xsl:value-of select="allocation/building_name"/>
                 </div>
-            </dd>
-
-
-            <dt><label for="field_from"><xsl:value-of 
select="php:function('lang', 'From')" /></label></dt>
-            <dd>
-                <div>
-                    <xsl:value-of select="allocation/from_"/>
-                </div>
-            </dd>
-                       <dd>
-                <div> </div>
-                       </dd>
-                       <dt><label for="field_repeat_until"><xsl:value-of 
select="php:function('lang', 'Recurring allocation deletion')" /></label></dt>
-                       <dd>
-                               <label>
-                                       <input type="checkbox" name="outseason" 
id="outseason">
-                                               <xsl:if test="outseason='on'">
-                                                       <xsl:attribute 
name="checked">checked</xsl:attribute>
-                                               </xsl:if>
-                                       </input>
-                                       <xsl:value-of 
select="php:function('lang', 'Out season')" />
-                               </label>
-                       </dd>
-                       <dd>
-                               <label>
-                                       <input type="checkbox" name="recurring" 
id="recurring">
-                                               <xsl:if test="recurring='on'">
-                                                       <xsl:attribute 
name="checked">checked</xsl:attribute>
-                                               </xsl:if>
-                                       </input>
-                                       <xsl:value-of 
select="php:function('lang', 'Delete until')" />
-                               </label>
-                       </dd>
-                       <dd class="date-picker">
-                               <input id="field_repeat_until" 
name="repeat_until" type="text">
-                                       <xsl:attribute 
name="value"><xsl:value-of select="repeat_until"/></xsl:attribute>
-                               </input>
-                       </dd>
-                       <dt><xsl:value-of select="php:function('lang', 
'Interval')" /></dt>
-                       <dd>
-                               <xsl:value-of select="../field_interval" />
-                               <select id="field_interval" 
name="field_interval">
-                                       <option value="1">
-                                               <xsl:if test="interval=1">
-                                                       <xsl:attribute 
name="selected">selected</xsl:attribute>
-                                               </xsl:if>
-                                               <xsl:value-of 
select="php:function('lang', '1 week')" />
-                                       </option>
-                                       <option value="2">
-                                               <xsl:if test="interval=2">
-                                                       <xsl:attribute 
name="selected">selected</xsl:attribute>
-                                               </xsl:if>
-                                               <xsl:value-of 
select="php:function('lang', '2 weeks')" />
-                                       </option>
-                                       <option value="3">
-                                               <xsl:if test="interval=3">
-                                                       <xsl:attribute 
name="selected">selected</xsl:attribute>
-                                               </xsl:if>
-                                               <xsl:value-of 
select="php:function('lang', '3 weeks')" />
-                                       </option>
-                                       <option value="4">
-                                               <xsl:if test="interval=4">
-                                                       <xsl:attribute 
name="selected">selected</xsl:attribute>
-                                               </xsl:if>
-                                               <xsl:value-of 
select="php:function('lang', '4 weeks')" />
-                                       </option>
-                               </select>
-                       </dd>
-        </dl>
-        <dl class="form-col">
-            <dt><label for="field_org"><xsl:value-of 
select="php:function('lang', 'Organization')" /></label></dt>
-            <dd>
-                <div class="autocomplete">
-                        <xsl:value-of select="allocation/organization_name"/>
-                </div>
-            </dd>
-            <dt><label for="field_to"><xsl:value-of 
select="php:function('lang', 'To')" /></label></dt>
-            <dd>
-                <div>
-                    <xsl:value-of select="allocation/to_"/>
-                </div>
-            </dd>
-        </dl>
+            </div>
+        </fieldset>
         <div class="form-buttons">
-            <input type="submit">
-                               <xsl:attribute name="value"><xsl:value-of 
select="php:function('lang', 'Delete')"/></xsl:attribute>
-                       </input>
+            <input type="submit" class="pure-button pure-button-primary">
+                <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="allocation/cancel_link"/></xsl:attribute>
                 <xsl:value-of select="php:function('lang', 'Cancel')" />
             </a>
         </div>
     </form>
-    </div>
     <script type="text/javascript">
         YAHOO.booking.season_id = '<xsl:value-of 
select="allocation/season_id"/>';
         YAHOO.booking.initialSelection = <xsl:value-of 
select="allocation/resources_json"/>;
-               var lang = <xsl:value-of select="php:function('js_lang', 
'Resource Type')"/>;
+        var lang = <xsl:value-of select="php:function('js_lang', 'Resource 
Type')"/>;
     </script>
 </xsl:template>

Modified: branches/dev-syncromind/booking/templates/base/allocation_edit.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/allocation_edit.xsl  
2015-09-17 00:07:41 UTC (rev 13951)
+++ branches/dev-syncromind/booking/templates/base/allocation_edit.xsl  
2015-09-17 00:15:11 UTC (rev 13952)
@@ -57,16 +57,16 @@
                             </select>
                         </div>
                         <div class="pure-control-group">
-                            <label>
+                            <label style="vertical-align:top;">
                                 <h4><xsl:value-of select="php:function('lang', 
'Season')" /></h4>
                             </label>
-                            <xsl:value-of select="php:function('lang', 'Select 
a building first')" />
+                            <div id="season_container" 
style="display:inline-block;"><xsl:value-of select="php:function('lang', 
'Select a building first')" /></div>
                         </div>
                         <div class="pure-control-group">    
-                            <label>
+                            <label style="vertical-align:top;">
                                 <h4><xsl:value-of select="php:function('lang', 
'Resources')" /></h4>
                             </label>
-                            <xsl:value-of select="php:function('lang', 'Select 
a building first')" />
+                            <div id="resources_container" 
style="display:inline-block;"><xsl:value-of select="php:function('lang', 
'Select a building first')" /></div>
                         </div>
                         <div class="pure-control-group">
                             <label for="field_org_name">
@@ -111,7 +111,7 @@
                             <label for="field_mail">
                                 <h4><xsl:value-of select="php:function('lang', 
'Inform contact persons')" /></h4>
                             </label>
-                            <p style="display: inline-block;">
+                            <p style="display: inline-block;max-width:80%;">
                                 <span><xsl:value-of 
select="php:function('lang', 'Text written in the text area below will be sent 
as an email to all registered contact persons.')" /></span>
                                 <textarea id="field_mail" name="mail" 
class="full-width" style="display: block;"></textarea>
                             </p>
@@ -130,6 +130,11 @@
             </div>
     </form>
     <!--/div-->
+    <script type="text/javascript">
+        var season_id = '<xsl:value-of select="allocation/season_id"/>';
+        var initialSelection = <xsl:value-of 
select="allocation/resources_json"/>;
+        var lang = <xsl:value-of select="php:function('js_lang', 'Name', 
'Resource Type')"/>;
+    </script>
     <!--script type="text/javascript">
         YAHOO.booking.season_id = '<xsl:value-of 
select="allocation/season_id"/>';
         YAHOO.booking.initialSelection = <xsl:value-of 
select="allocation/resources_json"/>;

Modified: branches/dev-syncromind/booking/templates/base/application_edit.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/application_edit.xsl 
2015-09-17 00:07:41 UTC (rev 13951)
+++ branches/dev-syncromind/booking/templates/base/application_edit.xsl 
2015-09-17 00:15:11 UTC (rev 13952)
@@ -3,11 +3,9 @@
         #agegroup td {padding: 0 0.3em;}
     </style>
        <!--div id="content"-->
-
        <h3></h3>
        <xsl:call-template name="msgbox"/>
        <!--xsl:call-template name="yui_booking_i18n"/-->
-
        <form action="" method="POST" id='application_form' class= "pure-form 
pure-form-stacked" name="application_form">
             <input type="hidden" name="tab" value=""/>
             <div id="tab-content">
@@ -263,6 +261,7 @@
        </form>
         <script type="text/javascript">
             
$('#field_customer_identifier_type,#field_customer_ssn,#field_customer_organization_number').removeClass('pure-input-1').addClass('pure-u-1
 pure-u-sm-1-2 pure-u-md-1');
+            var lang = <xsl:value-of select="php:function('js_lang', 'From', 
'To', 'Resource Type', 'Name', 'Accepted', 'Document', 'You must accept to 
follow all terms and conditions of lease first.')"/>;
         </script>
        <!--/div-->
        <!--script type="text/javascript">

Modified: branches/dev-syncromind/booking/templates/base/application_new.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/application_new.xsl  
2015-09-17 00:07:41 UTC (rev 13951)
+++ branches/dev-syncromind/booking/templates/base/application_new.xsl  
2015-09-17 00:15:11 UTC (rev 13952)
@@ -1,11 +1,8 @@
 <xsl:template match="data" xmlns:php="http://php.net/xsl";>
     <style type="text/css">
-        
-        #agegroup td {padding: 0 0.3em;}        
-        
+        #agegroup td {padding: 0 0.3em;}
         #field_customer_ssn {display:none;}
-        #field_customer_organization_number {display:none;}
-        
+        #field_customer_organization_number {display:none;}        
     </style>
     <!--div id="content">
         <h3><xsl:value-of select="php:function('lang', 'New 
application')"/></h3-->

Modified: branches/dev-syncromind/booking/templates/base/building.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/building.xsl 2015-09-17 
00:07:41 UTC (rev 13951)
+++ branches/dev-syncromind/booking/templates/base/building.xsl 2015-09-17 
00:15:11 UTC (rev 13952)
@@ -192,9 +192,9 @@
     var documentsURL     = 
'index.php?menuaction=booking.uidocument_building.index&sort=name&filter_owner_id='
 + building_id + '&phpgw_return_as=json&';
     var permissionsURL   = 
'index.php?menuaction=booking.uipermission_building.index&sort=name&filter_object_id='
 + building_id + '&phpgw_return_as=json&';
     ]]>
-    var colDefsResources = [{key: 'sort', label: lang['Sort order']},{key: 
'name', label: lang['Name'], genericLink}, {key: 'type', label: lang['Resource 
Type']}];
+    var colDefsResources = [{key: 'sort', label: lang['Sort order']},{key: 
'name', label: lang['Name'], formatter: genericLink}, {key: 'type', label: 
lang['Resource Type']}];
     var colDefsDocuments = [{key: 'name', label: lang['Name'], formatter: 
genericLink}, {key: 'category', label: lang['Category']}, {key: 'actions', 
label: lang['Actions'], formatter: genericLink(lang['Edit'], lang['Delete'])}];
-    var colDefsPermissions = [{key: 'subject_name', label: lang['Account']}, 
{key: 'role', label: lang['Role']}, {key: 'actions', label: lang['Actions'], 
formatter: genericLink(lang['Edit'], lang['Delete'])}];
+    var colDefsPermissions = [{key: 'subject_name', label: lang['Account']}, 
{key: 'role', label: lang['Role']}, {key: 'actions', label: lang['Actions'], 
formatter: genericLink({name: 'edit', label: 'Edit'}, lang['Delete'])}];
     
     createTable('resources_container',resourcesURL,colDefsResources);
     createTable('documents_container',documentsURL,colDefsDocuments);




reply via email to

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