fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [17089] Stable: Merge 17075:17088 from trunk


From: sigurdne
Subject: [Fmsystem-commits] [17089] Stable: Merge 17075:17088 from trunk
Date: Mon, 18 Sep 2017 04:38:49 -0400 (EDT)

Revision: 17089
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17089
Author:   sigurdne
Date:     2017-09-18 04:38:48 -0400 (Mon, 18 Sep 2017)
Log Message:
-----------
Stable: Merge 17075:17088 from trunk

Modified Paths:
--------------
    branches/Version-2_0-branch/booking/inc/class.soallocation.inc.php
    branches/Version-2_0-branch/booking/inc/class.sobooking.inc.php
    branches/Version-2_0-branch/eventplanner/inc/class.sobooking.inc.php
    branches/Version-2_0-branch/eventplanner/inc/class.uiapplication.inc.php
    branches/Version-2_0-branch/eventplanner/inc/class.uibooking.inc.php
    branches/Version-2_0-branch/eventplanner/inc/class.uicustomer_report.inc.php
    branches/Version-2_0-branch/eventplanner/inc/class.uivendor.inc.php
    branches/Version-2_0-branch/eventplanner/inc/hook_config.inc.php
    branches/Version-2_0-branch/eventplanner/setup/phpgw_no.lang
    branches/Version-2_0-branch/eventplanner/templates/base/application.xsl
    branches/Version-2_0-branch/eventplanner/templates/base/config.tpl
    
branches/Version-2_0-branch/eventplannerfrontend/inc/class.hook_helper.inc.php
    branches/Version-2_0-branch/eventplannerfrontend/inc/class.menu.inc.php
    branches/Version-2_0-branch/eventplannerfrontend/inc/class.uibooking.inc.php
    
branches/Version-2_0-branch/eventplannerfrontend/inc/custom/default/Altinn2_Bergen_kommune.php
    
branches/Version-2_0-branch/eventplannerfrontend/js/portico/application.edit.js
    branches/Version-2_0-branch/eventplannerfrontend/logout.php
    
branches/Version-2_0-branch/eventplannerfrontend/templates/base/application.xsl
    branches/Version-2_0-branch/eventplannerfrontend/templates/base/css/base.css
    branches/Version-2_0-branch/eventplannerfrontend/templates/base/vendor.xsl
    branches/Version-2_0-branch/phpgwapi/inc/class.jqcal.inc.php
    branches/Version-2_0-branch/property/inc/class.botts.inc.php
    branches/Version-2_0-branch/property/inc/class.soagreement.inc.php
    branches/Version-2_0-branch/property/inc/class.sotts.inc.php
    branches/Version-2_0-branch/property/inc/class.uitts.inc.php
    branches/Version-2_0-branch/property/setup/phpgw_no.lang
    branches/Version-2_0-branch/property/setup/setup.inc.php
    branches/Version-2_0-branch/property/setup/tables_current.inc.php
    branches/Version-2_0-branch/property/setup/tables_update.inc.php
    branches/Version-2_0-branch/property/templates/base/contact_form.xsl
    branches/Version-2_0-branch/property/templates/base/tts.xsl

Property Changed:
----------------
    branches/Version-2_0-branch/
    branches/Version-2_0-branch/booking/

Index: branches/Version-2_0-branch
===================================================================
--- branches/Version-2_0-branch 2017-09-18 08:37:02 UTC (rev 17088)
+++ branches/Version-2_0-branch 2017-09-18 08:38:48 UTC (rev 17089)

Property changes on: branches/Version-2_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
## -1,4 +1,4 ##
 /branches/dev-syncromind:13653
 /branches/dev-syncromind-2:14933-16846
 /branches/stavangerkommune:12743-12875,12986
-/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783,14785-14792,14794-14813,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14847,14849-14866,14868-14869,14871,14873-14875,14877-14878,14880-14884,14886-14896,14898,14900-14902,14904,14906-14909,14911-14915,14917-14919,14921-14922,14924-14978,14980-15258,15260-15261,15263-15264,15266-15285,15287-15288,15290-15291,15293,15295,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15356,15358,15360-15541,15543-15566,15568-15569,15571,15573-15581,15583,15585-15617,15619,15621-15630,15632-15635,15637-15639,15641-15643,15645,15647-15665,15667-15668,15670-15671,15673-15693,15695-15712,15714-15764,15766-15767,15769-15787,15789-15802,15804-15811,15813-15814,15816-15818,15820-15849,15851-15887,15889-15900,15902-16046,16048-16051,16053,16055,16057-16063,16065-16071,16073-16077,16079-16081,16083-16099,16101-16130,16132-16140,16142,16144-16212,16214-16219,16221,16223-16224,16226,16228-16229,16231,16233,16235,16237,16239-16240,16242,16244-16246,16248,16250-16251,16253-16255,16257-16259,16261,16263,16265,16267,16269-16276,16278,16280-16283,16285,16287-16288,16290,16292-16295,16297-16305,16307-16314,16316-16318,16320-16322,16324,16326-16330,16332,16334,16336,16338-16339,16341-16342,16344,16346,16348,16350,16352-16353,16355-16358,16360,16362,16364-16369,16371,16373,16375-16378,16380,16382-16383,16385,16387,16389,16391,16393-16395,16397,16399-16402,16404,16406,16408,16410-16415,16417,16419-16420,16422-16425,16427,16429-16440,16442,16444,16446,16448-16449,16451,16453,16455-16463,16465-16472,16474-16475,16477-16484,16486,16488,16490-16497,16499,16501-16503,16505-16512,16514-16517,16519,16521,16523,16525,16527-16532,16534,16536-16541,16543,16545-16554,16556,16558-16565,16567-16575,16577-16584,16586-16588,16590,16592-16593,16595-16596,16598,16600-16601,16603-16608,16610-16614,16616-16618,16620-16621,16623-16624,16626,16628,16630,16632-16638,16640,16642,16644,16646-16651,16653-16663,16665,16667,16669,16671,16673,16675,16677,16679-16680,16682,16684,16686,16688-16692,16694-16695,16697-16699,16701,16703,16705-16706,16708,16710,16712,16714,16716-16718,16720-16728,16730-16732,16734-16739,16741,16743-16746,16748-16750,16752-16755,16757,16759-16761,16763,16765,16767,16769-16774,16776,16778-16783,16785-16788,16790,16792,16794,16796-16802,16804-16807,16809,16811-16817,16819,16821-16825,16827-16831,16833,16835-16836,16838,16840-16844,16846-16847,16849,16851,16853-16854,16856-16859,16861,16863-16865,16867,16869-16871,16873,16875-16876,16878,16880-16881,16883,16885,16887-16888,16890,16892,16894-16900,16902,16904,16906,16908-16909,16911-16916,16918-16919,16921,16923,16925,16927,16929-16930,16932,16934,16936-16937,16939-16942,16944,16946,16948,16950,16952-16953,16955-16959,16961,16963,16965-16970,16972,16974-16977,16979-16982,16984,16986,16988-16999,17001,17003,17005-17018,17020-17023,17025-17026,17028-17033,17035,17037,17039-17040,17042-17050,17052-17053,17055,17057-17058,17060,17062-17064,17066,17068-17074
\ No newline at end of property
+/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783,14785-14792,14794-14813,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14847,14849-14866,14868-14869,14871,14873-14875,14877-14878,14880-14884,14886-14896,14898,14900-14902,14904,14906-14909,14911-14915,14917-14919,14921-14922,14924-14978,14980-15258,15260-15261,15263-15264,15266-15285,15287-15288,15290-15291,15293,15295,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15356,15358,15360-15541,15543-15566,15568-15569,15571,15573-15581,15583,15585-15617,15619,15621-15630,15632-15635,15637-15639,15641-15643,15645,15647-15665,15667-15668,15670-15671,15673-15693,15695-15712,15714-15764,15766-15767,15769-15787,15789-15802,15804-15811,15813-15814,15816-15818,15820-15849,15851-15887,15889-15900,15902-16046,16048-16051,16053,16055,16057-16063,16065-16071,16073-16077,16079-16081,16083-16099,16101-16130,16132-16140,16142,16144-16212,16214-16219,16221,16223-16224,16226,16228-16229,16231,16233,16235,16237,16239-16240,16242,16244-16246,16248,16250-16251,16253-16255,16257-16259,16261,16263,16265,16267,16269-16276,16278,16280-16283,16285,16287-16288,16290,16292-16295,16297-16305,16307-16314,16316-16318,16320-16322,16324,16326-16330,16332,16334,16336,16338-16339,16341-16342,16344,16346,16348,16350,16352-16353,16355-16358,16360,16362,16364-16369,16371,16373,16375-16378,16380,16382-16383,16385,16387,16389,16391,16393-16395,16397,16399-16402,16404,16406,16408,16410-16415,16417,16419-16420,16422-16425,16427,16429-16440,16442,16444,16446,16448-16449,16451,16453,16455-16463,16465-16472,16474-16475,16477-16484,16486,16488,16490-16497,16499,16501-16503,16505-16512,16514-16517,16519,16521,16523,16525,16527-16532,16534,16536-16541,16543,16545-16554,16556,16558-16565,16567-16575,16577-16584,16586-16588,16590,16592-16593,16595-16596,16598,16600-16601,16603-16608,16610-16614,16616-16618,16620-16621,16623-16624,16626,16628,16630,16632-16638,16640,16642,16644,16646-16651,16653-16663,16665,16667,16669,16671,16673,16675,16677,16679-16680,16682,16684,16686,16688-16692,16694-16695,16697-16699,16701,16703,16705-16706,16708,16710,16712,16714,16716-16718,16720-16728,16730-16732,16734-16739,16741,16743-16746,16748-16750,16752-16755,16757,16759-16761,16763,16765,16767,16769-16774,16776,16778-16783,16785-16788,16790,16792,16794,16796-16802,16804-16807,16809,16811-16817,16819,16821-16825,16827-16831,16833,16835-16836,16838,16840-16844,16846-16847,16849,16851,16853-16854,16856-16859,16861,16863-16865,16867,16869-16871,16873,16875-16876,16878,16880-16881,16883,16885,16887-16888,16890,16892,16894-16900,16902,16904,16906,16908-16909,16911-16916,16918-16919,16921,16923,16925,16927,16929-16930,16932,16934,16936-16937,16939-16942,16944,16946,16948,16950,16952-16953,16955-16959,16961,16963,16965-16970,16972,16974-16977,16979-16982,16984,16986,16988-16999,17001,17003,17005-17018,17020-17023,17025-17026,17028-17033,17035,17037,17039-17040,17042-17050,17052-17053,17055,17057-17058,17060,17062-17064,17066,17068-17074,17076-17088
\ No newline at end of property
Index: branches/Version-2_0-branch/booking
===================================================================
--- branches/Version-2_0-branch/booking 2017-09-18 08:37:02 UTC (rev 17088)
+++ branches/Version-2_0-branch/booking 2017-09-18 08:38:48 UTC (rev 17089)

Property changes on: branches/Version-2_0-branch/booking
___________________________________________________________________
Modified: svn:mergeinfo
## -1,3 +1,3 ##
 /branches/dev-syncromind-2/booking:14933-16846
 /branches/stavangerkommune/booking:9468-12740,12743-12875,12986
-/trunk/booking:14721-14732,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14871,14886-14896,14900-14902,14917-14919,14924-14978,14980-15258,15266-15285,15287-15288,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15360-15541,15543-15566,15568-15569,15585-15617,15621-15630,15637-15639,15641-15643,15645,15647-15665,15667-15668,15695-15712,15714-15764,15820-15849,15889-15900,15902-16046,16055,16101-16130,16144-16212,16297-16305,16307-16314,16393-16395,16490-16497,16514-16517,16534,16567-16575,16577-16584,16586-16588,16590,16592-16593,16595-16596,16598,16616-16618,16730,16734-16739,16748-16750,16769-16774,16785-16788,16796-16802,16835-16836,16846-16847,16883,16885,16908-16909,16939-16942,16944,16946,16948,17020-17023,17028-17033,17039-17040
\ No newline at end of property
+/trunk/booking:14721-14732,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14871,14886-14896,14900-14902,14917-14919,14924-14978,14980-15258,15266-15285,15287-15288,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15360-15541,15543-15566,15568-15569,15585-15617,15621-15630,15637-15639,15641-15643,15645,15647-15665,15667-15668,15695-15712,15714-15764,15820-15849,15889-15900,15902-16046,16055,16101-16130,16144-16212,16297-16305,16307-16314,16393-16395,16490-16497,16514-16517,16534,16567-16575,16577-16584,16586-16588,16590,16592-16593,16595-16596,16598,16616-16618,16730,16734-16739,16748-16750,16769-16774,16785-16788,16796-16802,16835-16836,16846-16847,16883,16885,16908-16909,16939-16942,16944,16946,16948,17020-17023,17028-17033,17039-17040,17076-17088
\ No newline at end of property
Modified: branches/Version-2_0-branch/booking/inc/class.soallocation.inc.php
===================================================================
--- branches/Version-2_0-branch/booking/inc/class.soallocation.inc.php  
2017-09-18 08:37:02 UTC (rev 17088)
+++ branches/Version-2_0-branch/booking/inc/class.soallocation.inc.php  
2017-09-18 08:38:48 UTC (rev 17089)
@@ -291,6 +291,8 @@
                        $id = (int) $id;
                        $db = $this->db;
                        $db->transaction_begin();
+                       $table_name = $this->table_name . '_cost';
+                       $sql = "DELETE FROM $table_name WHERE allocation_id = 
($id)";
                        $table_name = $this->table_name . '_resource';
                        $sql = "DELETE FROM $table_name WHERE allocation_id = 
($id)";
                        $db->query($sql, __LINE__, __FILE__);

Modified: branches/Version-2_0-branch/booking/inc/class.sobooking.inc.php
===================================================================
--- branches/Version-2_0-branch/booking/inc/class.sobooking.inc.php     
2017-09-18 08:37:02 UTC (rev 17088)
+++ branches/Version-2_0-branch/booking/inc/class.sobooking.inc.php     
2017-09-18 08:38:48 UTC (rev 17089)
@@ -467,6 +467,8 @@
                {
                        $db = $this->db;
                        $db->transaction_begin();
+                       $sql = "DELETE FROM bb_allocation_cost WHERE 
allocation_id = ($id)";
+                       $db->query($sql, __LINE__, __FILE__);
                        $sql = "DELETE FROM bb_allocation_resource WHERE 
allocation_id = ($id)";
                        $db->query($sql, __LINE__, __FILE__);
                        $sql = "DELETE FROM bb_allocation WHERE id = ($id)";

Modified: branches/Version-2_0-branch/eventplanner/inc/class.sobooking.inc.php
===================================================================
--- branches/Version-2_0-branch/eventplanner/inc/class.sobooking.inc.php        
2017-09-18 08:37:02 UTC (rev 17088)
+++ branches/Version-2_0-branch/eventplanner/inc/class.sobooking.inc.php        
2017-09-18 08:38:48 UTC (rev 17089)
@@ -55,6 +55,15 @@
                        return self::$so;
                }
 
+               function _get_conditions( $query, $filters )
+               {
+                       $clauses = parent::_get_conditions($query, $filters);
+
+                       $clauses .= ' AND customer_id IS NOT NULL';
+
+                       return $clauses;
+
+               }
                function get_acl_condition( )
                {
                        if($this->relaxe_acl)

Modified: 
branches/Version-2_0-branch/eventplanner/inc/class.uiapplication.inc.php
===================================================================
--- branches/Version-2_0-branch/eventplanner/inc/class.uiapplication.inc.php    
2017-09-18 08:37:02 UTC (rev 17088)
+++ branches/Version-2_0-branch/eventplanner/inc/class.uiapplication.inc.php    
2017-09-18 08:38:48 UTC (rev 17089)
@@ -417,8 +417,19 @@
                                        array('order' => 
json_encode(array(1,'asc'))),
                                )
                        );
-                       $GLOBALS['phpgw']->jqcal->add_listener('date_start');
-                       $GLOBALS['phpgw']->jqcal->add_listener('date_end');
+
+                       $config_calendar = array();
+                       $active_year = !empty($config['active_year']) ? 
$config['active_year'] : null;
+                       if($active_year)
+                       {
+                               $config_calendar = array(
+                                       'min_date' => "{$active_year}, 1 -1, 1",
+                                       'max_date' => "{$active_year}, 12 -1, 
31"
+                               );
+                       }
+
+                       $GLOBALS['phpgw']->jqcal->add_listener('date_start', 
'date', '', $config_calendar);
+                       $GLOBALS['phpgw']->jqcal->add_listener('date_end', 
'date', '', $config_calendar);
                        $GLOBALS['phpgw']->jqcal2->add_listener('from_', 
'datetime', $application->date_start, array(
                                        'min_date' => date('Y/m/d', 
$application->date_start),
                                        'max_date' => date('Y/m/d', 
$application->date_end)

Modified: branches/Version-2_0-branch/eventplanner/inc/class.uibooking.inc.php
===================================================================
--- branches/Version-2_0-branch/eventplanner/inc/class.uibooking.inc.php        
2017-09-18 08:37:02 UTC (rev 17088)
+++ branches/Version-2_0-branch/eventplanner/inc/class.uibooking.inc.php        
2017-09-18 08:38:48 UTC (rev 17089)
@@ -82,23 +82,6 @@
                                'form' => array(
                                        'toolbar' => array(
                                                'item' => array(
-//                                                     array(
-//                                                             'type' => 
'autocomplete',
-//                                                             'name' => 
'application',
-//                                                             'app' => 
$this->currentapp,
-//                                                             'ui' => 
'application',
-//                                                             'function' => 
'get_list',
-//                                                             'label_attr' => 
'title',
-//                                                             'text' => 
lang('application') . ':',
-//                                                             
'requestGenerator' => 'requestWithApplicationFilter'
-//                                                     ),
-                                                       array(
-                                                               'type' => 
'checkbox',
-                                                               'name' => 
'filter_active',
-                                                               'text' => 
lang('showall'),
-                                                               'value' => 1,
-                                                               'checked' => 1,
-                                                       )
                                                )
                                        )
                                ),

Modified: 
branches/Version-2_0-branch/eventplanner/inc/class.uicustomer_report.inc.php
===================================================================
--- 
branches/Version-2_0-branch/eventplanner/inc/class.uicustomer_report.inc.php    
    2017-09-18 08:37:02 UTC (rev 17088)
+++ 
branches/Version-2_0-branch/eventplanner/inc/class.uicustomer_report.inc.php    
    2017-09-18 08:38:48 UTC (rev 17089)
@@ -188,11 +188,14 @@
                                )
                        );
 
-                       $filters = $this->_get_filters();
+                       if($this->currentapp == 'eventplanner')
+                       {
+                               $filters = $this->_get_filters();
 
-                       foreach ($filters as $filter)
-                       {
-                               array_unshift($data['form']['toolbar']['item'], 
$filter);
+                               foreach ($filters as $filter)
+                               {
+                                       
array_unshift($data['form']['toolbar']['item'], $filter);
+                               }
                        }
 
                        $parameters = array(
@@ -331,7 +334,7 @@
                        
self::render_template_xsl(array('report','application_info', 
'datatable_inline', 'attributes_form'), array($mode => $data));
                }
 
-               
+
                public function save()
                {
                        parent::save();

Modified: branches/Version-2_0-branch/eventplanner/inc/class.uivendor.inc.php
===================================================================
--- branches/Version-2_0-branch/eventplanner/inc/class.uivendor.inc.php 
2017-09-18 08:37:02 UTC (rev 17088)
+++ branches/Version-2_0-branch/eventplanner/inc/class.uivendor.inc.php 
2017-09-18 08:38:48 UTC (rev 17089)
@@ -176,7 +176,7 @@
                public function add()
                {
                        
self::set_active_menu("{$this->currentapp}::vendor::new_vendor");
-                       parent::add();  
+                       parent::add();
                }
 
                /*
@@ -231,7 +231,7 @@
                                array('key' => 'author', 'label' => 
lang('User'), 'sortable' => true, 'resizeable' => true),
                                array('key' => 'comment', 'label' => 
lang('Note'), 'sortable' => true, 'resizeable' => true)
                        );
- 
+
                        $datatable_def[] = array(
                                'container' => 'datatable-container_0',
                                'requestUrl' => "''",
@@ -277,12 +277,16 @@
                                )
                        );
 
+                       $config = CreateObject('phpgwapi.config', 
'eventplanner')->read();
+                       $default_category = 
!empty($config['default_vendor_category']) ? $config['default_vendor_category'] 
: null;
+
+                       $vendor->organization_number = 
$vendor->organization_number ? $vendor->organization_number :  
phpgw::get_var('org_id','int' , 'SESSION');
                        $data = array(
                                'datatable_def' => $datatable_def,
                                'form_action' => self::link(array('menuaction' 
=> "{$this->currentapp}.uivendor.save")),
                                'cancel_url' => self::link(array('menuaction' 
=> "{$this->currentapp}.uivendor.index",)),
                                'vendor' => $vendor,
-                               'category_list' => array('options' => 
$this->get_category_options( $vendor->category_id )),
+                               'category_list' => array('options' => 
$this->get_category_options( $vendor->category_id ? $vendor->category_id : 
$default_category )),
                                'mode' => $mode,
                                'tabs' => 
phpgwapi_jquery::tabview_generate($tabs, $active_tab),
                                'value_active_tab' => $active_tab
@@ -292,7 +296,7 @@
                        self::add_javascript($this->currentapp, 'portico', 
'vendor.edit.js');
                        self::render_template_xsl(array('vendor', 
'datatable_inline'), array($mode => $data));
                }
-               
+
                /*
                 * Get the vendor with the id given in the http variable 'id'
                 */

Modified: branches/Version-2_0-branch/eventplanner/inc/hook_config.inc.php
===================================================================
--- branches/Version-2_0-branch/eventplanner/inc/hook_config.inc.php    
2017-09-18 08:37:02 UTC (rev 17088)
+++ branches/Version-2_0-branch/eventplanner/inc/hook_config.inc.php    
2017-09-18 08:38:48 UTC (rev 17089)
@@ -42,3 +42,66 @@
                return $cat_select;
        }
 
+       function default_vendor_category( $config )
+       {
+               $selected = isset($config['default_vendor_category']) ? 
$config['default_vendor_category'] : null;
+
+               $status_entries = execMethod('eventplanner.bogeneric.get_list', 
array('type' => 'vendor_category',
+                       'selected' => $selected));
+
+               $out = '<option value="">' . lang('none selected') . 
'</option>' . "\n";
+               foreach ($status_entries as $status)
+               {
+                       $selected = $status['selected'] ? ' selected = 
"selected"' : '';
+
+                       $out .= <<<HTML
+                       <option 
value='{$status['id']}'{$selected}>{$status['name']}</option>
+HTML;
+               }
+               return $out;
+       }
+
+       function vendor_receipt_text_editor( $config )
+       {
+               phpgw::import_class('phpgwapi.jquery');
+               if 
(empty($GLOBALS['phpgw_info']['user']['preferences']['common']['rteditor'])
+                       || 
$GLOBALS['phpgw_info']['user']['preferences']['common']['rteditor'] != 
'ckeditor')
+               {
+                       return;
+               }
+               phpgwapi_jquery::init_ckeditor('vendor_receipt_text');
+       }
+
+       function customer_receipt_text_editor( $config )
+       {
+               phpgw::import_class('phpgwapi.jquery');
+               if 
(empty($GLOBALS['phpgw_info']['user']['preferences']['common']['rteditor'])
+                       || 
$GLOBALS['phpgw_info']['user']['preferences']['common']['rteditor'] != 
'ckeditor')
+               {
+                       return;
+               }
+               phpgwapi_jquery::init_ckeditor('customer_receipt_text');
+       }
+
+       function vendor_canceled_text_editor( $config )
+       {
+               phpgw::import_class('phpgwapi.jquery');
+               if 
(empty($GLOBALS['phpgw_info']['user']['preferences']['common']['rteditor'])
+                       || 
$GLOBALS['phpgw_info']['user']['preferences']['common']['rteditor'] != 
'ckeditor')
+               {
+                       return;
+               }
+               phpgwapi_jquery::init_ckeditor('vendor_canceled_text');
+       }
+
+       function customer_canceled_text_editor( $config )
+       {
+               phpgw::import_class('phpgwapi.jquery');
+               if 
(empty($GLOBALS['phpgw_info']['user']['preferences']['common']['rteditor'])
+                       || 
$GLOBALS['phpgw_info']['user']['preferences']['common']['rteditor'] != 
'ckeditor')
+               {
+                       return;
+               }
+               phpgwapi_jquery::init_ckeditor('customer_canceled_text');
+       }
+

Modified: branches/Version-2_0-branch/eventplanner/setup/phpgw_no.lang
===================================================================
--- branches/Version-2_0-branch/eventplanner/setup/phpgw_no.lang        
2017-09-18 08:37:02 UTC (rev 17088)
+++ branches/Version-2_0-branch/eventplanner/setup/phpgw_no.lang        
2017-09-18 08:38:48 UTC (rev 17089)
@@ -45,7 +45,7 @@
 rig up min before      eventplanner    no      Antatt oppriggingstid
 rig down min after     eventplanner    no      Antatt nedriggingstid
 technical support      eventplanner    no      Teknisk støtte
-charge per unit        eventplanner    no      Betaling pr 
forestilling/kurs/omvisning
+charge per unit        eventplanner    no      Betaling pr arrangement
 event timespan eventplanner    no      Programvarighet (minutter)
 number of units        eventplanner    no      Antall arrangement
 integer        eventplanner    no      Heltall
@@ -70,7 +70,7 @@
 depth  eventplanner    no      Dybde
 wardrobe       eventplanner    no      Kryss av for behov for utøvergarderobe
 audience limit eventplanner    no      Maksimum antall publikum
-raider eventplanner    no      Andre raiderønsker – (valgfri)
+raider eventplanner    no      Andre ønsker
 vendor report  eventplanner    no      Tilbakemelding fra utøver
 calendar       eventplanner    no      Kalender
 from   eventplanner    no      Fra
@@ -141,7 +141,7 @@
 completed      eventplanner    no      fullført
 custom field groups    eventplanner    no      Gruppe av tilpassede felt
 customer category      eventplanner    no      Tilpasset kategory
-minute eventplanner    no      Minutt
+minute eventplanner    no      Minutter
 select date    eventplanner    no      Velg dato
 type   eventplanner    no      Type
 vendor category        eventplanner    no      Leverandør kategori
@@ -161,4 +161,11 @@
 application public type public eventplanner    no       Breddetilbud (et 
arrangement der alle brukere/beboere på en institusjon kan delta)
 my applications        eventplanner    no      Mine søknader
 new application        eventplanner    no      Ny søknad
-new vendor     eventplanner    no      Ny utøver
\ No newline at end of file
+new vendor     eventplanner    no      Ny utøver
+default vendor category        eventplanner    no      Default utøverkategori
+default application category   eventplanner    no      Default søknadskategori
+vendor name    eventplanner    no      Artistnavn/utøver/gruppe
+sum    eventplanner    no      Sum
+active application year        eventplanner    no      Aktivt søknadsår
+my bookings    eventplanner    no      Mine bookinger
+My customer report     eventplanner    no      Mine tilbakemeldinger
\ No newline at end of file

Modified: 
branches/Version-2_0-branch/eventplanner/templates/base/application.xsl
===================================================================
--- branches/Version-2_0-branch/eventplanner/templates/base/application.xsl     
2017-09-18 08:37:02 UTC (rev 17088)
+++ branches/Version-2_0-branch/eventplanner/templates/base/application.xsl     
2017-09-18 08:38:48 UTC (rev 17089)
@@ -582,7 +582,9 @@
                                                                                
<thead>
                                                                                
        <tr>
                                                                                
                <th></th>
-                                                                               
                <th>Minutt</th>
+                                                                               
                <th>
+                                                                               
                        <xsl:value-of select="php:function('lang', 'minute')"/>
+                                                                               
                </th>
                                                                                
        </tr>
                                                                                
</thead>
                                                                                
<tbody>
@@ -591,13 +593,16 @@
                                                                                
                        <xsl:value-of select="php:function('lang', 'rig up min 
before')"/>
                                                                                
                </td>
                                                                                
                <td>
-                                                                               
                        <input type="text" id="rig_up_min_before" 
name="rig_up_min_before" value="{application/rig_up_min_before}" size="3">
+                                                                               
                        <input type="text" id="rig_up_min_before" 
name="rig_up_min_before" value="{application/rig_up_min_before}" size="5">
                                                                                
                                <xsl:attribute name="data-validation">
                                                                                
                                        <xsl:text>number</xsl:text>
                                                                                
                                </xsl:attribute>
-                                                                               
                                <xsl:attribute name="data-validation-optional">
-                                                                               
                                        <xsl:text>true</xsl:text>
+                                                                               
                                <xsl:attribute name="data-validation-error-msg">
+                                                                               
                                        <xsl:value-of 
select="php:function('lang', 'rig up min before')"/>
                                                                                
                                </xsl:attribute>
+                                                                               
                                <xsl:attribute name="placeholder">
+                                                                               
                                        <xsl:value-of 
select="php:function('lang', 'integer')"/>
+                                                                               
                                </xsl:attribute>
                                                                                
                        </input>
                                                                                
                </td>
                                                                                
        </tr>
@@ -606,13 +611,16 @@
                                                                                
                        <xsl:value-of select="php:function('lang', 'rig down 
min after')"/>
                                                                                
                </td>
                                                                                
                <td>
-                                                                               
                        <input type="text" id="rig_down_min_after" 
name="rig_down_min_after" value="{application/rig_down_min_after}" size="3">
+                                                                               
                        <input type="text" id="rig_down_min_after" 
name="rig_down_min_after" value="{application/rig_down_min_after}" size="5">
                                                                                
                                <xsl:attribute name="data-validation">
                                                                                
                                        <xsl:text>number</xsl:text>
                                                                                
                                </xsl:attribute>
-                                                                               
                                <xsl:attribute name="data-validation-optional">
-                                                                               
                                        <xsl:text>true</xsl:text>
+                                                                               
                                <xsl:attribute name="data-validation-error-msg">
+                                                                               
                                        <xsl:value-of 
select="php:function('lang', 'rig down min after')"/>
                                                                                
                                </xsl:attribute>
+                                                                               
                                <xsl:attribute name="placeholder">
+                                                                               
                                        <xsl:value-of 
select="php:function('lang', 'integer')"/>
+                                                                               
                                </xsl:attribute>
                                                                                
                        </input>
                                                                                
                </td>
                                                                                
        </tr>

Modified: branches/Version-2_0-branch/eventplanner/templates/base/config.tpl
===================================================================
--- branches/Version-2_0-branch/eventplanner/templates/base/config.tpl  
2017-09-18 08:37:02 UTC (rev 17088)
+++ branches/Version-2_0-branch/eventplanner/templates/base/config.tpl  
2017-09-18 08:38:48 UTC (rev 17089)
@@ -15,6 +15,14 @@
                        </td>
                </tr>
                <tr>
+                       <td>{lang_default_vendor_category}:</td>
+                       <td>
+                               <select 
name="newsettings[default_vendor_category]">
+                                       {hook_default_vendor_category}
+                               </select>
+                       </td>
+               </tr>
+               <tr>
                        <td>{lang_booking_interval}:</td>
                        <td>
                                <input type="number" 
name="newsettings[booking_interval]" value="{value_booking_interval}">
@@ -21,6 +29,10 @@
                        </td>
                </tr>
                <tr>
+                       <td>{lang_active_application_year}</td>
+                       <td><input type="number" 
name="newsettings[active_year]" value="{value_active_year}"></td>
+               </tr>
+               <tr>
                        <td>{lang_receipt_blind_copy}:</td>
                        <td>
                                <input type="text" 
name="newsettings[receipt_blind_copy]" value="{value_receipt_blind_copy}">
@@ -35,14 +47,16 @@
                <tr>
                        <td>{lang_vendor_receipt_text}:</td>
                        <td>
-                               <textarea  
name="newsettings[vendor_receipt_text]">{value_vendor_receipt_text}</textarea>
+                               <textarea id="vendor_receipt_text" 
name="newsettings[vendor_receipt_text]">{value_vendor_receipt_text}</textarea>
                        </td>
+                       {hook_vendor_receipt_text_editor}
                </tr>
                <tr>
                        <td>{lang_customer_receipt_text}:</td>
                        <td>
-                               <textarea  
name="newsettings[customer_receipt_text]">{value_customer_receipt_text}</textarea>
+                               <textarea id="customer_receipt_text" 
name="newsettings[customer_receipt_text]">{value_customer_receipt_text}</textarea>
                        </td>
+                       {hook_customer_receipt_text_editor}
                </tr>
                <tr>
                        <td>{lang_canceled_subject}:</td>
@@ -53,14 +67,16 @@
                <tr>
                        <td>{lang_vendor_canceled_text}:</td>
                        <td>
-                               <textarea  
name="newsettings[vendor_canceled_text]">{value_vendor_canceled_text}</textarea>
+                               <textarea id="vendor_canceled_text" 
name="newsettings[vendor_canceled_text]">{value_vendor_canceled_text}</textarea>
                        </td>
+                       {hook_vendor_canceled_text_editor}
                </tr>
                <tr>
                        <td>{lang_customer_canceled_text}:</td>
                        <td>
-                               <textarea  
name="newsettings[customer_canceled_text]">{value_customer_canceled_text}</textarea>
+                               <textarea id="customer_canceled_text" 
name="newsettings[customer_canceled_text]">{value_customer_canceled_text}</textarea>
                        </td>
+                       {hook_customer_canceled_text_editor}
                </tr>
                <tr>
                        <td>{lang_uploader_filetypes}: jpg,gif,png</td>

Modified: 
branches/Version-2_0-branch/eventplannerfrontend/inc/class.hook_helper.inc.php
===================================================================
--- 
branches/Version-2_0-branch/eventplannerfrontend/inc/class.hook_helper.inc.php  
    2017-09-18 08:37:02 UTC (rev 17088)
+++ 
branches/Version-2_0-branch/eventplannerfrontend/inc/class.hook_helper.inc.php  
    2017-09-18 08:38:48 UTC (rev 17089)
@@ -124,9 +124,22 @@
                        {
                                return;
                        }
-                       $session_org_id = phpgw::get_var('session_org_id','int' 
, 'POST');
-                       if($session_org_id)
+
+                       $orgs = array();
+                       if(!empty($_SESSION['orgs']) && 
is_array($_SESSION['orgs']))
                        {
+                               $orgs = phpgw::get_var('orgs', 'string', 
'SESSION');
+                       }
+
+                       $session_org_id = 
phpgw::get_var('session_org_id','int', 'GET');
+
+                       function get_ids_from_array($org)
+                       {
+                               return $org['id'];
+                       }
+
+                       if($session_org_id && in_array($session_org_id, 
array_map("get_ids_from_array", $orgs)))
+                       {
                                try
                                {
                                        $_SESSION['org_id'] = 
createObject('booking.sfValidatorNorwegianOrganizationNumber')->clean($session_org_id);
@@ -133,12 +146,12 @@
                                }
                                catch (sfValidatorError $e)
                                {
-                                       $_SESSION['org_id'] = '';
+                                       $_SESSION['org_id'] = -1;
                                }
                        }
-                       else if ($_POST['session_org_id'])
+                       else if ($_GET['session_org_id'])
                        {
-                               $_SESSION['org_id'] = '';
+                               $_SESSION['org_id'] = -1;
                        }
 
                        /**
@@ -145,10 +158,8 @@
                         * $_SESSION['orgs'] is set in 
eventplannerfrontend_external_user::get_user_org_id()
                         */
 
-                       $orgs = array();
                        if(!empty($_SESSION['orgs']) && 
is_array($_SESSION['orgs']))
                        {
-                               $orgs = phpgw::get_var('orgs', 'string', 
'SESSION');
                                $org_id = phpgw::get_var('org_id','int' , 
'SESSION');
                        }
                        else
@@ -183,10 +194,14 @@
                                                        'menuaction' => 
phpgw::get_var('menuaction')
                                                )
                                        );
+                                       $base = '/eventplannerfrontend/';
+                                       $oArgs = '{menuaction:"' . 
phpgw::get_var('menuaction') .'"}';
                                }
                                else
                                {
                                        $action = 
$GLOBALS['phpgw']->link('/eventplannerfrontend/home.php');
+                                       $base = 
'/eventplannerfrontend/home.php';
+                                       $oArgs = '{}';
                                }
 
                                $message = 'Velg organisasjon';
@@ -193,8 +208,8 @@
 
                                $org_select = <<<HTML
                                
-                                       <label for="org_id">Velg 
Organisasjon:</label>
-                                       <select name="session_org_id" 
id="org_id" onChange="this.form.submit();">
+                                       <label for="session_org_id">Velg 
Organisasjon:</label>
+                                       <select name="session_org_id" 
id="session_org_id">
                                                {$org_option}
                                        </select>
                                
@@ -204,13 +219,32 @@
                        $html = <<<HTML
 
                        <div id="organsation_select">
-                               <form action="{$action}" method="POST">
-                                       $org_select
-                               </form>
+                               $org_select
                        </div>
 HTML;
 
+
                        echo $html;
+
+
+                       $js = <<<JS
+       <script type="text/javascript">
+               $(document).ready(function ()
+               {
+
+                       $("#session_org_id").change(function ()
+                       {
+                               var session_org_id = $(this).val();
+                               var oArgs = {$oArgs};
+                               oArgs.session_org_id = session_org_id;
+                               var requestUrl = phpGWLink('{$base}', oArgs);
+                               window.open(requestUrl, "_self");
+                       });
+               });
+       </script>
+JS;
+                       echo $js;
+
                }
 
                /**

Modified: 
branches/Version-2_0-branch/eventplannerfrontend/inc/class.menu.inc.php
===================================================================
--- branches/Version-2_0-branch/eventplannerfrontend/inc/class.menu.inc.php     
2017-09-18 08:37:02 UTC (rev 17088)
+++ branches/Version-2_0-branch/eventplannerfrontend/inc/class.menu.inc.php     
2017-09-18 08:38:48 UTC (rev 17089)
@@ -126,7 +126,7 @@
                                ),
                                'customer' => array(
                                        'text' => lang('customer'),
-                                       'url' =>  
phpgwapi_uicommon_jquery::link(  array('menuaction' => 
"eventplannerfrontend.uicustomer.index")),
+                                       'url' =>  
phpgwapi_uicommon_jquery::link( array('menuaction' => 
"eventplannerfrontend.uicustomer.index")),
                                        'image' => array('customer', 'navbar'),
                                ),
                                'new_user' => array(
@@ -135,6 +135,31 @@
                                        'image' => array('user', 'navbar'),
                                )
                );
+
+                       if ($GLOBALS['phpgw']->acl->check('.booking', 
PHPGW_ACL_READ, 'eventplannerfrontend'))
+                       {
+                               $menus['navigation']['customer']['children'] = 
array(
+                                               'booking' => array(
+                                                       'text' => lang('my 
bookings'),
+                                                       'url' => 
phpgwapi_uicommon_jquery::link( array('menuaction' => 
"eventplannerfrontend.uibooking.index")),
+                                                       'image' => 
array('customer', 'navbar'),
+                                               )
+                                       );
+                               $menus['navigation']['customer']['children'] = 
array(
+                                               'booking' => array(
+                                                       'text' => lang('my 
bookings'),
+                                                       'url' => 
phpgwapi_uicommon_jquery::link( array('menuaction' => 
"eventplannerfrontend.uibooking.index")),
+                                                       'image' => 
array('customer', 'navbar'),
+                                               )
+                                       );
+                               
$menus['navigation']['customer']['children']['customer_report'] = array(
+                                                       'text' => lang('My 
customer report'),
+                                                       'url' => 
phpgwapi_uicommon_jquery::link( array('menuaction' => 
"eventplannerfrontend.uicustomer_report.index")),
+                                                       'image' => 
array('customer_report', 'navbar'),
+                                       );
+
+                       }
+
                        $GLOBALS['phpgw_info']['flags']['currentapp'] = 
$incoming_app;
                        return $menus;
                }

Modified: 
branches/Version-2_0-branch/eventplannerfrontend/inc/class.uibooking.inc.php
===================================================================
--- 
branches/Version-2_0-branch/eventplannerfrontend/inc/class.uibooking.inc.php    
    2017-09-18 08:37:02 UTC (rev 17088)
+++ 
branches/Version-2_0-branch/eventplannerfrontend/inc/class.uibooking.inc.php    
    2017-09-18 08:38:48 UTC (rev 17089)
@@ -10,10 +10,26 @@
                        parent::__construct();
                }
 
+               public function index( )
+               {
+                       if (empty($this->permissions[PHPGW_ACL_READ]))
+                       {
+                               phpgw::no_access();
+                       }
+
+                       if (phpgw::get_var('phpgw_return_as') == 'json')
+                       {
+                               return $this->query();
+                       }
+
+                       
self::set_active_menu("{$this->currentapp}::customer::booking");
+                       parent::index();
+               }
+
                public function query()
                {
                        $params = $this->bo->build_default_read_params();
-                       $params['filters']['status'] = 
eventplanner_application::STATUS_APPROVED;
+       //              $params['filters']['status'] = 
eventplanner_application::STATUS_APPROVED;
                        $values = $this->bo->read($params);
                        array_walk($values["results"], array($this, 
"_add_links"), "eventplannerfrontend.uibooking.edit");
 

Modified: 
branches/Version-2_0-branch/eventplannerfrontend/inc/custom/default/Altinn2_Bergen_kommune.php
===================================================================
--- 
branches/Version-2_0-branch/eventplannerfrontend/inc/custom/default/Altinn2_Bergen_kommune.php
      2017-09-18 08:37:02 UTC (rev 17088)
+++ 
branches/Version-2_0-branch/eventplannerfrontend/inc/custom/default/Altinn2_Bergen_kommune.php
      2017-09-18 08:38:48 UTC (rev 17089)
@@ -125,7 +125,7 @@
 
                        if ($this->debug)
                        {
-                               $orgs[] = array('id' => '994239929', 'name' => 
'Bergen kommune');
+                               $orgs[] = array('id' => '994239929', 'name' => 
'Bølleball');
                                $_org_id = 994239929;
                        }
                        $_SESSION['orgs'] = $orgs;

Modified: 
branches/Version-2_0-branch/eventplannerfrontend/js/portico/application.edit.js
===================================================================
--- 
branches/Version-2_0-branch/eventplannerfrontend/js/portico/application.edit.js 
    2017-09-18 08:37:02 UTC (rev 17088)
+++ 
branches/Version-2_0-branch/eventplannerfrontend/js/portico/application.edit.js 
    2017-09-18 08:38:48 UTC (rev 17089)
@@ -199,7 +199,7 @@
 
        if (tab === 'calendar')
        {
-               $("#floating-box").hide();
+//             $("#floating-box").hide();
                $("#submit_group_bottom").hide();
        }
        else if (tab === 'first_tab')
@@ -206,15 +206,15 @@
        {
                if (id > 0)
                {
-                       $("#save_button").val(lang['save']);
+       //              $("#save_button").val(lang['save']);
                        $("#save_button_bottom").val(lang['save']);
                }
                else
                {
-                       $("#save_button").val(lang['next']);
+       //              $("#save_button").val(lang['next']);
                        $("#save_button_bottom").val(lang['next']);
                }
-               $("#floating-box").show();
+//             $("#floating-box").show();
                $("#submit_group_bottom").show();
        }
        else if (tab === 'demands')
@@ -221,22 +221,22 @@
        {
                if (id > 0)
                {
-                       $("#save_button").val(lang['save']);
+//                     $("#save_button").val(lang['save']);
                        $("#save_button_bottom").val(lang['save']);
                }
                else
                {
-                       $("#save_button").val(lang['next']);
+//                     $("#save_button").val(lang['next']);
                        $("#save_button_bottom").val(lang['next']);
                }
-               $("#floating-box").show();
+//             $("#floating-box").show();
                $("#submit_group_bottom").show();
        }
        else
        {
-               $("#save_button").val(lang['save']);
+//             $("#save_button").val(lang['save']);
                $("#save_button_bottom").val(lang['save']);
-               $("#floating-box").show();
+//             $("#floating-box").show();
                $("#submit_group_bottom").show();
        }
 };

Modified: branches/Version-2_0-branch/eventplannerfrontend/logout.php
===================================================================
--- branches/Version-2_0-branch/eventplannerfrontend/logout.php 2017-09-18 
08:37:02 UTC (rev 17088)
+++ branches/Version-2_0-branch/eventplannerfrontend/logout.php 2017-09-18 
08:38:48 UTC (rev 17089)
@@ -20,12 +20,14 @@
                'nonavbar'               => True
        );
 
+       $session_name = 'eventplannerfrontendsession';
+       $GLOBALS['phpgw_info']['flags']['session_name'] = $session_name;
+
        /**
        * Include phpgroupware header
        */
        include_once('../header.inc.php');
 
-       $session_name = 'eventplannerfrontendsession';
        $sessionid = phpgw::get_var($session_name);
 
        $verified = $GLOBALS['phpgw']->session->verify();

Modified: 
branches/Version-2_0-branch/eventplannerfrontend/templates/base/application.xsl
===================================================================
--- 
branches/Version-2_0-branch/eventplannerfrontend/templates/base/application.xsl 
    2017-09-18 08:37:02 UTC (rev 17088)
+++ 
branches/Version-2_0-branch/eventplannerfrontend/templates/base/application.xsl 
    2017-09-18 08:38:48 UTC (rev 17089)
@@ -44,6 +44,7 @@
                        <form id="form" name="form" method="post" 
action="{$form_action}" class="pure-form pure-form-aligned">
                                <div id="tab-content">
                                        <xsl:value-of 
disable-output-escaping="yes" select="tabs"/>
+                                       <!--
                                        <div id="floating-box">
                                                <div id="submitbox">
                                                        <xsl:variable 
name="lang_cancel">
@@ -77,6 +78,7 @@
                                                        </table>
                                                </div>
                                        </div>
+                                       -->
                                        <input type="hidden" id="active_tab" 
name="active_tab" value="{value_active_tab}"/>
                                        <div id="first_tab">
                                        <xsl:value-of 
disable-output-escaping="yes" select="application_condition"/>
@@ -154,8 +156,8 @@
                                                                                
<xsl:text>required</xsl:text>
                                                                        
</xsl:attribute>
                                                                </input>
-                                                       
-                                                               
+
+
                                                                <xsl:text> 
</xsl:text>
                                                                <a 
href="{new_vendor_url}" target="_blank">
                                                                        
<xsl:value-of select="php:function('lang', 'new')"/>
@@ -218,6 +220,12 @@
                                                                        
<xsl:value-of select="php:function('lang', 'other participants')"/>
                                                                </label>
                                                                <textarea 
cols="47" rows="7" name="other_participants" class="pure-input-1-2" >
+                                                                       
<xsl:attribute name="data-validation">
+                                                                               
<xsl:text>required</xsl:text>
+                                                                       
</xsl:attribute>
+                                                                       
<xsl:attribute name="data-validation-error-msg">
+                                                                               
<xsl:value-of select="php:function('lang', 'other participants')"/>
+                                                                       
</xsl:attribute>
                                                                        
<xsl:value-of select="application/other_participants"/>
                                                                </textarea>
                                                        </div>
@@ -302,6 +310,12 @@
                                                                        
<xsl:value-of select="php:function('lang', 'application public type')"/>
                                                                </label>
                                                                <select 
id="non_public" name="non_public" class="pure-input-1-2" >
+                                                                       
<xsl:attribute name="data-validation">
+                                                                               
<xsl:text>required</xsl:text>
+                                                                       
</xsl:attribute>
+                                                                       
<xsl:attribute name="data-validation-error-msg">
+                                                                               
<xsl:value-of select="php:function('lang', 'application public type')"/>
+                                                                       
</xsl:attribute>
                                                                        
<xsl:apply-templates select="list_public_types/options"/>
                                                                </select>
                                                        </div>
@@ -417,7 +431,7 @@
                                                                </textarea>
                                                        </div>
                                                </fieldset>
-                                               
+
                                        </div>
                                        <div id="demands">
                                                <fieldset>
@@ -429,31 +443,56 @@
                                                                <label>
                                                                        
<xsl:value-of select="php:function('lang', 'size of stage')"/>
                                                                </label>
-                                                               <input 
type="text" id="stage_width" name="stage_width" 
value="{application/stage_width}" size="2">
-                                                                       
<xsl:attribute name="title">
-                                                                               
<xsl:value-of select="php:function('lang', 'width')"/>
-                                                                       
</xsl:attribute>
-                                                                       
<xsl:attribute name="data-validation">
-                                                                               
<xsl:text>number</xsl:text>
-                                                                       
</xsl:attribute>
-                                                                       
<xsl:attribute name="data-validation-optional">
-                                                                               
<xsl:text>true</xsl:text>
-                                                                       
</xsl:attribute>
-                                                               </input>
-                                                               <xsl:text> X 
</xsl:text>
-                                                               <input 
type="text" id="stage_depth" name="stage_depth" 
value="{application/stage_depth}" size="2">
-                                                                       
<xsl:attribute name="data-validation">
-                                                                               
<xsl:text>number</xsl:text>
-                                                                       
</xsl:attribute>
-                                                                       
<xsl:attribute name="title">
-                                                                               
<xsl:value-of select="php:function('lang', 'depth')"/>
-                                                                       
</xsl:attribute>
-                                                                       
<xsl:attribute name="data-validation-optional">
-                                                                               
<xsl:text>true</xsl:text>
-                                                                       
</xsl:attribute>
-                                                               </input>
-                                                               <xsl:text> M 
</xsl:text>
-                                                               <input 
id="stage_size" type="text" disabled="disabled" size="3"/>
+                                                               <div 
class="pure-custom">
+                                                                       <table 
class="pure-table" border="0" cellspacing="2" cellpadding="2">
+                                                                               
<thead>
+                                                                               
        <tr>
+                                                                               
                <th>
+                                                                               
                        <xsl:value-of select="php:function('lang', 'width')"/>
+                                                                               
                </th>
+                                                                               
                <th>
+                                                                               
                        <xsl:value-of select="php:function('lang', 'depth')"/>
+                                                                               
                </th>
+                                                                               
                <th>
+                                                                               
                        <xsl:value-of select="php:function('lang', 'sum')"/>
+                                                                               
                </th>
+                                                                               
        </tr>
+                                                                               
</thead>
+                                                                               
<tbody id="application_stage_size">
+                                                                               
        <tr>
+                                                                               
                <td>
+                                                                               
                        <input type="text" id="stage_width" name="stage_width" 
value="{application/stage_width}" size="2">
+                                                                               
                                <xsl:attribute name="title">
+                                                                               
                                        <xsl:value-of 
select="php:function('lang', 'width')"/>
+                                                                               
                                </xsl:attribute>
+                                                                               
                                <xsl:attribute name="data-validation">
+                                                                               
                                        <xsl:text>number</xsl:text>
+                                                                               
                                </xsl:attribute>
+                                                                               
                                <xsl:attribute name="data-validation-optional">
+                                                                               
                                        <xsl:text>true</xsl:text>
+                                                                               
                                </xsl:attribute>
+                                                                               
                        </input>
+                                                                               
                </td>
+                                                                               
                <td>
+                                                                               
                        <input type="text" id="stage_depth" name="stage_depth" 
value="{application/stage_depth}" size="2">
+                                                                               
                                <xsl:attribute name="data-validation">
+                                                                               
                                        <xsl:text>number</xsl:text>
+                                                                               
                                </xsl:attribute>
+                                                                               
                                <xsl:attribute name="title">
+                                                                               
                                        <xsl:value-of 
select="php:function('lang', 'depth')"/>
+                                                                               
                                </xsl:attribute>
+                                                                               
                                <xsl:attribute name="data-validation-optional">
+                                                                               
                                        <xsl:text>true</xsl:text>
+                                                                               
                                </xsl:attribute>
+                                                                               
                        </input>
+                                                                               
                </td>
+                                                                               
                <td>
+                                                                               
                        <input id="stage_size" type="text" disabled="disabled" 
size="3"/>
+                                                                               
                </td>
+                                                                               
        </tr>
+                                                                               
</tbody>
+                                                                       </table>
+                                                               </div>
                                                        </div>
                                                        <div 
class="pure-control-group">
                                                                <label>
@@ -503,7 +542,9 @@
                                                                                
<thead>
                                                                                
        <tr>
                                                                                
                <th></th>
-                                                                               
                <th>Minutt</th>
+                                                                               
                <th>
+                                                                               
                        <xsl:value-of select="php:function('lang', 'minute')"/>
+                                                                               
                </th>
                                                                                
        </tr>
                                                                                
</thead>
                                                                                
<tbody>
@@ -512,13 +553,16 @@
                                                                                
                        <xsl:value-of select="php:function('lang', 'rig up min 
before')"/>
                                                                                
                </td>
                                                                                
                <td>
-                                                                               
                        <input type="text" id="rig_up_min_before" 
name="rig_up_min_before" value="{application/rig_up_min_before}" size="3">
+                                                                               
                        <input type="text" id="rig_up_min_before" 
name="rig_up_min_before" value="{application/rig_up_min_before}" size="5">
                                                                                
                                <xsl:attribute name="data-validation">
                                                                                
                                        <xsl:text>number</xsl:text>
                                                                                
                                </xsl:attribute>
-                                                                               
                                <xsl:attribute name="data-validation-optional">
-                                                                               
                                        <xsl:text>true</xsl:text>
+                                                                               
                                <xsl:attribute name="data-validation-error-msg">
+                                                                               
                                        <xsl:value-of 
select="php:function('lang', 'rig up min before')"/>
                                                                                
                                </xsl:attribute>
+                                                                               
                                <xsl:attribute name="placeholder">
+                                                                               
                                        <xsl:value-of 
select="php:function('lang', 'integer')"/>
+                                                                               
                                </xsl:attribute>
                                                                                
                        </input>
                                                                                
                </td>
                                                                                
        </tr>
@@ -527,13 +571,16 @@
                                                                                
                        <xsl:value-of select="php:function('lang', 'rig down 
min after')"/>
                                                                                
                </td>
                                                                                
                <td>
-                                                                               
                        <input type="text" id="rig_down_min_after" 
name="rig_down_min_after" value="{application/rig_down_min_after}" size="3">
+                                                                               
                        <input type="text" id="rig_down_min_after" 
name="rig_down_min_after" value="{application/rig_down_min_after}" size="5">
                                                                                
                                <xsl:attribute name="data-validation">
                                                                                
                                        <xsl:text>number</xsl:text>
                                                                                
                                </xsl:attribute>
-                                                                               
                                <xsl:attribute name="data-validation-optional">
-                                                                               
                                        <xsl:text>true</xsl:text>
+                                                                               
                                <xsl:attribute name="data-validation-error-msg">
+                                                                               
                                        <xsl:value-of 
select="php:function('lang', 'rig down min after')"/>
                                                                                
                                </xsl:attribute>
+                                                                               
                                <xsl:attribute name="placeholder">
+                                                                               
                                        <xsl:value-of 
select="php:function('lang', 'integer')"/>
+                                                                               
                                </xsl:attribute>
                                                                                
                        </input>
                                                                                
                </td>
                                                                                
        </tr>
@@ -617,7 +664,7 @@
 
                                                                                
        </tr>
                                                                                
        <tr>
-                                                                               
                <td>Anna utstyr (prosjektor, lerret mm)</td>
+                                                                               
                <td>Annet utstyr (prosjektor, lerret mm)</td>
                                                                                
                <td>
                                                                                
                </td>
                                                                                
                <td>
@@ -651,7 +698,7 @@
                                                <xsl:value-of 
disable-output-escaping="yes" select="application_condition"/>
                                                <fieldset>
                                                        <legend>
-                                                               
<xsl:text>Curriculum vitae</xsl:text>
+                                                               
<xsl:text>CV</xsl:text>
                                                        </legend>
                                                        <xsl:call-template 
name="file_upload">
                                                                <xsl:with-param 
name="section">cv</xsl:with-param>
@@ -678,7 +725,7 @@
                                                </fieldset>
                                                <fieldset>
                                                        <legend>
-                                                               <xsl:value-of 
select="php:function('lang', 'documents')"/>
+                                                               <xsl:value-of 
select="php:function('lang', 'program description')"/>
                                                        </legend>
                                                        <xsl:call-template 
name="file_upload">
                                                                <xsl:with-param 
name="section">documents</xsl:with-param>

Modified: 
branches/Version-2_0-branch/eventplannerfrontend/templates/base/css/base.css
===================================================================
--- 
branches/Version-2_0-branch/eventplannerfrontend/templates/base/css/base.css    
    2017-09-18 08:37:02 UTC (rev 17088)
+++ 
branches/Version-2_0-branch/eventplannerfrontend/templates/base/css/base.css    
    2017-09-18 08:38:48 UTC (rev 17089)
@@ -7,7 +7,7 @@
     z-index:100;
  }
 
-#org_id{
+#session_org_id{
     padding-top:0.2em;
     padding-bottom:0.1em;
        padding-right: 0.6em;
@@ -22,6 +22,6 @@
 }
 
 
-#organsation_select > form > label{
+#organsation_select > label{
  color:white
 }

Modified: 
branches/Version-2_0-branch/eventplannerfrontend/templates/base/vendor.xsl
===================================================================
--- branches/Version-2_0-branch/eventplannerfrontend/templates/base/vendor.xsl  
2017-09-18 08:37:02 UTC (rev 17088)
+++ branches/Version-2_0-branch/eventplannerfrontend/templates/base/vendor.xsl  
2017-09-18 08:38:48 UTC (rev 17089)
@@ -72,7 +72,7 @@
                                                                        
<xsl:text>required</xsl:text>
                                                                </xsl:attribute>
                                                                <xsl:attribute 
name="placeholder">
-                                                                       
<xsl:value-of select="php:function('lang', 'name')"/>
+                                                                       
<xsl:value-of select="php:function('lang', 'vendor name')"/>
                                                                </xsl:attribute>
                                                        </input>
                                                </div>

Modified: branches/Version-2_0-branch/phpgwapi/inc/class.jqcal.inc.php
===================================================================
--- branches/Version-2_0-branch/phpgwapi/inc/class.jqcal.inc.php        
2017-09-18 08:37:02 UTC (rev 17088)
+++ branches/Version-2_0-branch/phpgwapi/inc/class.jqcal.inc.php        
2017-09-18 08:38:48 UTC (rev 17089)
@@ -36,7 +36,7 @@
                        $this->lang_select_date      = lang('select date');
                }
 
-               function add_listener($name, $type = 'date', $value = '')
+               function add_listener($name, $type = 'date', $value = '', 
$config = array())
                {
                        switch($type)
                        {
@@ -54,7 +54,7 @@
                                        $_type = 'date';
                        }
 
-                       $this->_input_modern($name, $_type);
+                       $this->_input_modern($name, $_type, $config);
                        return "<input id='{$name}' type='text' 
value='{$value}' size='10' name='{$name}'/>";
                }
 
@@ -64,8 +64,26 @@
                * @access private
                * @param string $name the element ID
                */
-               function _input_modern($id, $type)
+               function _input_modern($id, $type, $config = array())
                {
+                       $date_range_arr = array();
+                       $date_range = '';
+
+                       if(!empty($config['min_date']))
+                       {
+                               $date_range_arr[] = "minDate:new 
Date({$config['min_date']})";
+                       }
+
+                       if(!empty($config['max_date']))
+                       {
+                               $date_range_arr[] = "maxDate:new 
Date({$config['max_date']})";
+                       }
+
+                       if($date_range_arr)
+                       {
+                               $date_range = ',' . implode(',', 
$date_range_arr);
+                       }
+
                        $js = <<<JS
                        $(function() {
                                $( "#{$id}" ).{$type}picker({ 
@@ -78,6 +96,9 @@
                                        buttonImage: "{$this->img_cal}",
                                        buttonText: "{$this->lang_select_date}",
                                        buttonImageOnly: true
+                                       {$date_range}
+                                       //new Date(2018, 1 -1, 1),//Date(year, 
month, day, hours, minutes, seconds, milliseconds)
+                                       //new Date(2018, 12 -1, 31)
                                }).keyup(function(e) {
                                        if(e.keyCode == 8 || e.keyCode == 46) {
                                                $.datepicker._clearDate(this);

Modified: branches/Version-2_0-branch/property/inc/class.botts.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.botts.inc.php        
2017-09-18 08:37:02 UTC (rev 17088)
+++ branches/Version-2_0-branch/property/inc/class.botts.inc.php        
2017-09-18 08:38:48 UTC (rev 17089)
@@ -706,6 +706,7 @@
                                }
                                $ticket['finnish_date'] = 
!empty($ticket['finnish_date']) ? 
$GLOBALS['phpgw']->common->show_date($ticket['finnish_date'], 
$this->dateformat) : '';
                                $ticket['order_deadline'] = 
!empty($ticket['order_deadline'])  ? 
$GLOBALS['phpgw']->common->show_date($ticket['order_deadline'], 
$this->dateformat) : '';
+                               $ticket['order_deadline2'] = 
!empty($ticket['order_deadline2'])  ? 
$GLOBALS['phpgw']->common->show_date($ticket['order_deadline2'], 
$this->dateformat) : '';
 
                                /*
                                  if ($ticket['status'] == 'X')
@@ -787,6 +788,10 @@
                        {
                                $ticket['order_deadline'] = 
$GLOBALS['phpgw']->common->show_date($ticket['order_deadline'], 
$this->dateformat);
                        }
+                       if ($ticket['order_deadline2'])
+                       {
+                               $ticket['order_deadline2'] = 
$GLOBALS['phpgw']->common->show_date($ticket['order_deadline2'], 
$this->dateformat);
+                       }
 
                        if ($ticket['location_code'])
                        {

Modified: branches/Version-2_0-branch/property/inc/class.soagreement.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.soagreement.inc.php  
2017-09-18 08:37:02 UTC (rev 17088)
+++ branches/Version-2_0-branch/property/inc/class.soagreement.inc.php  
2017-09-18 08:38:48 UTC (rev 17089)
@@ -1193,9 +1193,13 @@
                        return $this->db->f('descr', true);
                }
 
-               function get_vendor_contract ( $vendor_id )
+               function get_vendor_contract ( $vendor_id = 0)
                {
                        $vendor_id = (int)$vendor_id;
+                       if(!$vendor_id)
+                       {
+                               return array();
+                       }
                        $this->db->query("SELECT contract_id, name FROM 
fm_agreement WHERE status = 'active' AND contract_id IS NOT NULL AND vendor_id 
= {$vendor_id}", __LINE__, __FILE__);
                        $values = array();
                        while ($this->db->next_record())

Modified: branches/Version-2_0-branch/property/inc/class.sotts.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.sotts.inc.php        
2017-09-18 08:37:02 UTC (rev 17088)
+++ branches/Version-2_0-branch/property/inc/class.sotts.inc.php        
2017-09-18 08:38:48 UTC (rev 17089)
@@ -590,6 +590,7 @@
                                'b_account_id' => 'fm_tts_tickets.b_account_id',
                                'continuous' => 'fm_tts_tickets.continuous',
                                'order_deadline' => 
'fm_tts_tickets.order_deadline',
+                               'order_deadline2' => 
'fm_tts_tickets.order_deadline2',
                        );
 
                        $custom_cols = $this->custom->find('property', 
'.ticket', 0, '', 'ASC', 'attrib_sort', true, true);
@@ -785,6 +786,7 @@
                                                'b_account_id' => 
$this->db->f('b_account_id'),
                                                'continuous' => 
$this->db->f('continuous'),
                                                'order_deadline' => 
$this->db->f('order_deadline'),
+                                               'order_deadline2' => 
$this->db->f('order_deadline2'),
                                        );
 
                                        foreach ($custom_cols as $custom_col)
@@ -874,6 +876,7 @@
                                $ticket['order_id'] = $this->db->f('order_id');
                                $ticket['continuous'] = 
$this->db->f('continuous');
                                $ticket['order_deadline'] = 
$this->db->f('order_deadline');
+                               $ticket['order_deadline2'] = 
$this->db->f('order_deadline2');
                                $ticket['vendor_id'] = 
$this->db->f('vendor_id');
                                $ticket['contract_id'] = 
$this->db->f('contract_id',true);
                                $ticket['service_id'] = 
$this->db->f('service_id',true);
@@ -1742,11 +1745,17 @@
                                $value_set['branch_id'] = $ticket['branch_id'];
                                $value_set['tax_code'] = $ticket['tax_code'];
                                $value_set['continuous'] = 
$ticket['continuous'];
+                               $value_set['order_deadline'] = 
$ticket['order_deadline'];// delete value if empty
+                               $value_set['order_deadline2'] = 
$ticket['order_deadline2'];// delete value if empty
 
                                if(!empty($ticket['order_deadline']))
                                {
                                        $value_set['order_deadline'] = 
phpgwapi_datetime::date_to_timestamp($ticket['order_deadline']);
                                }
+                               if(!empty($ticket['order_deadline2']))
+                               {
+                                       $value_set['order_deadline2'] = 
phpgwapi_datetime::date_to_timestamp($ticket['order_deadline2']);
+                               }
 
                                if(isset($ticket['vendor_email']) && 
is_array($ticket['vendor_email']))
                                {

Modified: branches/Version-2_0-branch/property/inc/class.uitts.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uitts.inc.php        
2017-09-18 08:37:02 UTC (rev 17088)
+++ branches/Version-2_0-branch/property/inc/class.uitts.inc.php        
2017-09-18 08:38:48 UTC (rev 17089)
@@ -2183,6 +2183,7 @@
                        if ($access_order)
                        {
                                
$GLOBALS['phpgw']->jqcal->add_listener('order_deadline');
+                               
$GLOBALS['phpgw']->jqcal->add_listener('order_deadline2');
 
                                $b_account_data = 
$this->bocommon->initiate_ui_budget_account_lookup(array
                                        (
@@ -3019,6 +3020,7 @@
                                'value_target' => $ticket['target'],
                                'value_finnish_date' => $ticket['finnish_date'],
                                'value_order_deadline' => 
$ticket['order_deadline'],
+                               'value_order_deadline2' => 
$ticket['order_deadline2'],
                                'link_entity' => $link_entity,
                                'msgbox_data' => 
$GLOBALS['phpgw']->common->msgbox($msgbox_data),
                                'location_data2' => $location_data,
@@ -3389,8 +3391,12 @@
 
                        if($ticket['order_deadline'])
                        {
-                               $data[] = array('col1' => lang('deadline'), 
'col2' =>"<b>{$ticket['order_deadline']}</b>");
+                               $data[] = array('col1' => lang('deadline for 
start'), 'col2' =>"<b>{$ticket['order_deadline']}</b>");
                        }
+                       if($ticket['order_deadline2'])
+                       {
+                               $data[] = array('col1' => lang('deadline for 
execution'), 'col2' =>"<b>{$ticket['order_deadline2']}</b>");
+                       }
 
                        $pdf->ezTable($data, array('col1' => '', 'col2' => ''), 
'', array('showHeadings' => 0,
                                'shaded' => 0, 'xPos' => 0,
@@ -3721,9 +3727,14 @@
                                }
                        }
 
+                       $user_phone = str_replace(' ', '', $user_phone);
                        $contact_phone = str_replace(' ', '', $contact_phone);
                        $contact_phone2 = str_replace(' ', '', $contact_phone2);
 
+                       if(  preg_match( '/^(\d{2})(\d{2})(\d{2})(\d{2})$/', 
$user_phone,  $matches ) )
+                       {
+                               $user_phone = "{$matches[1]} $matches[2] 
$matches[2] $matches[4]";
+                       }
                        if(  preg_match( '/^(\d{2})(\d{2})(\d{2})(\d{2})$/', 
$contact_phone,  $matches ) )
                        {
                                $contact_phone = "{$matches[1]} $matches[2] 
$matches[2] $matches[4]";
@@ -3792,7 +3803,7 @@
                                        . "{$department}<br/>"
                                        . "Org.nr: 
{$this->bo->config->config_data['org_unit_id']}"
                                        . "</td>";
-                       $body .= "<td valign='top'>v/saksbehandler: 
{$user_name}<br/>"
+                       $body .= "<td valign='top'>Saksbehandler: 
{$user_name}<br/>"
                                        . "Ressursnr.: {$ressursnr}<br/>"
                                        . "</td>";
                        $body .= "</tr>";
@@ -3808,12 +3819,57 @@
 
                        $deadline_block = '';
 
+                       if($ticket['order_deadline'] || 
$ticket['order_deadline2'])
+                       {
+                               $deadline_block .= "<br/><table 
id='order_deadline'><tr>";
+                       }
+
                        if($ticket['order_deadline'])
                        {
-                               $deadline_block .= "<br/><b>" . 
lang('deadline') . '</b>';
-                               $deadline_block .= "<br/>" . 
$ticket['order_deadline'];
+                               $deadline_block .= "<td><b>" . lang('deadline 
for start') . '</b></td>';
                        }
+                       if($ticket['order_deadline2'])
+                       {
+                               $deadline_block .= "<td><b>" . lang('deadline 
for execution') . '</b></td></tr>';
+                       }
+                       else
+                       {
+                               $deadline_block .= '</tr>';
+                       }
+                       if($ticket['order_deadline'])
+                       {
+                               $deadline_block .= "<tr><td>" . 
$ticket['order_deadline'] . "</td>";
+                       }
+                       if($ticket['order_deadline2'])
+                       {
+                               $deadline_block .= "<td>" . 
$ticket['order_deadline2'] . "</td>";
+                       }
+                       else
+                       {
+                               $deadline_block .= '</tr>';
+                       }
+                       if($deadline_block)
+                       {
+                               $deadline_block .= "</tr></table>";
+                       }
 
+                       $location_exceptions = 
createObject('property.solocation')->get_location_exception($ticket['location_code'],
 $alert_vendor = true);
+
+                       $important_imformation = '';
+                       if($location_exceptions)
+                       {
+                               $important_imformation .= "<b>" . 
lang('important information') . '</b>';
+                       }
+                       foreach ($location_exceptions as $location_exception)
+                       {
+                               $important_imformation .= "<br/>" . 
$location_exception['category_text'];
+
+                               if($location_exception['location_descr'])
+                               {
+                                       $important_imformation .= "<br/>" . 
$location_exception['location_descr'];
+                               }
+                       }
+
                        $body .= '<br/>'. nl2br(str_replace(array
                                (
                                '__vendor_name__',
@@ -3825,6 +3881,7 @@
                                '__location__',
                                '__order_description__',
                                '__deadline_block__',
+                               '__important_imformation__',
                                '__contact_block__',
                                '__contact_name__',
                                '__contact_email__',
@@ -3843,6 +3900,7 @@
                                $location,
                                $order_description,
                                $deadline_block,
+                               $important_imformation,
                                $contact_block,
                                $contact_name,
                                $contact_email,
@@ -3852,23 +3910,8 @@
                                '</b>'
                                        ), $order_email_template));
 
-                       $location_exceptions = 
createObject('property.solocation')->get_location_exception($ticket['location_code'],
 $alert_vendor = true);
 
-                       if($location_exceptions)
-                       {
-                               $body .= "<br/><br/><b>" . lang('important 
information') . '</b>';
-                       }
-                       foreach ($location_exceptions as $location_exception)
-                       {
-                               $body .= "<br/>" . 
$location_exception['category_text'] . '<br/>';
 
-                               if($location_exception['location_descr'])
-                               {
-                                       $body .= 
$location_exception['location_descr'] . '<br/>';
-                               }
-                       }
-
-
                        $html = "<html><head><meta http-equiv=\"Content-Type\" 
content=\"text/html; charset=utf-8\"><title>{$subject}</title>";
                        $html .= '      <style>
 
@@ -3883,6 +3926,14 @@
                size: A4;
                }
 
+               #order_deadline{
+                       width: 800px;
+                       border:0px solid transparent;
+               }
+
+               #order_deadline td{
+                       border:0px solid transparent;
+               }
                @media print {
                li {page-break-inside: avoid;}
                h1, h2, h3, h4, h5 {

Modified: branches/Version-2_0-branch/property/setup/phpgw_no.lang
===================================================================
--- branches/Version-2_0-branch/property/setup/phpgw_no.lang    2017-09-18 
08:37:02 UTC (rev 17088)
+++ branches/Version-2_0-branch/property/setup/phpgw_no.lang    2017-09-18 
08:38:48 UTC (rev 17089)
@@ -2238,4 +2238,6 @@
 category content       property        no      Tekster for kategori
 order deadline property        no      Frist for utførelse
 please update <a href="%1">your email address here</a> property        no      
Venligst oppdatert din <a href="%1">epost-adresse her</a>
-clear contact  property        no      Fjern kontakperson
\ No newline at end of file
+clear contact  property        no      Fjern kontakperson
+deadline for start     property        no      Frist for oppstart
+deadline for execution property        no      Frist for ferdigstillelse
\ No newline at end of file

Modified: branches/Version-2_0-branch/property/setup/setup.inc.php
===================================================================
--- branches/Version-2_0-branch/property/setup/setup.inc.php    2017-09-18 
08:37:02 UTC (rev 17088)
+++ branches/Version-2_0-branch/property/setup/setup.inc.php    2017-09-18 
08:38:48 UTC (rev 17089)
@@ -11,7 +11,7 @@
         * @version $Id$
        */
        $setup_info['property']['name']                 = 'property';
-       $setup_info['property']['version']              = '0.9.17.719';
+       $setup_info['property']['version']              = '0.9.17.721';
        $setup_info['property']['app_order']    = 8;
        $setup_info['property']['enable']               = 1;
        $setup_info['property']['app_group']    = 'office';

Modified: branches/Version-2_0-branch/property/setup/tables_current.inc.php
===================================================================
--- branches/Version-2_0-branch/property/setup/tables_current.inc.php   
2017-09-18 08:37:02 UTC (rev 17088)
+++ branches/Version-2_0-branch/property/setup/tables_current.inc.php   
2017-09-18 08:38:48 UTC (rev 17089)
@@ -951,7 +951,7 @@
                        'fd' => array(
                                'id' => array('type' => 'int', 'precision' => 
'4', 'nullable' => False),
                                'condition_survey_id' => array('type' => 'int', 
'precision' => '4', 'nullable' => True),
-                               'title' => array('type' => 'varchar', 
'precision' => '100', 'nullable' => True),
+                               'title' => array('type' => 'text', 'nullable' 
=> True),
                                'project_id' => array('type' => 'int', 
'precision' => '4', 'nullable' => True),
                                'p_num' => array('type' => 'varchar', 
'precision' => '15', 'nullable' => True),
                                'p_entity_id' => array('type' => 'int', 
'precision' => '4', 'nullable' => True),
@@ -1181,6 +1181,7 @@
                                'delivery_address' => array('type' => 'text', 
'nullable' => True),
                                'continuous' => array('type' => 'int', 
'precision' => 2, 'nullable' => True),
                                'order_deadline' => array('type' => 'int', 
'precision' => 8, 'nullable' => True),
+                               'order_deadline2' => array('type' => 'int', 
'precision' => 8, 'nullable' => True),
                        ),
                        'pk' => array('id'),
                        'ix' => array(),

Modified: branches/Version-2_0-branch/property/setup/tables_update.inc.php
===================================================================
--- branches/Version-2_0-branch/property/setup/tables_update.inc.php    
2017-09-18 08:37:02 UTC (rev 17088)
+++ branches/Version-2_0-branch/property/setup/tables_update.inc.php    
2017-09-18 08:38:48 UTC (rev 17089)
@@ -9806,4 +9806,44 @@
                        $GLOBALS['setup_info']['property']['currentver'] = 
'0.9.17.719';
                        return $GLOBALS['setup_info']['property']['currentver'];
                }
+       }
+
+       /**
+       * Update property version from 0.9.17.719 to 0.9.17.720
+       *
+       */
+       $test[] = '0.9.17.719';
+
+       function property_upgrade0_9_17_719()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+               $GLOBALS['phpgw_setup']->oProc->AddColumn('fm_tts_tickets', 
'order_deadline2', array(
+                       'type' => 'int', 'precision' => 8, 'nullable' => true));
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['property']['currentver'] = 
'0.9.17.720';
+                       return $GLOBALS['setup_info']['property']['currentver'];
+               }
+       }
+
+       /**
+       * Update property version from 0.9.17.720 to 0.9.17.721
+       *
+       */
+       $test[] = '0.9.17.720';
+
+       function property_upgrade0_9_17_720()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+               $GLOBALS['phpgw_setup']->oProc->AlterColumn('fm_request', 
'title', array('type' => 'text',
+                       'nullable' => True));
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['property']['currentver'] = 
'0.9.17.721';
+                       return $GLOBALS['setup_info']['property']['currentver'];
+               }
        }
\ No newline at end of file

Modified: branches/Version-2_0-branch/property/templates/base/contact_form.xsl
===================================================================
--- branches/Version-2_0-branch/property/templates/base/contact_form.xsl        
2017-09-18 08:37:02 UTC (rev 17088)
+++ branches/Version-2_0-branch/property/templates/base/contact_form.xsl        
2017-09-18 08:38:48 UTC (rev 17089)
@@ -17,7 +17,7 @@
                        $("#" + field + "_name").val('');
                        $("#" + field + "_contact_tel").html('');
                        $("#" + field + "_contact_email").html('');
-                       $("#" + field + "_clear_contact").prop("checked", 
false);
+       //              $("#" + field + "_clear_contact").prop("checked", 
false);
                }
        </script>
        <div class="pure-control-group">
@@ -49,11 +49,17 @@
                                        </div>
                                </xsl:when>
                        </xsl:choose>
+                       <a onClick="{field}_contact_clear('{field}');">
+                               <xsl:attribute name="title">
+                                       <xsl:value-of 
select="php:function('lang', 'clear contact')"/>
+                               </xsl:attribute>
+                               <xsl:value-of select="php:function('lang', 
'delete')"/>
+                       </a>
                </div>
-               <input type="checkbox" id="{field}_clear_contact" 
name="clear_contact" value="0" onClick="{field}_contact_clear('{field}');" 
readonly="readonly">
+               <!--input type="checkbox" id="{field}_clear_contact" 
name="clear_contact" value="0" onClick="{field}_contact_clear('{field}');" 
readonly="readonly">
                        <xsl:attribute name="title">
                                <xsl:value-of select="php:function('lang', 
'clear contact')"/>
                        </xsl:attribute>
-               </input>
+               </input-->
        </div>
 </xsl:template>

Modified: branches/Version-2_0-branch/property/templates/base/tts.xsl
===================================================================
--- branches/Version-2_0-branch/property/templates/base/tts.xsl 2017-09-18 
08:37:02 UTC (rev 17088)
+++ branches/Version-2_0-branch/property/templates/base/tts.xsl 2017-09-18 
08:38:48 UTC (rev 17089)
@@ -987,43 +987,88 @@
                                                                                
<label>
                                                                                
        <xsl:value-of select="php:function('lang', 'deadline')"/>
                                                                                
</label>
+                                                                               
<table class="pure-table pure-u-md-1-2">
+                                                                               
        <thead>
+                                                                               
                <tr>
+                                                                               
                        <th>
+                                                                               
                                <xsl:value-of select="php:function('lang', 
'deadline for start')"/>
+                                                                               
                        </th>
+                                                                               
                        <th>
+                                                                               
                                <xsl:value-of select="php:function('lang', 
'deadline for execution')"/>
+                                                                               
                        </th>
+                                                                               
                </tr>
+                                                                               
        </thead>
+                                                                               
        <tbody>
+                                                                               
                <tr>
+                                                                               
                        <td>
 
-                                                                               
<input type="text" id="order_deadline" name="values[order_deadline]" size="10" 
value="{value_order_deadline}" readonly="readonly">
-                                                                               
        <xsl:attribute name="title">
-                                                                               
                <xsl:value-of select="php:function('lang', 'order deadline')"/>
-                                                                               
        </xsl:attribute>
-                                                                               
</input>
+                                                                               
                                <input type="text" id="order_deadline" 
name="values[order_deadline]" size="10" value="{value_order_deadline}" 
readonly="readonly">
+                                                                               
                                        <xsl:attribute name="title">
+                                                                               
                                                <xsl:value-of 
select="php:function('lang', 'deadline for start')"/>
+                                                                               
                                        </xsl:attribute>
+                                                                               
                                </input>
+                                                                               
                        </td>
+                                                                               
                        <td>
+
+                                                                               
                                <input type="text" id="order_deadline2" 
name="values[order_deadline2]" size="10" value="{value_order_deadline2}" 
readonly="readonly">
+                                                                               
                                        <xsl:attribute name="title">
+                                                                               
                                                <xsl:value-of 
select="php:function('lang', 'deadline for execution')"/>
+                                                                               
                                        </xsl:attribute>
+                                                                               
                                </input>
+
+                                                                               
                        </td>
+                                                                               
                </tr>
+                                                                               
        </tbody>
+                                                                               
</table>
+
                                                                        </div>
 
                                                                        <div 
class="pure-control-group">
+                                                                               
<xsl:variable name="lang_period">
+                                                                               
        <xsl:value-of select="php:function('lang', 'period')"/>
+                                                                               
</xsl:variable>
                                                                                
<label>
                                                                                
        <xsl:value-of select="php:function('lang', 'cost estimate')"/>
                                                                                
</label>
-                                                                               
<input class="pure-input-1-2" id="field_budget" type="text" 
name="values[budget]">
-                                                                               
        <xsl:attribute name="title">
-                                                                               
                <xsl:value-of select="php:function('lang', 'Enter the 
budget')"/>
-                                                                               
        </xsl:attribute>
-                                                                               
</input>
-                                                                               
<xsl:text> </xsl:text> [ <xsl:value-of select="currency"/> ]
-                                                                               
<xsl:variable name="lang_period">
-                                                                               
        <xsl:value-of select="php:function('lang', 'period')"/>
-                                                                               
</xsl:variable>
+                                                                               
<table class="pure-table pure-u-md-1-2">
+                                                                               
        <thead>
+                                                                               
                <tr>
+                                                                               
                        <th>
+                                                                               
                                <xsl:value-of select="php:function('lang', 
'Enter the budget')"/>
+                                                                               
                                <xsl:text> </xsl:text> [ <xsl:value-of 
select="currency"/> ]
+                                                                               
                        </th>
+                                                                               
                        <th>
+                                                                               
                                <xsl:value-of select='$lang_period'/>
+                                                                               
                        </th>
+                                                                               
                </tr>
+                                                                               
        </thead>
+                                                                               
        <tbody>
+                                                                               
                <tr>
+                                                                               
                        <td>
 
-                                                                               
<select name="values[budget_period]">
-                                                                               
        <xsl:attribute name="title">
-                                                                               
                <xsl:value-of select='$lang_period'/>
-                                                                               
        </xsl:attribute>
-                                                                               
        <xsl:apply-templates select="year_list/options"/>
-                                                                               
</select>
-
-                                                                               
<xsl:text> </xsl:text> [ <xsl:value-of select='$lang_period'/> ]
+                                                                               
                                <input  id="field_budget" type="text" 
name="values[budget]">
+                                                                               
                                        <xsl:attribute name="title">
+                                                                               
                                                <xsl:value-of 
select="php:function('lang', 'Enter the budget')"/>
+                                                                               
                                        </xsl:attribute>
+                                                                               
                                </input>
+                                                                               
                        </td>
+                                                                               
                        <td>
+                                                                               
                                <select name="values[budget_period]" 
style="width: 14em;">
+                                                                               
                                        <xsl:attribute name="title">
+                                                                               
                                                <xsl:value-of 
select='$lang_period'/>
+                                                                               
                                        </xsl:attribute>
+                                                                               
                                        <xsl:apply-templates 
select="year_list/options"/>
+                                                                               
                                </select>
+                                                                               
                        </td>
+                                                                               
                </tr>
+                                                                               
        </tbody>
+                                                                               
</table>
                                                                        </div>
                                                                        <div 
class="pure-control-group">
                                                                                
<label>
                                                                                
        <xsl:value-of select="php:function('lang', 'budget')"/>
                                                                                
</label>
-
-                                                                               
<div class = 'pure-u-md-1-3'>
+                                                                               
<div class = 'pure-u-md-1-2'>
                                                                                
        <!--div  id="paging_4"> </div>
                                                                                
        <div class="pure-table" id="datatable-container_4"/-->
                                                                                
        <xsl:for-each select="datatable_def">
@@ -1042,31 +1087,46 @@
                                                                                
</div>
                                                                        </div>
 
-
-
-
                                                                        <div 
class="pure-control-group">
+                                                                               
<xsl:variable name="lang_period">
+                                                                               
        <xsl:value-of select="php:function('lang', 'period')"/>
+                                                                               
</xsl:variable>
                                                                                
<label>
                                                                                
        <xsl:value-of select="php:function('lang', 'payment')"/>
                                                                                
</label>
-                                                                               
<input type="text" name="values[actual_cost]">
-                                                                               
        <xsl:attribute name="title">
-                                                                               
                <xsl:value-of select="php:function('lang', 'Enter actual 
cost')"/>
-                                                                               
        </xsl:attribute>
-                                                                               
</input>
-                                                                               
<xsl:text> </xsl:text> [ <xsl:value-of select="currency"/> ]
-                                                                               
<xsl:variable name="lang_period">
-                                                                               
        <xsl:value-of select="php:function('lang', 'period')"/>
-                                                                               
</xsl:variable>
+                                                                               
<table class="pure-table pure-u-md-1-2">
+                                                                               
        <thead>
+                                                                               
                <tr>
+                                                                               
                        <th>
+                                                                               
                                <xsl:value-of select="php:function('lang', 
'Enter actual cost')"/>
+                                                                               
                                <xsl:text> </xsl:text> [ <xsl:value-of 
select="currency"/> ]
 
-                                                                               
<select name="values[actual_cost_period]" class="pure-input-1-2">
-                                                                               
        <xsl:attribute name="title">
-                                                                               
                <xsl:value-of select='$lang_period'/>
-                                                                               
        </xsl:attribute>
-                                                                               
        <xsl:apply-templates select="period_list/options"/>
-                                                                               
</select>
-
-                                                                               
<xsl:text> </xsl:text> [ <xsl:value-of select='$lang_period'/> ]
+                                                                               
                        </th>
+                                                                               
                        <th>
+                                                                               
                                <xsl:value-of select='$lang_period'/>
+                                                                               
                        </th>
+                                                                               
                </tr>
+                                                                               
        </thead>
+                                                                               
        <tbody>
+                                                                               
                <tr>
+                                                                               
                        <td>
+                                                                               
                                <input type="text" name="values[actual_cost]">
+                                                                               
                                        <xsl:attribute name="title">
+                                                                               
                                                <xsl:value-of 
select="php:function('lang', 'Enter actual cost')"/>
+                                                                               
                                        </xsl:attribute>
+                                                                               
                                </input>
+                                                                               
                        </td>
+                                                                               
                        <td>
+                                                                               
                                <select name="values[actual_cost_period]" 
style="width: 14em;">
+                                                                               
                                        <xsl:attribute name="title">
+                                                                               
                                                <xsl:value-of 
select='$lang_period'/>
+                                                                               
                                        </xsl:attribute>
+                                                                               
                                        <xsl:apply-templates 
select="period_list/options"/>
+                                                                               
                                </select>
+                                                                               
                        </td>
+                                                                               
                </tr>
+                                                                               
        </tbody>
+                                                                               
</table>
                                                                        </div>
                                                                        <div 
class="pure-control-group">
                                                                                
<label>
@@ -1073,7 +1133,7 @@
                                                                                
        <xsl:value-of select="php:function('lang', 'actual cost')"/>
                                                                                
</label>
                                                                                
                
-                                                                               
<div class = 'pure-u-md-1-3'>
+                                                                               
<div class = 'pure-u-md-1-2'>
                                                                                
        <!--div  id="paging_4"> </div>
                                                                                
        <div class="pure-table" id="datatable-container_4"/-->
                                                                                
        <xsl:for-each select="datatable_def">
@@ -1107,51 +1167,53 @@
                                                                                
        <xsl:value-of select="php:function('lang', 'send order')"/>
                                                                                
</label>
                                                                                
<table class="pure-table pure-u-md-1-2">
-                                                                               
        <tr>
-                                                                               
                <td valign = 'top'>
-                                                                               
                        <select name="values[send_order_format]">
-                                                                               
                                <xsl:attribute name="title">
-                                                                               
                                        <xsl:value-of 
select="php:function('lang', 'format')"/>
-                                                                               
                                </xsl:attribute>
-                                                                               
                                <option value="html">
-                                                                               
                                        <xsl:text>HTML</xsl:text>
-                                                                               
                                </option>
-                                                                               
                                <option value="pdf">
-                                                                               
                                        <xsl:text>PDF</xsl:text>
-                                                                               
                                </option>
-                                                                               
                        </select>
-                                                                               
                </td>
-                                                                               
                <td>
-                                                                               
                        <!--div id="paging_3"/>
-                                                                               
                        <div class="pure-table" id="datatable-container_3"/-->
-                                                                               
                        <xsl:for-each select="datatable_def">
-                                                                               
                                <xsl:if test="container = 
'datatable-container_3'">
-                                                                               
                                        <xsl:call-template name="table_setup">
-                                                                               
                                                <xsl:with-param 
name="container" select ='container'/>
-                                                                               
                                                <xsl:with-param 
name="requestUrl" select ='requestUrl'/>
-                                                                               
                                                <xsl:with-param 
name="ColumnDefs" select ='ColumnDefs'/>
-                                                                               
                                                <xsl:with-param name="data" 
select ='data'/>
-                                                                               
                                                <xsl:with-param 
name="tabletools" select ='tabletools' />
-                                                                               
                                                <xsl:with-param name="config" 
select ='config'/>
-                                                                               
                                        </xsl:call-template>
-                                                                               
                                </xsl:if>
-                                                                               
                        </xsl:for-each>
-                                                                               
                </td>
-                                                                               
        </tr>
-                                                                               
        <tr>
-                                                                               
                <td valign="top">
-                                                                               
                        <label>
-                                                                               
                                <xsl:value-of select="php:function('lang', 
'extra mail address')"/>
-                                                                               
                        </label>
-                                                                               
                </td>
-                                                                               
                <td>
-                                                                               
                        <input type="text" name="values[vendor_email][]" 
value="{value_extra_mail_address}">
-                                                                               
                                <xsl:attribute name="title">
-                                                                               
                                        <xsl:value-of 
select="php:function('lang', 'The order will also be sent to this one')"/>
-                                                                               
                                </xsl:attribute>
-                                                                               
                        </input>
-                                                                               
                </td>
-                                                                               
        </tr>
+                                                                               
        <thead>
+                                                                               
                <tr>
+                                                                               
                        <th>
+                                                                               
                                <select name="values[send_order_format]">
+                                                                               
                                        <xsl:attribute name="title">
+                                                                               
                                                <xsl:value-of 
select="php:function('lang', 'format')"/>
+                                                                               
                                        </xsl:attribute>
+                                                                               
                                        <option value="html">
+                                                                               
                                                <xsl:text>HTML</xsl:text>
+                                                                               
                                        </option>
+                                                                               
                                        <option value="pdf">
+                                                                               
                                                <xsl:text>PDF</xsl:text>
+                                                                               
                                        </option>
+                                                                               
                                </select>
+                                                                               
                        </th>
+                                                                               
                </tr>
+                                                                               
        </thead>
+                                                                               
        <tbody>
+                                                                               
                <tr>
+                                                                               
                        <td>
+                                                                               
                                <xsl:for-each select="datatable_def">
+                                                                               
                                        <xsl:if test="container = 
'datatable-container_3'">
+                                                                               
                                                <xsl:call-template 
name="table_setup">
+                                                                               
                                                        <xsl:with-param 
name="container" select ='container'/>
+                                                                               
                                                        <xsl:with-param 
name="requestUrl" select ='requestUrl'/>
+                                                                               
                                                        <xsl:with-param 
name="ColumnDefs" select ='ColumnDefs'/>
+                                                                               
                                                        <xsl:with-param 
name="data" select ='data'/>
+                                                                               
                                                        <xsl:with-param 
name="tabletools" select ='tabletools' />
+                                                                               
                                                        <xsl:with-param 
name="config" select ='config'/>
+                                                                               
                                                </xsl:call-template>
+                                                                               
                                        </xsl:if>
+                                                                               
                                </xsl:for-each>
+                                                                               
                        </td>
+                                                                               
                </tr>
+                                                                               
                <tr>
+                                                                               
                        <td>
+                                                                               
                                <label>
+                                                                               
                                        <xsl:value-of 
select="php:function('lang', 'extra mail address')"/>
+                                                                               
                                </label>
+                                                                               
                                <input type="text" 
name="values[vendor_email][]" value="{value_extra_mail_address}">
+                                                                               
                                        <xsl:attribute name="title">
+                                                                               
                                                <xsl:value-of 
select="php:function('lang', 'The order will also be sent to this one')"/>
+                                                                               
                                        </xsl:attribute>
+                                                                               
                                </input>
+                                                                               
                        </td>
+                                                                               
                </tr>
+                                                                               
        </tbody>
                                                                                
</table>
 
                                                                        </div>
@@ -1559,4 +1621,4 @@
                        <xsl:value-of select="email"/>
                </td>
        </tr>
-</xsl:template>
+</xsl:template>
\ No newline at end of file




reply via email to

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