fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [16287] more on eventplanner


From: sigurdne
Subject: [Fmsystem-commits] [16287] more on eventplanner
Date: Thu, 9 Feb 2017 05:15:09 -0500 (EST)

Revision: 16287
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16287
Author:   sigurdne
Date:     2017-02-09 05:15:09 -0500 (Thu, 09 Feb 2017)
Log Message:
-----------
more on eventplanner

Modified Paths:
--------------
    trunk/eventplanner/inc/model/class.customer.inc.php
    trunk/eventplanner/setup/phpgw_no.lang
    trunk/eventplanner/setup/setup.inc.php
    trunk/eventplanner/setup/tables_current.inc.php
    trunk/eventplanner/setup/tables_update.inc.php
    trunk/eventplanner/templates/base/customer.xsl
    trunk/eventplannerfrontend/templates/base/customer.xsl

Modified: trunk/eventplanner/inc/model/class.customer.inc.php
===================================================================
--- trunk/eventplanner/inc/model/class.customer.inc.php 2017-02-08 19:00:51 UTC 
(rev 16286)
+++ trunk/eventplanner/inc/model/class.customer.inc.php 2017-02-09 10:15:09 UTC 
(rev 16287)
@@ -57,6 +57,11 @@
                        $contact_name,
                        $contact_email,
                        $contact_phone,
+                       $contact2_name,
+                       $contact2_email,
+                       $contact2_phone,
+                       $number_of_users,
+                       $max_events,
                        $account_number,
                        $description,
                        $remark,
@@ -146,7 +151,7 @@
                                        'required' => true),
                                'account_number' => array('action'=> 
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
                                        'type' => 'string',
-                                       'required' => true),
+                                       'required' => false),
                                'description' => array('action'=> PHPGW_ACL_ADD 
| PHPGW_ACL_EDIT,
                                        'type' => 'string',
                                        'label' => 'description',
@@ -180,6 +185,35 @@
                                        'query' => true,
                                        'label' => 'contact phone',
                                        ),
+                               'contact2_name' => array(
+                                       'action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
+                                       'type' => 'string',
+                                       'required' => false,
+                                       'query' => true,
+                                       'label' => 'contact name 2',
+                                       ),
+                               'contact2_email' => array(
+                                       'action'=> PHPGW_ACL_READ | 
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
+                                       'type' => 'string',
+                                       'required' => false,
+                                       'query' => true,
+                                       'sf_validator' => 
createObject('booking.sfValidatorEmail', array(), array('invalid' => '%field% 
is invalid')),
+                                       'label' => 'contact email 2',
+                                       ),
+                               'contact2_phone' => array(
+                                       'action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
+                                       'type' => 'string',
+                                       'required' => false,
+                                       'query' => true,
+                                       'label' => 'contact phone 2',
+                                       ),
+                               'number_of_users' => array(
+                                       'action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
+                                       'type' => 'int',
+                                       'required' => true,
+                                       'query' => true,
+                                       'label' => 'number of users',
+                                       ),
                                'organization_number' => array(
                                        'action'=> PHPGW_ACL_READ | 
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
                                        'type' => 'string',
@@ -211,7 +245,14 @@
                                                'action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
                                                'type' => 'string',
                                                'related' => true,
-                                               )
+                                               ),
+                                       'max_events' => array(
+                                               'action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
+                                               'type' => 'int',
+                                               'required' => true,
+                                               'query' => false,
+                                               'label' => 'maximum number of 
events',
+                                               ),
                                        );
 
                                foreach ($backend_fields as $key => $field_info)

Modified: trunk/eventplanner/setup/phpgw_no.lang
===================================================================
--- trunk/eventplanner/setup/phpgw_no.lang      2017-02-08 19:00:51 UTC (rev 
16286)
+++ trunk/eventplanner/setup/phpgw_no.lang      2017-02-09 10:15:09 UTC (rev 
16287)
@@ -109,4 +109,6 @@
 customer contact email eventplanner    no      Epost
 showall        eventplanner    no      Vis alle
 read   eventplanner    no      Les
-permission     eventplanner    no      Rettighet
\ No newline at end of file
+permission     eventplanner    no      Rettighet
+maximum number of events       eventplanner    no      Maksimum antall 
arrangement
+number of users        eventplanner    no      Ca. antall brukere
\ No newline at end of file

Modified: trunk/eventplanner/setup/setup.inc.php
===================================================================
--- trunk/eventplanner/setup/setup.inc.php      2017-02-08 19:00:51 UTC (rev 
16286)
+++ trunk/eventplanner/setup/setup.inc.php      2017-02-09 10:15:09 UTC (rev 
16287)
@@ -11,7 +11,7 @@
         * @version $Id: setup.inc.php 14728 2016-02-11 22:28:46Z sigurdne $
         */
        $setup_info['eventplanner']['name'] = 'eventplanner';
-       $setup_info['eventplanner']['version'] = '0.9.18.006';
+       $setup_info['eventplanner']['version'] = '0.9.18.007';
        $setup_info['eventplanner']['app_order'] = 20;
        $setup_info['eventplanner']['enable'] = 1;
        $setup_info['eventplanner']['app_group'] = 'office';

Modified: trunk/eventplanner/setup/tables_current.inc.php
===================================================================
--- trunk/eventplanner/setup/tables_current.inc.php     2017-02-08 19:00:51 UTC 
(rev 16286)
+++ trunk/eventplanner/setup/tables_current.inc.php     2017-02-09 10:15:09 UTC 
(rev 16287)
@@ -86,12 +86,17 @@
                                'address_2' => array('type' => 'varchar', 
'precision' => '255', 'nullable' => true),
                                'zip_code' => array('type' => 'varchar', 
'precision' => '10', 'nullable' => False),
                                'city' => array('type' => 'varchar', 
'precision' => '64', 'nullable' => False),
-                               'account_number' => array('type' => 'varchar', 
'precision' => '20', 'nullable' => False),
+                               'account_number' => array('type' => 'varchar', 
'precision' => '20', 'nullable' => true),
                                'category_id' => array('type' => 'int', 
'precision' => '4', 'nullable' => false),
                                'active' => array('type' => 'int', 'nullable' 
=> False, 'precision' => '4', 'default' => 1),
                                'contact_name' => array('type' => 'text', 
'nullable' => False),
                                'contact_email' => array('type' => 'text', 
'nullable' => False),
                                'contact_phone' => array('type' => 'text', 
'nullable' => False),
+                               'contact2_name' => array('type' => 'text', 
'nullable' => true),
+                               'contact2_email' => array('type' => 'text', 
'nullable' => true),
+                               'contact2_phone' => array('type' => 'text', 
'nullable' => true),
+                               'number_of_users' => array('type' => 'int', 
'precision' => '4', 'nullable' => true),
+                               'max_events' => array('type' => 'int', 
'precision' => '4', 'nullable' => true),
                                'description' => array('type' => 'text', 
'nullable' => False),
                                'remark' => array('type' => 'text', 'nullable' 
=> True),
                                'secret' => array('type' => 'text', 'nullable' 
=> False),

Modified: trunk/eventplanner/setup/tables_update.inc.php
===================================================================
--- trunk/eventplanner/setup/tables_update.inc.php      2017-02-08 19:00:51 UTC 
(rev 16286)
+++ trunk/eventplanner/setup/tables_update.inc.php      2017-02-09 10:15:09 UTC 
(rev 16287)
@@ -153,6 +153,7 @@
                }
                return $GLOBALS['setup_info']['eventplanner']['currentver'];
        }
+
        $test[] = '0.9.18.005';
 
        function eventplanner_upgrade0_9_18_005()
@@ -183,3 +184,43 @@
                }
                return $GLOBALS['setup_info']['eventplanner']['currentver'];
        }
+
+       $test[] = '0.9.18.006';
+       function eventplanner_upgrade0_9_18_006()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('eventplanner_customer', 
'contact2_name', array(
+                       'type' => 'text',
+                       'nullable' => true
+               ));
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('eventplanner_customer', 
'contact2_email', array(
+                       'type' => 'text',
+                       'nullable' => true
+               ));
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('eventplanner_customer', 
'contact2_phone', array(
+                       'type' => 'text',
+                       'nullable' => true
+               ));
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('eventplanner_customer', 
'max_events', array(
+                       'type' => 'int',
+                       'precision' => 4,
+                       'nullable' => true
+               ));
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('eventplanner_customer', 
'number_of_users', array(
+                       'type' => 'int',
+                       'precision' => 4,
+                       'nullable' => true
+               ));
+
+               
$GLOBALS['phpgw_setup']->oProc->AlterColumn('eventplanner_customer','account_number',
 array(
+                       'type' => 'varchar',
+                       'precision' => '20',
+                       'nullable' => true));
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['eventplanner']['currentver'] = 
'0.9.18.007';
+               }
+               return $GLOBALS['setup_info']['eventplanner']['currentver'];
+       }

Modified: trunk/eventplanner/templates/base/customer.xsl
===================================================================
--- trunk/eventplanner/templates/base/customer.xsl      2017-02-08 19:00:51 UTC 
(rev 16286)
+++ trunk/eventplanner/templates/base/customer.xsl      2017-02-09 10:15:09 UTC 
(rev 16287)
@@ -34,6 +34,10 @@
                                <input type="hidden" id="active_tab" 
name="active_tab" value="{value_active_tab}"/>
                                <div id="first_tab">
                                        <fieldset>
+                                               <legend>
+                                                       <xsl:value-of 
select="php:function('lang', 'customer')"/>
+                                               </legend>
+
                                                <xsl:if test="customer/id > 0">
                                                        <div 
class="pure-control-group">
                                                                <label>
@@ -44,16 +48,6 @@
                                                        </div>
                                                </xsl:if>
                                                <div class="pure-control-group">
-                                                       <label>
-                                                               <xsl:value-of 
select="php:function('lang', 'active')"/>
-                                                       </label>
-                                                       <input type="checkbox" 
name="active" id="active" value="1">
-                                                               <xsl:if 
test="customer/active = 1">
-                                                                       
<xsl:attribute name="checked" value="checked"/>
-                                                               </xsl:if>
-                                                       </input>
-                                               </div>
-                                               <div class="pure-control-group">
                                                        <xsl:variable 
name="lang_category">
                                                                <xsl:value-of 
select="php:function('lang', 'category')"/>
                                                        </xsl:variable>
@@ -152,6 +146,35 @@
                                                </div>
                                                <div class="pure-control-group">
                                                        <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'account number')"/>
+                                                       </label>
+                                                       <input type="text" 
id="account_number" name="account_number" value="{customer/account_number}">
+                                                               <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>
+                                                       </input>
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'number of users')"/>
+                                                       </label>
+                                                       <input type="text" 
name="number_of_users" value="{customer/number_of_users}">
+                                                               <xsl:attribute 
name="data-validation">
+                                                                       
<xsl:text>number</xsl:text>
+                                                               </xsl:attribute>
+                                                               <xsl:attribute 
name="placeholder">
+                                                                       
<xsl:value-of select="php:function('lang', 'integer')"/>
+                                                               </xsl:attribute>
+                                                       </input>
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <label>
                                                                <xsl:value-of 
select="php:function('lang', 'contact name')"/>
                                                        </label>
                                                        <input type="text" 
name="contact_name" value="{customer/contact_name}">
@@ -199,22 +222,62 @@
                                                </div>
                                                <div class="pure-control-group">
                                                        <label>
-                                                               <xsl:value-of 
select="php:function('lang', 'account number')"/>
+                                                               <xsl:value-of 
select="php:function('lang', 'contact name')"/>
+                                                               <xsl:text> 
2</xsl:text>
                                                        </label>
-                                                       <input type="text" 
id="account_number" name="account_number" value="{customer/account_number}">
+                                                       <input type="text" 
name="contact2_name" id="contact2_name" value="{customer/contact2_name}">
+                                                               <xsl:attribute 
name="data-validation-optional">
+                                                                       
<xsl:text>true</xsl:text>
+                                                               </xsl:attribute>
+                                                               <xsl:attribute 
name="placeholder">
+                                                                       
<xsl:value-of select="php:function('lang', 'contact name')"/>
+                                                               </xsl:attribute>
+                                                       </input>
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'email')"/>
+                                                               <xsl:text> 
2</xsl:text>
+                                                       </label>
+                                                       <input type="text" 
name="contact2_email" id="contact2_email" value="{customer/contact2_email}">
                                                                <xsl:attribute 
name="data-validation">
-                                                                       
<xsl:text>account_number</xsl:text>
+                                                                       
<xsl:text>email</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:value-of select="php:function('lang', 'email')"/>
                                                                </xsl:attribute>
                                                        </input>
+                                                       <xsl:choose>
+                                                               <xsl:when 
test="valid_email = 1">
+                                                                       
<xsl:text> </xsl:text>
+                                                                       <a 
href="{link_create_user}">
+                                                                               
<xsl:value-of select="php:function('lang', 'create_user_based_on_email_link')"/>
+                                                                       </a>
+                                                               </xsl:when>
+                                                       </xsl:choose>
                                                </div>
                                                <div class="pure-control-group">
                                                        <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'contact phone')"/>
+                                                               <xsl:text> 
2</xsl:text>
+                                                       </label>
+                                                       <input type="text" 
name="contact2_phone" id="contact2_phone" value="{customer/contact2_phone}">
+                                                               <xsl:attribute 
name="data-validation-depends-on">
+                                                                       
<xsl:text>contact2_name</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', 'contact phone')"/>
+                                                               </xsl:attribute>
+                                                       </input>
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <label>
                                                                <xsl:value-of 
select="php:function('lang', 'description')"/>
                                                        </label>
                                                        <textarea cols="47" 
rows="7" name="description">
@@ -229,8 +292,36 @@
                                                                <xsl:value-of 
select="customer/remark"/>
                                                        </textarea>
                                                </div>
+                                       </fieldset>
+                                       <fieldset>
+                                               <legend>
+                                                       <xsl:value-of 
select="php:function('lang', 'proceedings')"/>
+                                               </legend>
                                                <div class="pure-control-group">
                                                        <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'active')"/>
+                                                       </label>
+                                                       <input type="checkbox" 
name="active" id="active" value="1">
+                                                               <xsl:if 
test="customer/active = 1">
+                                                                       
<xsl:attribute name="checked" value="checked"/>
+                                                               </xsl:if>
+                                                       </input>
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'maximum number of events')"/>
+                                                       </label>
+                                                       <input type="text" 
name="max_events" value="{customer/max_events}">
+                                                               <xsl:attribute 
name="data-validation">
+                                                                       
<xsl:text>number</xsl:text>
+                                                               </xsl:attribute>
+                                                               <xsl:attribute 
name="placeholder">
+                                                                       
<xsl:value-of select="php:function('lang', 'integer')"/>
+                                                               </xsl:attribute>
+                                                       </input>
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <label>
                                                                <xsl:value-of 
select="php:function('lang', 'comment')"/>
                                                        </label>
                                                        <textarea cols="47" 
rows="7" name="comment">

Modified: trunk/eventplannerfrontend/templates/base/customer.xsl
===================================================================
--- trunk/eventplannerfrontend/templates/base/customer.xsl      2017-02-08 
19:00:51 UTC (rev 16286)
+++ trunk/eventplannerfrontend/templates/base/customer.xsl      2017-02-09 
10:15:09 UTC (rev 16287)
@@ -142,6 +142,35 @@
                                                </div>
                                                <div class="pure-control-group">
                                                        <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'account number')"/>
+                                                       </label>
+                                                       <input type="text" 
id="account_number" name="account_number" value="{customer/account_number}">
+                                                               <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>
+                                                       </input>
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'number of users')"/>
+                                                       </label>
+                                                       <input type="text" 
name="number_of_users" value="{customer/number_of_users}">
+                                                               <xsl:attribute 
name="data-validation">
+                                                                       
<xsl:text>number</xsl:text>
+                                                               </xsl:attribute>
+                                                               <xsl:attribute 
name="placeholder">
+                                                                       
<xsl:value-of select="php:function('lang', 'integer')"/>
+                                                               </xsl:attribute>
+                                                       </input>
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <label>
                                                                <xsl:value-of 
select="php:function('lang', 'contact name')"/>
                                                        </label>
                                                        <input type="text" 
name="contact_name" value="{customer/contact_name}">
@@ -165,14 +194,6 @@
                                                                        
<xsl:value-of select="php:function('lang', 'email')"/>
                                                                </xsl:attribute>
                                                        </input>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="valid_email = 1">
-                                                                       
<xsl:text> </xsl:text>
-                                                                       <a 
href="{link_create_user}">
-                                                                               
<xsl:value-of select="php:function('lang', 'create_user_based_on_email_link')"/>
-                                                                       </a>
-                                                               </xsl:when>
-                                                       </xsl:choose>
                                                </div>
                                                <div class="pure-control-group">
                                                        <label>
@@ -189,22 +210,54 @@
                                                </div>
                                                <div class="pure-control-group">
                                                        <label>
-                                                               <xsl:value-of 
select="php:function('lang', 'account number')"/>
+                                                               <xsl:value-of 
select="php:function('lang', 'contact name')"/>
+                                                               <xsl:text> 
2</xsl:text>
                                                        </label>
-                                                       <input type="text" 
id="account_number" name="account_number" value="{customer/account_number}">
+                                                       <input type="text" 
name="contact2_name" id="contact2_name" value="{customer/contact2_name}">
+                                                               <xsl:attribute 
name="data-validation-optional">
+                                                                       
<xsl:text>true</xsl:text>
+                                                               </xsl:attribute>
+                                                               <xsl:attribute 
name="placeholder">
+                                                                       
<xsl:value-of select="php:function('lang', 'contact name')"/>
+                                                               </xsl:attribute>
+                                                       </input>
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'email')"/>
+                                                               <xsl:text> 
2</xsl:text>
+                                                       </label>
+                                                       <input type="text" 
name="contact2_email" id="contact2_email" value="{customer/contact2_email}">
                                                                <xsl:attribute 
name="data-validation">
-                                                                       
<xsl:text>account_number</xsl:text>
+                                                                       
<xsl:text>email</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:value-of select="php:function('lang', 'email')"/>
                                                                </xsl:attribute>
                                                        </input>
                                                </div>
                                                <div class="pure-control-group">
                                                        <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'contact phone')"/>
+                                                               <xsl:text> 
2</xsl:text>
+                                                       </label>
+                                                       <input type="text" 
name="contact2_phone" id="contact2_phone" value="{customer/contact2_phone}">
+                                                               <xsl:attribute 
name="data-validation-depends-on">
+                                                                       
<xsl:text>contact2_name</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', 'contact phone')"/>
+                                                               </xsl:attribute>
+                                                       </input>
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <label>
                                                                <xsl:value-of 
select="php:function('lang', 'description')"/>
                                                        </label>
                                                        <textarea cols="47" 
rows="7" name="description">




reply via email to

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