fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [16187] more on eventplanner


From: sigurdne
Subject: [Fmsystem-commits] [16187] more on eventplanner
Date: Tue, 24 Jan 2017 10:09:10 -0500 (EST)

Revision: 16187
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16187
Author:   sigurdne
Date:     2017-01-24 10:09:10 -0500 (Tue, 24 Jan 2017)
Log Message:
-----------
more on eventplanner

Modified Paths:
--------------
    trunk/eventplanner/inc/model/class.booking.inc.php
    trunk/eventplanner/setup/phpgw_no.lang
    trunk/eventplanner/templates/base/application.xsl
    trunk/eventplanner/templates/base/application_info.xsl
    trunk/eventplanner/templates/base/booking.xsl
    trunk/eventplanner/templates/base/customer.xsl
    trunk/eventplanner/templates/base/vendor.xsl
    trunk/eventplannerfrontend/index.php
    trunk/eventplannerfrontend/js/portico/validate.js
    trunk/eventplannerfrontend/login.php
    trunk/eventplannerfrontend/logout.php
    trunk/eventplannerfrontend/templates/base/application.xsl
    trunk/eventplannerfrontend/templates/base/application_info.xsl
    trunk/eventplannerfrontend/templates/base/booking.xsl
    trunk/eventplannerfrontend/templates/base/customer.xsl
    trunk/eventplannerfrontend/templates/base/vendor.xsl
    trunk/phpgwapi/templates/bookingfrontend/head.inc.php

Added Paths:
-----------
    trunk/eventplannerfrontend/home.php

Modified: trunk/eventplanner/inc/model/class.booking.inc.php
===================================================================
--- trunk/eventplanner/inc/model/class.booking.inc.php  2017-01-24 15:08:08 UTC 
(rev 16186)
+++ trunk/eventplanner/inc/model/class.booking.inc.php  2017-01-24 15:09:10 UTC 
(rev 16187)
@@ -268,8 +268,17 @@
 
                        $bookings =  
eventplanner_sobooking::get_instance()->read($params);
 
-                       if((int)$bookings['total_records'] >= 
(int)$application->num_granted_events)
+                       if($entity->customer_id)
                        {
+                               $test_total_tecords = 
(int)$bookings['total_records'];
+                       }
+                       else
+                       {
+                               $test_total_tecords = 
(int)$bookings['total_records'] + 1;
+                       }
+
+                       if($test_total_tecords > 
(int)$application->num_granted_events)
+                       {
                                $errors['num_granted_events'] = lang('maximum 
of granted events are reached');
                        }
 

Modified: trunk/eventplanner/setup/phpgw_no.lang
===================================================================
--- trunk/eventplanner/setup/phpgw_no.lang      2017-01-24 15:08:08 UTC (rev 
16186)
+++ trunk/eventplanner/setup/phpgw_no.lang      2017-01-24 15:09:10 UTC (rev 
16187)
@@ -22,12 +22,14 @@
 rejected       eventplanner    no      Avvist
 approved       eventplanner    no      Godkjent
 vendor eventplanner    no      Utøver
+vendor name    eventplanner    no      Navn på utøver/utøvergruppe
+vendor description     eventplanner    no      Beskrivelse av utøver
 new    eventplanner    no      Ny
 show   eventplanner    no      vis
 history        eventplanner    no      Historikk
 date start     eventplanner    no      Første arrangementsdato
 date end       eventplanner    no      Siste arrangementsdato
-contact name   eventplanner    no      Kontaktperson
+contact name   eventplanner    no      Navn kontaktperson
 contact email  eventplanner    no      Epost kontaktperson
 contact phone  eventplanner    no      Tlf. kontaktperson
 case officer   eventplanner    no      Saksbehandler

Modified: trunk/eventplanner/templates/base/application.xsl
===================================================================
--- trunk/eventplanner/templates/base/application.xsl   2017-01-24 15:08:08 UTC 
(rev 16186)
+++ trunk/eventplanner/templates/base/application.xsl   2017-01-24 15:09:10 UTC 
(rev 16187)
@@ -113,7 +113,7 @@
                                                        </div>
                                                        <div 
class="pure-control-group">
                                                                <xsl:variable 
name="lang_vendor">
-                                                                       
<xsl:value-of select="php:function('lang', 'vendor')"/>
+                                                                       
<xsl:value-of select="php:function('lang', 'vendor name')"/>
                                                                </xsl:variable>
                                                                <label>
                                                                        
<xsl:value-of select="$lang_vendor"/>
@@ -141,21 +141,12 @@
                                                                <a 
href="{new_vendor_url}" target="_blank">
                                                                        
<xsl:value-of select="php:function('lang', 'new')"/>
                                                                        
<xsl:text> </xsl:text>
-                                                                       
<xsl:value-of select="$lang_vendor"/>
+                                                                       
<xsl:value-of select="php:function('lang', 'vendor')"/>
                                                                </a>
                                                                <div 
id="vendor_container"/>
                                                        </div>
                                                        <div 
class="pure-control-group">
                                                                <label>
-                                                                       
<xsl:value-of select="php:function('lang', 'other participants')"/>
-                                                               </label>
-                                                               <textarea 
cols="47" rows="7" name="other_participants">
-                                                                       
<xsl:value-of select="application/other_participants"/>
-                                                               </textarea>
-                                                       </div>
-
-                                                       <div 
class="pure-control-group">
-                                                               <label>
                                                                        
<xsl:value-of select="php:function('lang', 'contact name')"/>
                                                                </label>
                                                                <input 
type="text" id="contact_name" name="contact_name" 
value="{application/contact_name}">
@@ -203,6 +194,14 @@
                                                                        
</xsl:attribute>
                                                                </input>
                                                        </div>
+                                                       <div 
class="pure-control-group">
+                                                               <label>
+                                                                       
<xsl:value-of select="php:function('lang', 'other participants')"/>
+                                                               </label>
+                                                               <textarea 
cols="47" rows="7" name="other_participants">
+                                                                       
<xsl:value-of select="application/other_participants"/>
+                                                               </textarea>
+                                                       </div>
                                                </fieldset>
                                                <fieldset>
                                                        <legend>

Modified: trunk/eventplanner/templates/base/application_info.xsl
===================================================================
--- trunk/eventplanner/templates/base/application_info.xsl      2017-01-24 
15:08:08 UTC (rev 16186)
+++ trunk/eventplanner/templates/base/application_info.xsl      2017-01-24 
15:09:10 UTC (rev 16187)
@@ -51,8 +51,6 @@
                                <thead>
                                        <tr>
                                                <th>
-                                               </th>
-                                               <th>
                                                        <xsl:value-of 
select="php:function('lang', 'program type')"/>
                                                </th>
                                        </tr>
@@ -59,16 +57,13 @@
                                </thead>
                                <tbody>
                                        <xsl:for-each 
select="application_type_list">
-                                               <tr>
-                                                       <td>
-                                                               <xsl:if 
test="selected = 1">
-                                                                       
<xsl:text>X</xsl:text>
-                                                               </xsl:if>
-                                                       </td>
-                                                       <td>
-                                                               <xsl:value-of 
disable-output-escaping="yes" select="name"/>
-                                                       </td>
-                                               </tr>
+                                               <xsl:if test="selected = 1">
+                                                       <tr>
+                                                               <td>
+                                                                       
<xsl:value-of disable-output-escaping="yes" select="name"/>
+                                                               </td>
+                                                       </tr>
+                                               </xsl:if>
                                        </xsl:for-each>
                                </tbody>
                        </table>

Modified: trunk/eventplanner/templates/base/booking.xsl
===================================================================
--- trunk/eventplanner/templates/base/booking.xsl       2017-01-24 15:08:08 UTC 
(rev 16186)
+++ trunk/eventplanner/templates/base/booking.xsl       2017-01-24 15:09:10 UTC 
(rev 16187)
@@ -141,9 +141,6 @@
                                                                        <thead>
                                                                                
<tr>
                                                                                
        <th>
-                                                                               
                <xsl:value-of select="php:function('lang', 'select')"/>
-                                                                               
        </th>
-                                                                               
        <th>
                                                                                
                <xsl:value-of select="php:function('lang', 'program type')"/>
                                                                                
        </th>
                                                                                
</tr>
@@ -150,16 +147,13 @@
                                                                        </thead>
                                                                        <tbody>
                                                                                
<xsl:for-each select="application_type_list">
-                                                                               
        <tr>
-                                                                               
                <td>
-                                                                               
                        <xsl:if test="selected = 1">
-                                                                               
                                <xsl:text>X</xsl:text>
-                                                                               
                        </xsl:if>
-                                                                               
                </td>
-                                                                               
                <td>
-                                                                               
                        <xsl:value-of disable-output-escaping="yes" 
select="name"/>
-                                                                               
                </td>
-                                                                               
        </tr>
+                                                                               
        <xsl:if test="selected = 1">
+                                                                               
                <tr>
+                                                                               
                        <td>
+                                                                               
                                <xsl:value-of disable-output-escaping="yes" 
select="name"/>
+                                                                               
                        </td>
+                                                                               
                </tr>
+                                                                               
        </xsl:if>
                                                                                
</xsl:for-each>
                                                                        </tbody>
                                                                </table>

Modified: trunk/eventplanner/templates/base/customer.xsl
===================================================================
--- trunk/eventplanner/templates/base/customer.xsl      2017-01-24 15:08:08 UTC 
(rev 16186)
+++ trunk/eventplanner/templates/base/customer.xsl      2017-01-24 15:09:10 UTC 
(rev 16187)
@@ -142,6 +142,9 @@
                                                                <xsl:attribute 
name="data-validation">
                                                                        
<xsl:text>organization_number</xsl:text>
                                                                </xsl:attribute>
+                                                               <xsl:attribute 
name="data-validation-optional">
+                                                                       
<xsl:text>true</xsl:text>
+                                                               </xsl:attribute>
                                                                <xsl:attribute 
name="placeholder">
                                                                        
<xsl:value-of select="php:function('lang', 'organization number')"/>
                                                                </xsl:attribute>
@@ -202,6 +205,9 @@
                                                                <xsl:attribute 
name="data-validation">
                                                                        
<xsl:text>account_number</xsl:text>
                                                                </xsl:attribute>
+                                                               <xsl:attribute 
name="data-validation-optional">
+                                                                       
<xsl:text>true</xsl:text>
+                                                               </xsl:attribute>
                                                                <xsl:attribute 
name="placeholder">
                                                                        
<xsl:value-of select="php:function('lang', 'account number')"/>
                                                                </xsl:attribute>

Modified: trunk/eventplanner/templates/base/vendor.xsl
===================================================================
--- trunk/eventplanner/templates/base/vendor.xsl        2017-01-24 15:08:08 UTC 
(rev 16186)
+++ trunk/eventplanner/templates/base/vendor.xsl        2017-01-24 15:09:10 UTC 
(rev 16187)
@@ -26,7 +26,7 @@
 
        <div>
                <script type="text/javascript">
-                       var lang = <xsl:value-of 
select="php:function('js_lang', 'Name or company is required')"/>;
+                       var lang = <xsl:value-of 
select="php:function('js_lang', 'Name or company is required', 'please enter a 
valid organization number', 'please enter a valid account number')"/>;
                </script>
                <form id="form" name="form" method="post" 
action="{$form_action}" class="pure-form pure-form-aligned">
                        <div id="tab-content">
@@ -140,7 +140,7 @@
                                                        </label>
                                                        <input type="text" 
id="organization_number" name="organization_number" 
value="{vendor/organization_number}">
                                                                <xsl:attribute 
name="data-validation">
-                                                                       
<xsl:text>required</xsl:text>
+                                                                       
<xsl:text>organization_number</xsl:text>
                                                                </xsl:attribute>
                                                                <xsl:attribute 
name="placeholder">
                                                                        
<xsl:value-of select="php:function('lang', 'organization number')"/>
@@ -192,7 +192,7 @@
                                                        </label>
                                                        <input type="text" 
name="account_number" value="{vendor/account_number}">
                                                                <xsl:attribute 
name="data-validation">
-                                                                       
<xsl:text>required</xsl:text>
+                                                                       
<xsl:text>account_number</xsl:text>
                                                                </xsl:attribute>
                                                                <xsl:attribute 
name="placeholder">
                                                                        
<xsl:value-of select="php:function('lang', 'account number')"/>
@@ -201,7 +201,7 @@
                                                </div>
                                                <div class="pure-control-group">
                                                        <label>
-                                                               <xsl:value-of 
select="php:function('lang', 'description')"/>
+                                                               <xsl:value-of 
select="php:function('lang', 'vendor description')"/>
                                                        </label>
                                                        <textarea cols="47" 
rows="7" name="description">
                                                                <xsl:value-of 
select="vendor/description"/>

Added: trunk/eventplannerfrontend/home.php
===================================================================
--- trunk/eventplannerfrontend/home.php                         (rev 0)
+++ trunk/eventplannerfrontend/home.php 2017-01-24 15:09:10 UTC (rev 16187)
@@ -0,0 +1,21 @@
+<?php
+       /* 
+ * Copyright (C) 2017 hc483
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+       //alias for index.php
+       require_once 'index.php';

Modified: trunk/eventplannerfrontend/index.php
===================================================================
--- trunk/eventplannerfrontend/index.php        2017-01-24 15:08:08 UTC (rev 
16186)
+++ trunk/eventplannerfrontend/index.php        2017-01-24 15:09:10 UTC (rev 
16187)
@@ -45,7 +45,6 @@
        // Make sure we're always logged in
        if (!phpgw::get_var(session_name()) || 
!$GLOBALS['phpgw']->session->verify())
        {
-//             $login                           = "bookingguest";
                $c = createobject('phpgwapi.config', 'eventplannerfrontend');
                $c->read();
                $config = $c->config_data;
@@ -68,7 +67,9 @@
                        $GLOBALS['phpgw']->common->phpgw_exit(True);
                }
        }
+
        $GLOBALS['phpgw_info']['flags']['currentapp'] = 'eventplannerfrontend';
+       $GLOBALS['phpgw_info']['user']['preferences']['common']['template_set'] 
= 'bookingfrontend';
 
 /////////////////////////////////////////////////////////////////////////////
 // BEGIN Stuff copied from functions.inc.php

Modified: trunk/eventplannerfrontend/js/portico/validate.js
===================================================================
--- trunk/eventplannerfrontend/js/portico/validate.js   2017-01-24 15:08:08 UTC 
(rev 16186)
+++ trunk/eventplannerfrontend/js/portico/validate.js   2017-01-24 15:09:10 UTC 
(rev 16187)
@@ -40,11 +40,9 @@
                name: 'organization_number',
                validatorFunction: function (value, $el, config, languaje, 
$form)
                {
-                       //check_for_budget is defined in xsl-template
                        var v = false;
-                       var organization_number = 
$('#organization_number').val();
 
-                       organization_number = 
organization_number.replace(/\s/g, '');
+                       var organization_number = value.replace(/\s/g, '');
                        if (!organization_number.match(/(^\d{9}$)/))
                        {
                                return false;
@@ -53,7 +51,7 @@
                        v = 
parseInt(organization_number.charAt(organization_number.length - 1), 10) === 
mod11OfNumberWithControlDigit(organization_number)
                        return v;
                },
-               errorMessage: lang['please enter a valid organization number'],
+               errorMessage: lang['please enter a valid organization number'] 
|| 'please enter a valid organization number',
                errorMessageKey: ''
        });
 
@@ -61,11 +59,9 @@
                name: 'account_number',
                validatorFunction: function (value, $el, config, languaje, 
$form)
                {
-                       //check_for_budget is defined in xsl-template
                        var v = false;
-                       var account_number = $('#account_number').val();
 
-                       account_number = 
account_number.toString().replace(/\./g, '');
+                       var account_number = value.toString().replace(/\./g, 
'');
                        if (account_number.length !== 11)
                        {
                                return false;
@@ -74,7 +70,7 @@
 
                        return v;
                },
-               errorMessage: lang['please enter a valid account number'],
+               errorMessage: lang['please enter a valid account number'] || 
'please enter a valid account number',
                errorMessageKey: ''
        });
 });

Modified: trunk/eventplannerfrontend/login.php
===================================================================
--- trunk/eventplannerfrontend/login.php        2017-01-24 15:08:08 UTC (rev 
16186)
+++ trunk/eventplannerfrontend/login.php        2017-01-24 15:09:10 UTC (rev 
16187)
@@ -1,6 +1,13 @@
 <?php
-       $phpgw_info = array();
 
+
+       $GLOBALS['phpgw_info']['flags']['session_name'] = 
'eventplannerfrontendsession';
+       require_once '../phpgwapi/inc/class.login.inc.php';
+
+       $phpgwlogin = new phpgwapi_login;
+       $phpgwlogin->login('eventplannerfrontend');
+
+/*
        $GLOBALS['phpgw_info']['flags'] = array
                (
                'disable_template_class' => true,
@@ -17,7 +24,6 @@
                $GLOBALS['phpgw']->sessions = createObject('phpgwapi.sessions');
        }
 
-//     $login = "bookingguest";
        $c = createobject('phpgwapi.config', 'eventplannerfrontend');
        $c->read();
        $config = $c->config_data;
@@ -38,3 +44,4 @@
        }
        $GLOBALS['phpgw']->redirect_link('/eventplannerfrontend/index.php', 
$after);
        exit;
+*/
\ No newline at end of file

Modified: trunk/eventplannerfrontend/logout.php
===================================================================
--- trunk/eventplannerfrontend/logout.php       2017-01-24 15:08:08 UTC (rev 
16186)
+++ trunk/eventplannerfrontend/logout.php       2017-01-24 15:09:10 UTC (rev 
16187)
@@ -1,117 +1,71 @@
 <?php
-       $phpgw_info = array();
+       /**
+       * phpGroupWare
+       *
+       * phpgroupware base
+       * @author Joseph Engo <address@hidden>
+       * @copyright Copyright (C) 2000-2005 Free Software Foundation, Inc. 
http://www.fsf.org/
+       * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+       * @package phpgroupware
+       * @version $Id: logout.php 6669 2010-12-11 22:27:07Z sigurdne $
+       */
 
-       $GLOBALS['phpgw_info']['flags'] = array
-               (
-               'disable_template_class' => true,
-               'currentapp' => 'logout',
-               'noheader' => true,
-               'nofooter' => true,
-               'nonavbar' => true,
+       $GLOBALS['phpgw_info']        = array();
+       
+       $GLOBALS['phpgw_info']['flags'] = array(
+               'disable_template_class' => True,
+               'currentapp'             => 'logout',
+               'noheader'               => True,
+               'nofooter'               => True,
+               'nonavbar'               => True
        );
-       $GLOBALS['phpgw_info']['flags']['session_name'] = 
'eventplannerfrontendsession';
 
-       if (file_exists('../header.inc.php'))
-       {
-               include_once('../header.inc.php');
-               $GLOBALS['phpgw']->sessions = createObject('phpgwapi.sessions');
-       }
+       /**
+       * Include phpgroupware header
+       */
+       include_once('../header.inc.php');
 
-       $sessionid = phpgw::get_var('eventplannerfrontendsession');
+       $session_name = 'eventplannerfrontendsession';
+       $sessionid = phpgw::get_var($session_name);
 
        $verified = $GLOBALS['phpgw']->session->verify();
-
-       $eventplannerfrontend_host = '';
-       $external_logout = '';
        if ($verified)
        {
-               $config = CreateObject('phpgwapi.config', 
'eventplannerfrontend');
-               $config->read();
-
-               $eventplannerfrontend_host = 
isset($config->config_data['eventplannerfrontend_host']) && 
$config->config_data['eventplannerfrontend_host'] ? 
$config->config_data['eventplannerfrontend_host'] : '';
-               $eventplannerfrontend_host = rtrim($eventplannerfrontend_host, 
'/');
-               $external_logout = 
isset($config->config_data['external_logout']) && 
$config->config_data['external_logout'] ? 
$config->config_data['external_logout'] : '';
-//             $external_logout = 
"https://login-vip.bergen.kommune.no/SSO/logout?p_done_url=";//https://www.bergen.kommune.no";
-
-               $frontend_user = CreateObject('eventplannerfrontend.bouser');
-               $frontend_user->log_off();
-               /*
-                 // testing external logout
-
-
-                 $arguments = array('p_done_url' => 
'https://www.bergen.kommune.no');
-                 $query = http_build_query($arguments);
-                 $auth_url = $_integration_config['auth_url'];
-                 $request = 
"https://login-vip.bergen.kommune.no/SSO/logout?{$query}";;
-
-                 $aContext = array
-                 (
-                 'https' => array
-                 (
-                 'request_fulluri' => true,
-                 ),
-                 );
-
-                 
if(isset($GLOBALS['phpgw_info']['server']['httpproxy_server']))
-                 {
-                 $aContext['http']['proxy'] = 
"{$GLOBALS['phpgw_info']['server']['httpproxy_server']}:{$GLOBALS['phpgw_info']['server']['httpproxy_port']}";
-                 }
-
-                 $cxContext = stream_context_create($aContext);
-                 $response = file_get_contents($request, False, $cxContext);
-                */
-
-               execMethod('phpgwapi.menu.clear');
-               $GLOBALS['phpgw']->hooks->process('logout');
-               $GLOBALS['phpgw']->session->destroy($sessionid);
-       }
-
-       $forward = phpgw::get_var('phpgw_forward', 'int');
-
-       if ($forward)
-       {
-               $extra_vars['phpgw_forward'] = $forward;
-               foreach ($_GET as $name => $value)
+               if ( 
is_dir("{$GLOBALS['phpgw_info']['server']['temp_dir']}/{$sessionid}") && 
!empty($session_id) )
                {
-                       if (preg_match('/phpgw_/', $name))
+                       $dh = 
dir("{$GLOBALS['phpgw_info']['server']['temp_dir']}/{$sessionid}");
+                       while ( ($file = $dh->read()) !== false )
                        {
-                               $extra_vars[$name] = phpgw::clean_value($value);
+                               if ( $file == '.' || $file == '..' )
+                               {
+                                       continue;
+                               }
+                               
unlink("{$GLOBALS['phpgw_info']['server']['temp_dir']}/{$sessionid}/{$file}");
                        }
+                       
rmdir("{$GLOBALS['phpgw_info']['server']['temp_dir']}/{$sessionid}");
+                       $dh->close();
                }
+//             execMethod('phpgwapi.menu.clear'); // moved to hook for login
+               $GLOBALS['phpgw']->hooks->process('logout');
+               $GLOBALS['phpgw']->session->destroy($sessionid);
        }
-
-       $redirect = phpgw::get_var('redirect_menuaction', 'string');
-
-       if ($redirect)
+       else
        {
-               $matches = array();
-               $extra_vars['menuaction'] = $redirect;
-               foreach ($_GET as $name => $value)
+               if(is_object($GLOBALS['phpgw']->log))
                {
-                       if (preg_match('/^redirect_([\w\_\-]+)/', $name, 
$matches) && $matches[1] != 'menuaction')
-                       {
-                               $extra_vars[$matches[1]] = 
phpgw::clean_value($value);
-                       }
+                       $GLOBALS['phpgw']->log->write(array(
+                               'text' => 'W-VerifySession, could not verify 
session during logout',
+                               'line' => __LINE__,
+                               'file' => __FILE__
+                       ));
                }
        }
 
-       if (!isset($extra_vars['menuaction']))
+       if ( isset($GLOBALS['phpgw_info']['server']['usecookies'])
+               && $GLOBALS['phpgw_info']['server']['usecookies'] )
        {
-               $extra_vars['menuaction'] = 
'eventplannerfrontend.uievents.index';
+               $GLOBALS['phpgw']->session->phpgw_setcookie($session_name);
+               $GLOBALS['phpgw']->session->phpgw_setcookie('domain');
        }
 
-       if (!$external_logout)
-       {
-               $GLOBALS['phpgw']->redirect_link('/eventplannerfrontend/', 
$extra_vars);
-       }
-       else
-       {
-               $result_redirect = '';
-               if (substr($external_logout, -1) == '=')
-               {
-                       $result_redirect = 
$GLOBALS['phpgw']->link('/eventplannerfrontend/', $extra_vars, true);
-               }
-               $external_logout_url = 
"{$external_logout}{$eventplannerfrontend_host}{$result_redirect}";
-               Header("Location: {$external_logout_url}");
-       }
-       exit;
+       $GLOBALS['phpgw']->redirect_link('/eventplannerfrontend/', array('cd' 
=> 1, 'logout' => true));

Modified: trunk/eventplannerfrontend/templates/base/application.xsl
===================================================================
--- trunk/eventplannerfrontend/templates/base/application.xsl   2017-01-24 
15:08:08 UTC (rev 16186)
+++ trunk/eventplannerfrontend/templates/base/application.xsl   2017-01-24 
15:09:10 UTC (rev 16187)
@@ -113,7 +113,7 @@
                                                        </div>
                                                        <div 
class="pure-control-group">
                                                                <xsl:variable 
name="lang_vendor">
-                                                                       
<xsl:value-of select="php:function('lang', 'vendor')"/>
+                                                                       
<xsl:value-of select="php:function('lang', 'vendor name')"/>
                                                                </xsl:variable>
                                                                <label>
                                                                        
<xsl:value-of select="$lang_vendor"/>
@@ -141,21 +141,12 @@
                                                                <a 
href="{new_vendor_url}" target="_blank">
                                                                        
<xsl:value-of select="php:function('lang', 'new')"/>
                                                                        
<xsl:text> </xsl:text>
-                                                                       
<xsl:value-of select="$lang_vendor"/>
+                                                                       
<xsl:value-of select="php:function('lang', 'vendor')"/>
                                                                </a>
                                                                <div 
id="vendor_container"/>
                                                        </div>
                                                        <div 
class="pure-control-group">
                                                                <label>
-                                                                       
<xsl:value-of select="php:function('lang', 'other participants')"/>
-                                                               </label>
-                                                               <textarea 
cols="47" rows="7" name="other_participants">
-                                                                       
<xsl:value-of select="application/other_participants"/>
-                                                               </textarea>
-                                                       </div>
-
-                                                       <div 
class="pure-control-group">
-                                                               <label>
                                                                        
<xsl:value-of select="php:function('lang', 'contact name')"/>
                                                                </label>
                                                                <input 
type="text" id="contact_name" name="contact_name" 
value="{application/contact_name}">
@@ -203,6 +194,14 @@
                                                                        
</xsl:attribute>
                                                                </input>
                                                        </div>
+                                                       <div 
class="pure-control-group">
+                                                               <label>
+                                                                       
<xsl:value-of select="php:function('lang', 'other participants')"/>
+                                                               </label>
+                                                               <textarea 
cols="47" rows="7" name="other_participants">
+                                                                       
<xsl:value-of select="application/other_participants"/>
+                                                               </textarea>
+                                                       </div>
                                                </fieldset>
                                                <fieldset>
                                                        <legend>

Modified: trunk/eventplannerfrontend/templates/base/application_info.xsl
===================================================================
--- trunk/eventplannerfrontend/templates/base/application_info.xsl      
2017-01-24 15:08:08 UTC (rev 16186)
+++ trunk/eventplannerfrontend/templates/base/application_info.xsl      
2017-01-24 15:09:10 UTC (rev 16187)
@@ -51,8 +51,6 @@
                                <thead>
                                        <tr>
                                                <th>
-                                               </th>
-                                               <th>
                                                        <xsl:value-of 
select="php:function('lang', 'program type')"/>
                                                </th>
                                        </tr>
@@ -59,16 +57,13 @@
                                </thead>
                                <tbody>
                                        <xsl:for-each 
select="application_type_list">
-                                               <tr>
-                                                       <td>
-                                                               <xsl:if 
test="selected = 1">
-                                                                       
<xsl:text>X</xsl:text>
-                                                               </xsl:if>
-                                                       </td>
-                                                       <td>
-                                                               <xsl:value-of 
disable-output-escaping="yes" select="name"/>
-                                                       </td>
-                                               </tr>
+                                               <xsl:if test="selected = 1">
+                                                       <tr>
+                                                               <td>
+                                                                       
<xsl:value-of disable-output-escaping="yes" select="name"/>
+                                                               </td>
+                                                       </tr>
+                                               </xsl:if>
                                        </xsl:for-each>
                                </tbody>
                        </table>

Modified: trunk/eventplannerfrontend/templates/base/booking.xsl
===================================================================
--- trunk/eventplannerfrontend/templates/base/booking.xsl       2017-01-24 
15:08:08 UTC (rev 16186)
+++ trunk/eventplannerfrontend/templates/base/booking.xsl       2017-01-24 
15:09:10 UTC (rev 16187)
@@ -141,9 +141,6 @@
                                                                        <thead>
                                                                                
<tr>
                                                                                
        <th>
-                                                                               
                <xsl:value-of select="php:function('lang', 'select')"/>
-                                                                               
        </th>
-                                                                               
        <th>
                                                                                
                <xsl:value-of select="php:function('lang', 'program type')"/>
                                                                                
        </th>
                                                                                
</tr>
@@ -150,16 +147,13 @@
                                                                        </thead>
                                                                        <tbody>
                                                                                
<xsl:for-each select="application_type_list">
-                                                                               
        <tr>
-                                                                               
                <td>
-                                                                               
                        <xsl:if test="selected = 1">
-                                                                               
                                <xsl:text>X</xsl:text>
-                                                                               
                        </xsl:if>
-                                                                               
                </td>
-                                                                               
                <td>
-                                                                               
                        <xsl:value-of disable-output-escaping="yes" 
select="name"/>
-                                                                               
                </td>
-                                                                               
        </tr>
+                                                                               
        <xsl:if test="selected = 1">
+                                                                               
                <tr>
+                                                                               
                        <td>
+                                                                               
                                <xsl:value-of disable-output-escaping="yes" 
select="name"/>
+                                                                               
                        </td>
+                                                                               
                </tr>
+                                                                               
        </xsl:if>
                                                                                
</xsl:for-each>
                                                                        </tbody>
                                                                </table>

Modified: trunk/eventplannerfrontend/templates/base/customer.xsl
===================================================================
--- trunk/eventplannerfrontend/templates/base/customer.xsl      2017-01-24 
15:08:08 UTC (rev 16186)
+++ trunk/eventplannerfrontend/templates/base/customer.xsl      2017-01-24 
15:09:10 UTC (rev 16187)
@@ -142,6 +142,9 @@
                                                                <xsl:attribute 
name="data-validation">
                                                                        
<xsl:text>organization_number</xsl:text>
                                                                </xsl:attribute>
+                                                               <xsl:attribute 
name="data-validation-optional">
+                                                                       
<xsl:text>true</xsl:text>
+                                                               </xsl:attribute>
                                                                <xsl:attribute 
name="placeholder">
                                                                        
<xsl:value-of select="php:function('lang', 'organization number')"/>
                                                                </xsl:attribute>
@@ -202,6 +205,9 @@
                                                                <xsl:attribute 
name="data-validation">
                                                                        
<xsl:text>account_number</xsl:text>
                                                                </xsl:attribute>
+                                                               <xsl:attribute 
name="data-validation-optional">
+                                                                       
<xsl:text>true</xsl:text>
+                                                               </xsl:attribute>
                                                                <xsl:attribute 
name="placeholder">
                                                                        
<xsl:value-of select="php:function('lang', 'account number')"/>
                                                                </xsl:attribute>

Modified: trunk/eventplannerfrontend/templates/base/vendor.xsl
===================================================================
--- trunk/eventplannerfrontend/templates/base/vendor.xsl        2017-01-24 
15:08:08 UTC (rev 16186)
+++ trunk/eventplannerfrontend/templates/base/vendor.xsl        2017-01-24 
15:09:10 UTC (rev 16187)
@@ -26,7 +26,7 @@
 
        <div>
                <script type="text/javascript">
-                       var lang = <xsl:value-of 
select="php:function('js_lang', 'Name or company is required')"/>;
+                       var lang = <xsl:value-of 
select="php:function('js_lang', 'Name or company is required', 'please enter a 
valid organization number', 'please enter a valid account number')"/>;
                </script>
                <form id="form" name="form" method="post" 
action="{$form_action}" class="pure-form pure-form-aligned">
                        <div id="tab-content">
@@ -140,7 +140,7 @@
                                                        </label>
                                                        <input type="text" 
id="organization_number" name="organization_number" 
value="{vendor/organization_number}">
                                                                <xsl:attribute 
name="data-validation">
-                                                                       
<xsl:text>required</xsl:text>
+                                                                       
<xsl:text>organization_number</xsl:text>
                                                                </xsl:attribute>
                                                                <xsl:attribute 
name="placeholder">
                                                                        
<xsl:value-of select="php:function('lang', 'organization number')"/>
@@ -192,7 +192,7 @@
                                                        </label>
                                                        <input type="text" 
name="account_number" value="{vendor/account_number}">
                                                                <xsl:attribute 
name="data-validation">
-                                                                       
<xsl:text>required</xsl:text>
+                                                                       
<xsl:text>account_number</xsl:text>
                                                                </xsl:attribute>
                                                                <xsl:attribute 
name="placeholder">
                                                                        
<xsl:value-of select="php:function('lang', 'account number')"/>
@@ -201,7 +201,7 @@
                                                </div>
                                                <div class="pure-control-group">
                                                        <label>
-                                                               <xsl:value-of 
select="php:function('lang', 'description')"/>
+                                                               <xsl:value-of 
select="php:function('lang', 'vendor description')"/>
                                                        </label>
                                                        <textarea cols="47" 
rows="7" name="description">
                                                                <xsl:value-of 
select="vendor/description"/>

Modified: trunk/phpgwapi/templates/bookingfrontend/head.inc.php
===================================================================
--- trunk/phpgwapi/templates/bookingfrontend/head.inc.php       2017-01-24 
15:08:08 UTC (rev 16186)
+++ trunk/phpgwapi/templates/bookingfrontend/head.inc.php       2017-01-24 
15:09:10 UTC (rev 16187)
@@ -197,6 +197,9 @@
                $tpl_vars['manual_text'] = lang('manual');
                $tpl_vars['manual_url'] = $manual;
        }
+//     $user = $GLOBALS['phpgw']->accounts->get( 
$GLOBALS['phpgw_info']['user']['id'] );
+//     _debug_array($user);
+
        $bouser = CreateObject('bookingfrontend.bouser');
     $org = CreateObject('bookingfrontend.uiorganization');
     $orgid = $org->get_orgid($bouser->orgnr);




reply via email to

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