fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [17075] Stable: Merge 17067:17074 from trunk


From: sigurdne
Subject: [Fmsystem-commits] [17075] Stable: Merge 17067:17074 from trunk
Date: Thu, 14 Sep 2017 08:25:08 -0400 (EDT)

Revision: 17075
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17075
Author:   sigurdne
Date:     2017-09-14 08:25:07 -0400 (Thu, 14 Sep 2017)
Log Message:
-----------
Stable: Merge 17067:17074 from trunk

Modified Paths:
--------------
    branches/Version-2_0-branch/controller/inc/class.uicalendar.inc.php
    
branches/Version-2_0-branch/controller/inc/component/class.year_calendar.inc.php
    branches/Version-2_0-branch/controller/js/controller/ajax.js
    branches/Version-2_0-branch/controller/setup/phpgw_no.lang
    
branches/Version-2_0-branch/controller/templates/base/calendar/calendar_filters.xsl
    branches/Version-2_0-branch/eventplanner/inc/class.sovendor.inc.php
    branches/Version-2_0-branch/eventplanner/inc/class.uiapplication.inc.php
    branches/Version-2_0-branch/eventplanner/inc/class.uivendor.inc.php
    branches/Version-2_0-branch/eventplanner/setup/phpgw_no.lang
    branches/Version-2_0-branch/eventplannerfrontend/inc/class.menu.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/helpdesk/js/portico/tts.view.js
    branches/Version-2_0-branch/phpgwapi/setup/phpgw_no.lang
    branches/Version-2_0-branch/phpgwapi/templates/frontend/head.inc.php
    branches/Version-2_0-branch/phpgwapi/templates/frontend/head.tpl
    branches/Version-2_0-branch/phpgwapi/templates/frontend/navbar.inc.php
    branches/Version-2_0-branch/property/inc/class.solocation.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/templates/base/config.tpl
    branches/Version-2_0-branch/property/templates/base/contact_form.xsl

Added Paths:
-----------
    branches/Version-2_0-branch/phpgwapi/templates/frontend/js/mmenu.js

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

Index: branches/Version-2_0-branch
===================================================================
--- branches/Version-2_0-branch 2017-09-14 12:23:57 UTC (rev 17074)
+++ branches/Version-2_0-branch 2017-09-14 12:25:07 UTC (rev 17075)

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
\ 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
\ No newline at end of property
Modified: branches/Version-2_0-branch/controller/inc/class.uicalendar.inc.php
===================================================================
--- branches/Version-2_0-branch/controller/inc/class.uicalendar.inc.php 
2017-09-14 12:23:57 UTC (rev 17074)
+++ branches/Version-2_0-branch/controller/inc/class.uicalendar.inc.php 
2017-09-14 12:25:07 UTC (rev 17075)
@@ -266,7 +266,10 @@
                        $role = phpgw::get_var('role', 'int');
 
                        $repeat_type = phpgw::get_var('repeat_type');
-
+                       
+                       //show only controls that are not done
+                       $selected_ctrl_status = 
phpgw::get_var('current_ctrl_status');
+                       
                        // Validates year. If year is not set, current year is 
chosen
                        $year = $this->validate_year($year);
 
@@ -348,7 +351,7 @@
                                        if ($control->get_repeat_type() == 
controller_control::REPEAT_TYPE_MONTH | $control->get_repeat_type() == 
controller_control::REPEAT_TYPE_YEAR)
                                        {
                                                $year_calendar = new 
year_calendar($control, $year, null, $location_code, "location");
-                                               $calendar_array = 
$year_calendar->build_calendar($control->get_check_lists_array());
+                                               $calendar_array = 
$year_calendar->build_calendar($control->get_check_lists_array(), 
$selected_ctrl_status);
 
                                                $controls_calendar_array[] = 
array("control" => $control->toArray(), "calendar_array" => $calendar_array);
                                        }
@@ -422,6 +425,17 @@
                                        array('id' => "2", 'value' => "Måned"),
                                        array('id' => "3", 'value' => "År")
                                );
+                               
+                               $ctrl_status_array = array(
+                                       array('id' => "CONTROL_REGISTERED", 
'value' => "CONTROL_REGISTERED"),
+                                       array('id' => "CONTROL_PLANNED", 
'value' => "CONTROL_PLANNED"),
+                                       array('id' => 
"CONTROL_DONE_OVER_TIME_WITHOUT_ERRORS", 'value' => 
"CONTROL_DONE_OVER_TIME_WITHOUT_ERRORS"),
+                                       array('id' => 
"CONTROL_DONE_IN_TIME_WITHOUT_ERRORS", 'value' => 
"CONTROL_DONE_IN_TIME_WITHOUT_ERRORS"),
+                                       array('id' => 
"CONTROL_DONE_WITH_ERRORS", 'value' => "CONTROL_DONE_WITH_ERRORS"),
+                                       array('id' => "CONTROL_NOT_DONE", 
'value' => "CONTROL_NOT_DONE"),
+                                       //array('id' => 
"CONTROL_NOT_DONE_WITH_PLANNED_DATE", 'value' => 
"CONTROL_NOT_DONE_WITH_PLANNED_DATE"),
+                                       array('id' => "CONTROL_CANCELED", 
'value' => "CONTROL_CANCELED")
+                               );
 
                                $data = array
                                        (
@@ -434,9 +448,11 @@
                                        'location_level' => $level,
                                        'roles_array' => $roles_array,
                                        'repeat_type_array' => 
$repeat_type_array,
+                                       'ctrl_status_array' => 
$ctrl_status_array,
                                        'current_year' => $year,
                                        'current_role' => $role,
-                                       'current_repeat_type' => $repeat_type
+                                       'current_repeat_type' => $repeat_type,
+                                       'current_ctrl_status' => 
$selected_ctrl_status
                                );
 
                                phpgwapi_jquery::load_widget('autocomplete');

Modified: 
branches/Version-2_0-branch/controller/inc/component/class.year_calendar.inc.php
===================================================================
--- 
branches/Version-2_0-branch/controller/inc/component/class.year_calendar.inc.php
    2017-09-14 12:23:57 UTC (rev 17074)
+++ 
branches/Version-2_0-branch/controller/inc/component/class.year_calendar.inc.php
    2017-09-14 12:25:07 UTC (rev 17075)
@@ -93,7 +93,7 @@
                        }
                }
 
-               public function build_calendar( $check_lists_array )
+               public function build_calendar( $check_lists_array, 
$ctrl_status = NULL )
                {
                        foreach ($check_lists_array as $check_list)
                        {
@@ -115,11 +115,12 @@
                                        
$this->calendar_array[$month_nr]["info"] = $check_list_status_info->serialize();
                                }
                        }
-//                     _debug_array($this->calendar_array);
+                       //_debug_array($this->calendar_array);
                        /*Insert code to remove controls with changed due-date 
from array*/
                        $m_cnt = 0;
                        $not_done_due_date;
                        $new_calendar_array = array();
+                       $new_calendar_array2 = array();
                        $found = false;
                        $moved_control_dates = NULL;
                        foreach ($this->calendar_array as $cal)
@@ -140,7 +141,7 @@
                                        $m_cnt++;
                                        if(is_array($cal2))
                                        {
-                                               if($cal2['info']['status'] == 
'CONTROL_NOT_DONE')
+                                               if($cal2['info']['status'] == 
'CONTROL_NOT_DONE' || $cal2['info']['status'] == 'CONTROL_REGISTERED')
                                                {
                                                        
if(in_array($cal2['info']['deadline_date_ts'], $moved_control_dates))
                                                        {
@@ -163,6 +164,51 @@
                                }
                                $this->calendar_array = $new_calendar_array;
                        }
+                       $m_cnt2 = 0;
+                       if(isset($ctrl_status))
+                       {
+                               if ($ctrl_status == "ALLE")
+                               {
+                                       //do nothing
+                               }
+                               else
+                               {
+                                       foreach ($this->calendar_array as $cal3)
+                                       {
+                                               $m_cnt2++;
+                                               if(is_array($cal3))
+                                               {
+                                                       if($ctrl_status == 
'CONTROL_NOT_DONE')
+                                                       {
+                                                               
if($cal3['info']['status'] == $ctrl_status || $cal3['info']['status'] == 
'CONTROL_NOT_DONE_WITH_PLANNED_DATE')
+                                                               {
+                                                                       
$new_calendar_array2[$m_cnt2] = $cal3;
+                                                               }
+                                                               else
+                                                               {
+                                                                       
$new_calendar_array2[$m_cnt2] = NULL;
+                                                               }
+                                                       }
+                                                       else
+                                                       {
+                                                               
if($cal3['info']['status'] == $ctrl_status)
+                                                               {
+                                                                       
$new_calendar_array2[$m_cnt2] = $cal3;
+                                                               }
+                                                               else
+                                                               {
+                                                                       
$new_calendar_array2[$m_cnt2] = NULL;
+                                                               }
+                                                       }
+                                               }
+                                               else
+                                               {
+                                                       
$new_calendar_array2[$m_cnt2] = NULL;
+                                               }
+                                       }
+                                       $this->calendar_array = 
$new_calendar_array2;
+                               }
+                       }
                        return $this->calendar_array;
                }
 

Modified: branches/Version-2_0-branch/controller/js/controller/ajax.js
===================================================================
--- branches/Version-2_0-branch/controller/js/controller/ajax.js        
2017-09-14 12:23:57 UTC (rev 17074)
+++ branches/Version-2_0-branch/controller/js/controller/ajax.js        
2017-09-14 12:25:07 UTC (rev 17075)
@@ -715,7 +715,16 @@
                $(thisForm).find("input[name=role]").val(role);
                $(thisForm).submit();
        });
+       
+       $("#filter-ctrl_status").change(function ()
+       {
+               var ctrl_status = $(this).val();
+               var thisForm = $(this).closest("form");
 
+               
$(thisForm).find("input[name=current_ctrl_status]").val(ctrl_status);
+               $(thisForm).submit();
+       });
+
        // SHOW INFO BOX: Fetches info about a check list on hover image icon
        $('a.view_info_box').bind('contextmenu', function ()
        {

Modified: branches/Version-2_0-branch/controller/setup/phpgw_no.lang
===================================================================
--- branches/Version-2_0-branch/controller/setup/phpgw_no.lang  2017-09-14 
12:23:57 UTC (rev 17074)
+++ branches/Version-2_0-branch/controller/setup/phpgw_no.lang  2017-09-14 
12:25:07 UTC (rev 17075)
@@ -393,6 +393,13 @@
 lang_control_mandatory_location        controller      no      Påkrevd 
lokasjonsvalg
 Control types  controller      no      Kontrolltyper
 location       controller      no      Lokasjon
+CONTROL_REGISTERED     controller      no      Kontroll satt opp
+CONTROL_PLANNED        controller      no      Kontroll har planlagt dato
+CONTROL_DONE_OVER_TIME_WITHOUT_ERRORS  controller      no      Kontroll 
gjennomført uten åpne saker etter frist
+CONTROL_DONE_IN_TIME_WITHOUT_ERRORS    controller      no      Kontroll 
gjennomført uten åpne saker før frist
+CONTROL_DONE_WITH_ERRORS       controller      no      Kontroll gjennomført 
med åpne saker
+CONTROL_NOT_DONE       controller      no      Kontroll ikke gjennomført
+CONTROL_CANCELED       controller      no      Kontroll kansellert
 document types controller      no      Dokumenttyper
 Do not edit archived version   controller      no      Du kan ikke endre 
arkiverte versjoner
 choose a location      controller      no      Velg en lokasjon
\ No newline at end of file

Modified: 
branches/Version-2_0-branch/controller/templates/base/calendar/calendar_filters.xsl
===================================================================
--- 
branches/Version-2_0-branch/controller/templates/base/calendar/calendar_filters.xsl
 2017-09-14 12:23:57 UTC (rev 17074)
+++ 
branches/Version-2_0-branch/controller/templates/base/calendar/calendar_filters.xsl
 2017-09-14 12:25:07 UTC (rev 17075)
@@ -42,6 +42,11 @@
         <xsl:value-of select="current_repeat_type"/>
       </xsl:attribute>
     </input>
+       <input type="hidden" name="current_ctrl_status">
+      <xsl:attribute name="value">
+        <xsl:value-of select="current_ctrl_status"/>
+      </xsl:attribute>
+    </input>
     <input type="hidden" name="role">
       <xsl:attribute name="value">
         <xsl:value-of select="current_role"/>
@@ -90,5 +95,28 @@
         </xsl:for-each>
       </select>
     </div>
+       <div class="filter">
+      <label>Filtrer på status</label>
+      <select id="filter-ctrl_status" name="ctrl_status">
+        <option value="ALLE">Velg status</option>
+        <xsl:for-each select="ctrl_status_array">
+                       <xsl:variable name="status_value">
+                               <xsl:value-of select="value"/>
+          </xsl:variable>
+          <xsl:choose>
+            <xsl:when test="id = //current_ctrl_status">
+              <option value="{id}" selected="selected">
+                <xsl:value-of disable-output-escaping="yes" 
select="php:function('lang', $status_value)"/>
+              </option>
+            </xsl:when>
+            <xsl:otherwise>
+              <option value="{id}">
+                <xsl:value-of disable-output-escaping="yes" 
select="php:function('lang', $status_value)"/>
+              </option>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:for-each>
+      </select>
+    </div>
   </form>                              
 </xsl:template>

Modified: branches/Version-2_0-branch/eventplanner/inc/class.sovendor.inc.php
===================================================================
--- branches/Version-2_0-branch/eventplanner/inc/class.sovendor.inc.php 
2017-09-14 12:23:57 UTC (rev 17074)
+++ branches/Version-2_0-branch/eventplanner/inc/class.sovendor.inc.php 
2017-09-14 12:25:07 UTC (rev 17075)
@@ -54,7 +54,64 @@
                        return self::$so;
                }
 
+               function get_acl_condition( )
+               {
+                       $clause = '';
 
+                       if(!$this->relaxe_acl && ($this->use_acl && 
$this->currentapp && $this->acl_location))
+                       {
+                               $paranthesis = false;
+
+                               $grants = 
$this->acl->get_grants2($this->currentapp, $this->acl_location);
+                               $public_user_list = array();
+                               if (is_array($grants['accounts']) && 
$grants['accounts'])
+                               {
+                                       foreach($grants['accounts'] as $user => 
$_right)
+                                       {
+                                               $public_user_list[] = $user;
+                                       }
+                                       unset($user);
+                                       reset($public_user_list);
+                                       $clause .= 
"({$this->table_name}.owner_id IN(" . implode(',', $public_user_list) . ")";
+                                       $paranthesis = true;
+                               }
+
+                               $public_group_list = array();
+                               if (is_array($grants['groups']) && 
$grants['groups'])
+                               {
+                                       foreach($grants['groups'] as $user => 
$_right)
+                                       {
+                                               $public_group_list[] = $user;
+                                       }
+                                       unset($user);
+                                       reset($public_group_list);
+                                       $where = $public_user_list ? 'OR' : 
'AND';
+                                       if(!$paranthesis)
+                                       {
+                                               $clause .='(';
+                                       }
+                                       $clause .= " $where 
phpgw_group_map.group_id IN(" . implode(',', $public_group_list) . ")";
+
+                                       $paranthesis = true;
+                               }
+
+                               if($this->currentapp == 'eventplannerfrontend')
+                               {
+                                       $where = $clause ? 'OR' : 'AND';
+                                       $org_id = 
phpgw::get_var('org_id','string' , 'SESSION', -1);
+                                       $clause .= " {$where} 
eventplanner_vendor.organization_number = '{$org_id}'";
+                               }
+
+                               if($paranthesis)
+                               {
+                                       $clause .=')';
+                               }
+                       }
+
+                       return $clause;
+
+               }
+
                protected function populate( array $data )
                {
                        $object = new eventplanner_vendor();

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-14 12:23:57 UTC (rev 17074)
+++ branches/Version-2_0-branch/eventplanner/inc/class.uiapplication.inc.php    
2017-09-14 12:25:07 UTC (rev 17075)
@@ -129,6 +129,7 @@
                }
                public function index()
                {
+                       
self::set_active_menu("{$this->currentapp}::vendor::application");
                        if (empty($this->permissions[PHPGW_ACL_READ]))
                        {
 
@@ -217,6 +218,7 @@
 
                public function add()
                {
+                       
self::set_active_menu("{$this->currentapp}::vendor::new_application");
                        if (empty($this->permissions[PHPGW_ACL_ADD]))
                        {
                                if($this->currentapp == 'eventplannerfrontend')

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-14 12:23:57 UTC (rev 17074)
+++ branches/Version-2_0-branch/eventplanner/inc/class.uivendor.inc.php 
2017-09-14 12:25:07 UTC (rev 17075)
@@ -173,6 +173,12 @@
                        self::render_template_xsl('datatable_jquery', $data);
                }
 
+               public function add()
+               {
+                       
self::set_active_menu("{$this->currentapp}::vendor::new_vendor");
+                       parent::add();  
+               }
+
                /*
                 * Edit the price item with the id given in the http variable 
'id'
                 */

Modified: branches/Version-2_0-branch/eventplanner/setup/phpgw_no.lang
===================================================================
--- branches/Version-2_0-branch/eventplanner/setup/phpgw_no.lang        
2017-09-14 12:23:57 UTC (rev 17074)
+++ branches/Version-2_0-branch/eventplanner/setup/phpgw_no.lang        
2017-09-14 12:25:07 UTC (rev 17075)
@@ -160,4 +160,5 @@
 application public type non public     eventplanner    no      Nærtilbud (et 
arrangement der kun noen få brukere/beboere på en institusjon kan delta, f.eks. 
et skrivekurs, malekurs)
 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
\ No newline at end of file
+new application        eventplanner    no      Ny søknad
+new vendor     eventplanner    no      Ny utøver
\ No newline at end of file

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-14 12:23:57 UTC (rev 17074)
+++ branches/Version-2_0-branch/eventplannerfrontend/inc/class.menu.inc.php     
2017-09-14 12:25:07 UTC (rev 17075)
@@ -108,16 +108,21 @@
                                        'text' => lang('vendor'),
                                        'url' =>  
phpgwapi_uicommon_jquery::link(  array('menuaction' => 
"eventplannerfrontend.uivendor.index")),
                                        'image' => array('vendor', 'navbar'),
-                               ),
-                               'application' => array(
-                                       'text' => lang('my applications'),
-                                       'url' => 
phpgwapi_uicommon_jquery::link( array('menuaction' => 
'eventplannerfrontend.uiapplication.index')),
                                        'children'      => array(
+                                               'new_vendor' => array(
+                                               'text' => lang('new vendor'),
+                                               'url' => 
phpgwapi_uicommon_jquery::link( array('menuaction' => 
'eventplannerfrontend.uivendor.add'))
+                                               ),
                                                'new_application' => array(
                                                'text' => lang('new 
application'),
                                                'url' => 
phpgwapi_uicommon_jquery::link( array('menuaction' => 
'eventplannerfrontend.uiapplication.add'))
-                                               )
-                                       )
+                                               ),
+                                               'application' => array(
+                                                       'text' => lang('my 
applications'),
+                                                       'url' => 
phpgwapi_uicommon_jquery::link( array('menuaction' => 
'eventplannerfrontend.uiapplication.index')),
+                                                       )
+                                               ),
+
                                ),
                                'customer' => array(
                                        'text' => lang('customer'),
@@ -129,22 +134,7 @@
                                        'url' => 
$GLOBALS['phpgw']->link('/registration/main.php', array()),
                                        'image' => array('user', 'navbar'),
                                )
-                               /*                              'booking' => 
array(
-                                       'text' => lang('booking'),
-                                       'url' =>  
phpgwapi_uicommon_jquery::link(  array('menuaction' => 
"eventplannerfrontend.uibooking.index")),
-                                       'image' => array('customer', 'navbar'),
-                               ),
-                               'vendor_report' => array(
-                                       'text' => lang('vendor report'),
-                                       'url' =>  
phpgwapi_uicommon_jquery::link(  array('menuaction' => 
"eventplannerfrontend.uivendor_report.index")),
-                                       'image' => array('vendor_report', 
'navbar'),
-                               ),
-                               'customer_report' => array(
-                                       'text' => lang('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/custom/default/Altinn2_Bergen_kommune.php
===================================================================
--- 
branches/Version-2_0-branch/eventplannerfrontend/inc/custom/default/Altinn2_Bergen_kommune.php
      2017-09-14 12:23:57 UTC (rev 17074)
+++ 
branches/Version-2_0-branch/eventplannerfrontend/inc/custom/default/Altinn2_Bergen_kommune.php
      2017-09-14 12:25:07 UTC (rev 17075)
@@ -125,8 +125,8 @@
 
                        if ($this->debug)
                        {
-                               $orgs[] = array('id' => '964338531', 'name' => 
'Bergen kommune');
-                               $_org_id = 964338531;
+                               $orgs[] = array('id' => '994239929', 'name' => 
'Bergen kommune');
+                               $_org_id = 994239929;
                        }
                        $_SESSION['orgs'] = $orgs;
                        $_SESSION['org_id'] = $_org_id; // one of them..

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-14 12:23:57 UTC (rev 17074)
+++ 
branches/Version-2_0-branch/eventplannerfrontend/js/portico/application.edit.js 
    2017-09-14 12:25:07 UTC (rev 17075)
@@ -480,7 +480,7 @@
 this.fileuploader = function (section)
 {
        multi_upload_parans.section = section;
-       var sUrl = phpGWLink('index.php', multi_upload_parans);
+       var sUrl = phpGWLink('eventplannerfrontend/', multi_upload_parans);
        TINY.box.show({iframe: sUrl, boxid: 'frameless', width: 750, height: 
450, fixed: false, maskid: 'darkmask', maskopacity: 40, mask: true, animate: 
true,
                close: true,
                closejs: function ()

Modified: branches/Version-2_0-branch/helpdesk/js/portico/tts.view.js
===================================================================
--- branches/Version-2_0-branch/helpdesk/js/portico/tts.view.js 2017-09-14 
12:23:57 UTC (rev 17074)
+++ branches/Version-2_0-branch/helpdesk/js/portico/tts.view.js 2017-09-14 
12:25:07 UTC (rev 17075)
@@ -253,7 +253,7 @@
                                                        
this.paste_createImage(source);
                                                }
                                        }
-                                       e.preventDefault();
+                               //      e.preventDefault();
                                }
                                else
                                {

Modified: branches/Version-2_0-branch/phpgwapi/setup/phpgw_no.lang
===================================================================
--- branches/Version-2_0-branch/phpgwapi/setup/phpgw_no.lang    2017-09-14 
12:23:57 UTC (rev 17074)
+++ branches/Version-2_0-branch/phpgwapi/setup/phpgw_no.lang    2017-09-14 
12:25:07 UTC (rev 17075)
@@ -60,7 +60,7 @@
 groups common  no      Grupper
 help   common  no      Hjelp
 high   common  no      Høy
-home   common  no      Hjemme
+home   common  no      Hjem
 it has been more then %1 days since you changed your password  common  no      
Det er mer enn %1 dager siden du har endet ditt passord
 january        common  no      Januar
 july   common  no      Juli
@@ -222,3 +222,4 @@
 remark home    no      Merknad
 about %1       about   no      Om %1
 group  common  no      Gruppe
+smtp server is not set! (admin section)        common  no      SMTP serveren 
er ikke konfigurert (admin seksjonen)
\ No newline at end of file

Modified: branches/Version-2_0-branch/phpgwapi/templates/frontend/head.inc.php
===================================================================
--- branches/Version-2_0-branch/phpgwapi/templates/frontend/head.inc.php        
2017-09-14 12:23:57 UTC (rev 17074)
+++ branches/Version-2_0-branch/phpgwapi/templates/frontend/head.inc.php        
2017-09-14 12:25:07 UTC (rev 17075)
@@ -71,7 +71,6 @@
        $stylesheets[] = "/{$app}/templates/base/css/base.css";
 //     $stylesheets[] = "/{$app}/css/frontend.css";
        $stylesheets[] = "/phpgwapi/templates/frontend/css/frontend.css";
-//     $stylesheets[] = "/phpgwapi/js/jquery/mmenu/core/css/jquery.mmenu.css";
        $stylesheets[] = 
"/phpgwapi/js/jquery/mmenu/core/css/jquery.mmenu.all.css";
 
        if (!preg_match('/Firefox/i', $_SERVER['HTTP_USER_AGENT']))
@@ -98,7 +97,7 @@
 
        $javascripts = array();
        $javascripts[] = 
"/phpgwapi/js/jquery/mmenu/core/js/jquery.mmenu.min.all.js";
-       $javascripts[] = "/phpgwapi/templates/pure/js/mmenu.js";
+       $javascripts[] = "/phpgwapi/templates/frontend/js/mmenu.js";
 
 
        //FIXME: To consider...
@@ -173,16 +172,72 @@
        $test = $GLOBALS['phpgw']->common->get_on_events();
     $test = str_replace('window.onload = 
function()','$(document).ready(function()',$test);
     $test = str_replace("\n}\n","\n})\n",$test);
+       $site_url       = $GLOBALS['phpgw']->link("/{$app}/", array());
+       $home_text              = lang('home');
+       $manual_text = lang('manual');
 
+
+       if(preg_match('/home.php$/i', $_SERVER['SCRIPT_NAME']))
+       {
+               $home_text      = '';
+       }
+
+       $user = $GLOBALS['phpgw']->accounts->get( 
$GLOBALS['phpgw_info']['user']['id'] );
+
+       if($user && isset($_SESSION['phpgw_session']['session_flags']) && 
$_SESSION['phpgw_session']['session_flags'] == 'N')
+       {
+               $login_text = $user->__toString() . ' :: ' . lang('Logout');
+               $login_url = 'logout.php';
+       }
+       else
+       {
+               $login_text_org = '';
+               $login_text = lang('Login');
+               $login_url = 'logout.php?login=1&after='. $_GET['menuaction'];
+               $login_parameter = !empty($config_frontend['login_parameter']) 
? $config_frontend['login_parameter'] : '';
+               $custom_login_url = 
!empty($config_frontend['custom_login_url']) ? 
$config_frontend['custom_login_url'] : '';
+               if($login_parameter)
+               {
+                       $login_parameter = ltrim($login_parameter, '&');
+                       $login_url .= "&{$login_parameter}";
+               }
+               if($custom_login_url)
+               {
+                       $login_url = $custom_login_url;
+               }
+       }
+
+$header = <<<HTML
+               <div class="home-menu custom-menu-wrapper">
+                       <div class="home-menu pure-menu pure-menu-horizontal 
pure-menu-fixed">
+                               <a href="{$site_url}" 
class="pure-menu-heading">{$site_title}</a>
+                               <ul class="pure-menu-list">
+                                       <li class="pure-menu-item 
pure-menu-selected"><a href="{$site_url}" 
class="pure-menu-link">{$home_text}</a></li>
+                                       <li class="pure-menu-item 
pure-menu-selected"><a href="{$manual}" 
class="pure-menu-link">{$manual_text}</a></li>
+                                       <li class="pure-menu-item 
pure-menu-selected"><a href="{$login_url}" 
class="pure-menu-link">{$login_text}</a></li>
+                               </ul>
+                       </div>
+               </div>
+HTML;
+
+       if( !empty( $GLOBALS['phpgw_info']['flags']['noframework'] ))
+       {
+               $header = '';
+       }
+
        $tpl_vars = array
        (
+               'header'                => $header,
+               'login_text_org' =>     $login_text_org,
+               'login_text'    => $login_text,
+               'login_url'             => $login_url,
                'css'                   => $GLOBALS['phpgw']->common->get_css(),
                'javascript'    => $GLOBALS['phpgw']->common->get_javascript(),
                'img_icon'      => 
$GLOBALS['phpgw']->common->find_image('phpgwapi', 'favicon.ico'),
                'site_title'    => $site_title,
-               'home_text'             => lang('home'),
+               'home_text'             => $home_text,
                'str_base_url'  => $GLOBALS['phpgw']->link('/', array(), true),
-               'site_url'      => $GLOBALS['phpgw']->link("/{$app}/", array()),
+               'site_url'      => $site_url,
                'webserver_url' => $webserver_url,
         'win_on_events'        => $test,
                'metainfo_author' => $author,
@@ -196,7 +251,7 @@
        if ($manual !== null) 
        {
 
-               $tpl_vars['manual_text'] = lang('manual');
+               $tpl_vars['manual_text'] = $manual_text;
                $tpl_vars['manual_url'] = $manual;
        }
        $user = $GLOBALS['phpgw']->accounts->get( 
$GLOBALS['phpgw_info']['user']['id'] );

Modified: branches/Version-2_0-branch/phpgwapi/templates/frontend/head.tpl
===================================================================
--- branches/Version-2_0-branch/phpgwapi/templates/frontend/head.tpl    
2017-09-14 12:23:57 UTC (rev 17074)
+++ branches/Version-2_0-branch/phpgwapi/templates/frontend/head.tpl    
2017-09-14 12:25:07 UTC (rev 17075)
@@ -39,8 +39,8 @@
        </head>
        <body>
 
-
-               <div class="home-menu custom-menu-wrapper">
+               {header}
+               <!--div class="home-menu custom-menu-wrapper">
                        <div class="home-menu pure-menu pure-menu-horizontal 
pure-menu-fixed">
                                <a href="{site_url}" 
class="pure-menu-heading">{site_title}</a>
                                <ul class="pure-menu-list">
@@ -49,20 +49,6 @@
                                        <li class="pure-menu-item 
pure-menu-selected"><a href="{login_url}" 
class="pure-menu-link">{login_text}</a></li>
                                </ul>
                        </div>
-               </div>
-
-               <!--div class="home-menu custom-menu-wrapper">
-                       <div class="pure-menu custom-menu custom-menu-top">
-                               <a href="{site_url}" class="pure-menu-heading 
custom-menu-brand">{site_title}</a>
-                               <a href="#" class="custom-menu-toggle" 
id="toggle"><s class="bar"></s><s class="bar"></s></a>
-                       </div>
-                       <div class="pure-menu pure-menu-horizontal 
pure-menu-scrollable custom-menu custom-menu-bottom custom-menu-tucked" 
id="tuckedMenu">
-                               <div class="custom-menu-screen"></div>
-                               <ul class="pure-menu-list">
-                                       <li class="pure-menu-item"><a 
href="{manual_url}" class="pure-menu-link">{manual_text}</a></li>
-                                       <li class="pure-menu-item"><a 
href="{login_url}" class="pure-menu-link">{login_text}</a></li>
-                               </ul>
-                       </div>
                </div-->
 
                <!-- END head -->

Copied: branches/Version-2_0-branch/phpgwapi/templates/frontend/js/mmenu.js 
(from rev 17074, trunk/phpgwapi/templates/frontend/js/mmenu.js)
===================================================================
--- branches/Version-2_0-branch/phpgwapi/templates/frontend/js/mmenu.js         
                (rev 0)
+++ branches/Version-2_0-branch/phpgwapi/templates/frontend/js/mmenu.js 
2017-09-14 12:25:07 UTC (rev 17075)
@@ -0,0 +1,74 @@
+$(function ()
+{
+
+       var HomeUrl = phpGWLink('home.php', {}, false);
+
+//     The menu
+       $('#menu').mmenu({
+               extensions: ['effect-slide-menu', 'pageshadow'],
+       //      searchfield: false,
+               counters: true,
+               header: {
+                       add: true,
+                       update: true
+               },
+               navbar: {
+                       //              title           : 'Advanced menu'
+               },
+               navbars: [
+                       {
+                               position: 'top',
+                               content: [
+                                       'prev',
+                                       'title',
+                                       'close'
+                               ]
+                       }                       
+
+               ]
+       });
+
+});
+
+$(document).ready(function ()
+{
+       $(window).resize(function ()
+       {
+               var width = $(window).width();
+               if (width < 620)
+               {
+                       $('.pure-form-aligned').each(function (i, obj)
+                       {
+                               
$(this).removeClass('pure-form-aligned').addClass('pure-form-stacked');
+                       });
+                       $('.pure-input-1-2').each(function (i, obj)
+                       {
+                               
$(this).removeClass('pure-input-1-2').addClass('pure-input-1');
+                       });
+                       $('.pure-u-3-4').each(function (i, obj)
+                       {
+                               
$(this).removeClass('pure-u-3-4').addClass('pure-u-5-6');
+                       });
+               }
+//             else if (resized == true && width > 620)
+//             {
+//                     $('.pure-form-stacked').each(function (i, obj)
+//                     {
+//                             
$(this).removeClass('pure-form-stacked').addClass('pure-form-aligned');
+//                     });
+//                     $('.pure-input-1').each(function (i, obj)
+//                     {
+//                             
$(this).removeClass('pure-input-1').addClass('pure-input-1-2');
+//                     });
+//                     $('.pure-u-5-6').each(function (i, obj)
+//                     {
+//                             
$(this).removeClass('pure-u-5-6').addClass('pure-u-3-4');
+//                     });
+//                     resized = false;
+//
+//             }
+
+       }).resize();//trigger the resize event on page load.
+
+});
+

Modified: branches/Version-2_0-branch/phpgwapi/templates/frontend/navbar.inc.php
===================================================================
--- branches/Version-2_0-branch/phpgwapi/templates/frontend/navbar.inc.php      
2017-09-14 12:23:57 UTC (rev 17074)
+++ branches/Version-2_0-branch/phpgwapi/templates/frontend/navbar.inc.php      
2017-09-14 12:25:07 UTC (rev 17075)
@@ -81,7 +81,7 @@
                {
                        $item['text'] = "<b>[ {$item['text']} ]</b>";
                }
-
+///            _debug_array($GLOBALS);die();
                $link_class = $current_class ? "class=\"{$current_class}\"" : 
'';
 
                $out = <<<HTML

Modified: branches/Version-2_0-branch/property/inc/class.solocation.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.solocation.inc.php   
2017-09-14 12:23:57 UTC (rev 17074)
+++ branches/Version-2_0-branch/property/inc/class.solocation.inc.php   
2017-09-14 12:25:07 UTC (rev 17075)
@@ -2199,6 +2199,46 @@
 
                }
 
+               function get_location_address($location_code = '')
+               {
+                       $locaction_code = 
$this->db->db_addslashes($location_code);
+
+                       $location_arr = explode('-', $location_code);
+                       $current_level = count($location_arr);
+
+
+                       $sql = "SELECT location_type AS location_level FROM 
fm_location_config WHERE column_name = 'street_id'";
+                       $this->db->query($sql, __LINE__, __FILE__);
+                       $this->db->next_record();
+                       $location_level = $this->db->f('location_level');
+
+                       if($location_level > $current_level)
+                       {
+                               $sql = "SELECT loc{$current_level}_name AS 
address FROM fm_location{$current_level} WHERE location_code = 
'{$location_code}'";
+                               $this->db->query($sql, __LINE__, __FILE__);
+                               $this->db->next_record();
+                               $address = $this->db->f('address', true);
+                               return $address;
+                       }
+
+                       $search_location_arr = array();
+
+                       for ($i = 0; $i < $location_level; $i++)
+                       {
+                               $search_location_arr[] = $location_arr[$i];
+                       }
+
+                       $search_location_code = implode('-', 
$search_location_arr);
+
+                       $sql = "SELECT fm_streetaddress.descr || ' ' || 
fm_location{$location_level}.street_number AS address FROM 
fm_location{$location_level}"
+                       . " {$this->join} fm_streetaddress ON 
fm_location{$location_level}.street_id = fm_streetaddress.id"
+                       . " WHERE location_code = '{$search_location_code}'";
+                               $this->db->query($sql, __LINE__, __FILE__);
+                               $this->db->next_record();
+                               $address = $this->db->f('address', true);
+                       return $address;
+               }
+
                function get_location_exception($location_code = '', 
$alert_vendor = false)
                {
 

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-14 12:23:57 UTC (rev 17074)
+++ branches/Version-2_0-branch/property/inc/class.uitts.inc.php        
2017-09-14 12:25:07 UTC (rev 17075)
@@ -3629,6 +3629,10 @@
                        {
                                $organisation = 
$this->bo->config->config_data['org_name'];
                        }
+                       if (isset($this->bo->config->config_data['department']))
+                       {
+                               $department = 
$this->bo->config->config_data['department'];
+                       }
 
                        $on_behalf_of_assigned = 
phpgw::get_var('on_behalf_of_assigned', 'bool');
                        if ($on_behalf_of_assigned && 
isset($ticket['assignedto_name']))
@@ -3648,16 +3652,18 @@
                                $user_name = 
$GLOBALS['phpgw_info']['user']['fullname'];
                        }
                        $ressursnr = 
$GLOBALS['phpgw_info']['user']['preferences']['property']['ressursnr'];
-                       $location = lang('Address') . ": 
{$ticket['address']}<br>";
+//                     $location = $ticket['address'];
 
+                       $location = 
createObject('property.solocation')->get_location_address($ticket['location_code'])
  . '<br/>';
+
                        $address_element = 
$this->bo->get_address_element($ticket['location_code']);
 
                        foreach ($address_element as $address_entry)
                        {
-                               $location .= "{$address_entry['text']}: 
{$address_entry['value']} <br>";
+                               $location .= " <br/>{$address_entry['text']}: 
{$address_entry['value']}";
                        }
 
-                       $location = rtrim($location, '<br>');
+       //              $location = rtrim($location, '<br/>');
 
                        $order_description = $ticket['order_descr'];
 
@@ -3715,71 +3721,100 @@
                                }
                        }
 
-                       $contact_block = nl2br(str_replace(array
-                               (
-                               '__user_name__',
-                               '__user_phone__',
-                               '__user_email__',
-                               '__contact_name__',
-                               '__contact_email__',
-                               '__contact_phone__',
-                               '__contact_name2__',
-                               '__contact_email2__',
-                               '__contact_phone2__',
-                               '__order_id__',
-                               '[b]',
-                               '[/b]'
-                                       ), array
-                               (
-                               $user_name,
-                               $user_phone,
-                               $user_email,
-                               $contact_name,
-                               $contact_email,
-                               $contact_phone,
-                               $contact_name2,
-                               $contact_email2,
-                               $contact_phone2,
-                               $order_id,
-                               '<b>',
-                               '</b>'
-                                       ), $order_contact_block_template));
+                       $contact_phone = str_replace(' ', '', $contact_phone);
+                       $contact_phone2 = str_replace(' ', '', $contact_phone2);
 
+                       if(  preg_match( '/^(\d{2})(\d{2})(\d{2})(\d{2})$/', 
$contact_phone,  $matches ) )
+                       {
+                               $contact_phone = "{$matches[1]} $matches[2] 
$matches[2] $matches[4]";
+                       }
+                       if(  preg_match( '/^(\d{2})(\d{2})(\d{2})(\d{2})$/', 
$contact_phone2,  $matches ) )
+                       {
+                               $contact_phone2 = "{$matches[1]} $matches[2] 
$matches[2] $matches[4]";
+                       }
 
+                       function nl2br2($string)
+                       {
+                               $string = str_replace(array("\r\n", "\r", 
"\n"), "<br />", $string);
+                               return $string;
+                       }
+                       
+                       if($contact_name)
+                       {
+                               $contact_block = '<br/>' . 
nl2br2(str_replace(array
+                                       (
+                                       '__user_name__',
+                                       '__user_phone__',
+                                       '__user_email__',
+                                       '__contact_name__',
+                                       '__contact_email__',
+                                       '__contact_phone__',
+                                       '__contact_name2__',
+                                       '__contact_email2__',
+                                       '__contact_phone2__',
+                                       '__order_id__',
+                                       '[b]',
+                                       '[/b]'
+                                               ), array
+                                       (
+                                       $user_name,
+                                       $user_phone,
+                                       $user_email,
+                                       $contact_name,
+                                       $contact_email,
+                                       $contact_phone,
+                                       $contact_name2,
+                                       $contact_email2,
+                                       $contact_phone2,
+                                       $order_id,
+                                       '<b>',
+                                       '</b>'
+                                               ), 
$order_contact_block_template));
+                               $contact_block .= '<br/>';
+                       }
+                       else
+                       {
+                               $contact_block = '';
+                       }
+
                        $dateformat = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
                        $date = $GLOBALS['phpgw']->common->show_date(time(), 
$dateformat);
 
 
-                       $body = "<table><tr>";
-                       $body .= "<td valign='top'>{$organisation}<br/>Org.nr: 
{$this->bo->config->config_data['org_unit_id']}</td>";
-                       $body .= "<td valign='top'>" .  lang('order id') . 
"<br/><b>{$ticket['order_id']}</b></td>";
+                       $lang_order = lang('order');
+                       $lang_from = lang('from');
+                       $body = "<table style='width: 800px;'><tr>";
+                       $body .= "<td valign='top'>{$lang_order}: 
<b>{$order_id}</b><br/>&nbsp;</td>";
+                       $body .= "<td valign='top'>" . lang('date') . 
":{$date}</td>";
+                       $body .= "</tr>";
                        $body .= "<tr>";
-                       $body .= "<td valign='top'>" .  lang('vendor') . 
"<br/>" . $this->_get_vendor_name($ticket['vendor_id']) . "</td>";
-                       $body .= "<td>" .  lang('delivery address') . 
"<br/>{$location}</td>";
+                       $body .= "<td valign='top'>{$lang_from}: 
{$organisation}<br/>"
+                                       . "{$department}<br/>"
+                                       . "Org.nr: 
{$this->bo->config->config_data['org_unit_id']}"
+                                       . "</td>";
+                       $body .= "<td valign='top'>v/saksbehandler: 
{$user_name}<br/>"
+                                       . "Ressursnr.: {$ressursnr}<br/>"
+                                       . "</td>";
                        $body .= "</tr>";
                        $body .= "<tr>";
-                       $body .= "<td valign='top'>";
-                       $body .=  lang('date') . ":{$date}<br/>";
-                       $body .=  lang('dimb') . ": {$ticket['ecodimb']}<br/>";
-                       $body .=  lang('from') . ": 
{$user_name}<br/>{$user_phone}<br/>{$user_email}<br/>";
-                       $body .= "</td>";
+                       $body .= "<td colspan=2>" .  lang('delivery address') . 
":<br/>{$location}</td>";
+                       $body .= "</tr>";
+                       $body .= "<tr>";
+                       $body .= "<td valign='top'>" .  lang('to') . ":<br/>" . 
$this->_get_vendor_name($ticket['vendor_id']) . "</td>";
+                       $body .= "<td valign='top'>" .  lang('invoice address') 
. ":<br/>{$this->bo->config->config_data['invoice_address']}</td>";
 
-                       $body .= "<td valign='top'>" .  lang('invoice address') 
. "<br/>{$this->bo->config->config_data['invoice_address']}</td>";
+                       $body .= "</tr></table>";
 
+
+                       $deadline_block = '';
+
                        if($ticket['order_deadline'])
                        {
-                               $body .= "<tr><td>";
-                               $body .=  lang('deadline');
-                               $body .= "</td>";
-                               $body .= "<td>";
-                               $body .=  "<b>{$ticket['order_deadline']}</b>";
-                               $body .= "</td></tr>";
+                               $deadline_block .= "<br/><b>" . 
lang('deadline') . '</b>';
+                               $deadline_block .= "<br/>" . 
$ticket['order_deadline'];
                        }
 
-                       $body .= "</tr></table><br/>";
-
-
-                       $body .= nl2br(str_replace(array
+                       $body .= '<br/>'. nl2br(str_replace(array
                                (
                                '__vendor_name__',
                                '__organisation__',
@@ -3789,6 +3824,7 @@
                                '__ressursnr__',
                                '__location__',
                                '__order_description__',
+                               '__deadline_block__',
                                '__contact_block__',
                                '__contact_name__',
                                '__contact_email__',
@@ -3806,6 +3842,7 @@
                                $ressursnr,
                                $location,
                                $order_description,
+                               $deadline_block,
                                $contact_block,
                                $contact_name,
                                $contact_email,
@@ -4114,8 +4151,20 @@
                        }
 
                        $coordinator_email = 
"{$coordinator_name}<{$GLOBALS['phpgw_info']['user']['preferences']['property']['email']}>";
+
+                       $validator = 
CreateObject('phpgwapi.EmailAddressValidator');
+
+                       if 
($validator->check_email_address($GLOBALS['phpgw_info']['user']['preferences']['property']['email']))
+                       {
+                               $bcc = '';
+                               phpgwapi_cache::message_set(lang('please update 
<a href="%1">your email address here</a>', 
$GLOBALS['phpgw']->link('/preferences/preferences.php', 
array('appname'=>'property','type'=> 'user') )),'error' );
+                       }
+                       else
+                       {
+                               $bcc = $coordinator_email;
+                       }
+
                        $cc = '';
-                       $bcc = $coordinator_email;
                        $contact_data = 
$this->bocommon->initiate_ui_contact_lookup(array(
                                'contact_id' => $ticket['contact_id'],
                                'field' => 'contact',

Modified: branches/Version-2_0-branch/property/setup/phpgw_no.lang
===================================================================
--- branches/Version-2_0-branch/property/setup/phpgw_no.lang    2017-09-14 
12:23:57 UTC (rev 17074)
+++ branches/Version-2_0-branch/property/setup/phpgw_no.lang    2017-09-14 
12:25:07 UTC (rev 17075)
@@ -2236,4 +2236,6 @@
 alert vendor   property        no      Varsle leverandør
 important information  property        no      Viktig informasjon
 category content       property        no      Tekster for kategori
-order deadline property        no      Frist for utførelse
\ No newline at end of file
+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

Modified: branches/Version-2_0-branch/property/templates/base/config.tpl
===================================================================
--- branches/Version-2_0-branch/property/templates/base/config.tpl      
2017-09-14 12:23:57 UTC (rev 17074)
+++ branches/Version-2_0-branch/property/templates/base/config.tpl      
2017-09-14 12:25:07 UTC (rev 17075)
@@ -17,6 +17,10 @@
                                <td><input name="newsettings[org_name]" 
value="{value_org_name}"></td>
                        </tr>
                        <tr>
+                               <td>{lang_department}:</td>
+                               <td><input name="newsettings[department]" 
value="{value_department}"></td>
+                       </tr>
+                       <tr>
                                <td>{lang_org_unit_id}:</td>
                                <td><input name="newsettings[org_unit_id]" 
value="{value_org_unit_id}"></td>
                        </tr>

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-14 12:23:57 UTC (rev 17074)
+++ branches/Version-2_0-branch/property/templates/base/contact_form.xsl        
2017-09-14 12:25:07 UTC (rev 17075)
@@ -1,46 +1,59 @@
 
 <!-- $Id$ -->
 <xsl:template name="contact_form">
-               <xsl:apply-templates select="contact_data"/>
+       <xsl:apply-templates select="contact_data"/>
 </xsl:template>
 
 <!-- New template-->
 <xsl:template match="contact_data">
-               <script type="text/javascript">
-                       function <xsl:value-of select="field"/>_contact_lookup()
-                       {
-               TINY.box.show({iframe:'<xsl:value-of select="contact_link"/>', 
boxid:"frameless",width:750,height:450,fixed:false,maskid:"darkmask",maskopacity:40,
 mask:true, animate:true, close: true});
-                       }
-               </script>
+       <script type="text/javascript">
+               function <xsl:value-of select="field"/>_contact_lookup()
+               {
+                       TINY.box.show({iframe:'<xsl:value-of 
select="contact_link"/>', 
boxid:"frameless",width:750,height:450,fixed:false,maskid:"darkmask",maskopacity:40,
 mask:true, animate:true, close: true});
+               }
+               function <xsl:value-of select="field"/>_contact_clear(field)
+               {
+                       $("#" + field).val('');
+                       $("#" + field + "_name").val('');
+                       $("#" + field + "_contact_tel").html('');
+                       $("#" + field + "_contact_email").html('');
+                       $("#" + field + "_clear_contact").prop("checked", 
false);
+               }
+       </script>
        <div class="pure-control-group">
                <label for='contact'>
-                                       <a 
href="javascript:{field}_contact_lookup()" title="{lang_select_contact_help}">
-                                               <xsl:value-of 
select="lang_contact"/>
-                                       </a>
-                               </label>
+                       <a href="javascript:{field}_contact_lookup()" 
title="{lang_select_contact_help}">
+                               <xsl:value-of select="lang_contact"/>
+                       </a>
+               </label>
                <div class="pure-custom">
-                       <input type="hidden" name="{field}" 
value="{value_contact_id}"></input>
-                                                       <input size="30" 
type="text" name="{field}_name" value="{value_contact_name}" 
onClick="{field}_contact_lookup();" readonly="readonly">
-                                                               <xsl:attribute 
name="title">
-                                                                       
<xsl:value-of select="lang_select_contact_help"/>
-                                                               </xsl:attribute>
-                                                       </input>
-                                       <xsl:choose>
-                                               <xsl:when 
test="value_contact_tel!=''">
-                                       <div>
-                                                                       
<xsl:value-of select="value_contact_tel"/>
+                       <input type="hidden" id="{field}"  name="{field}" 
value="{value_contact_id}"></input>
+                       <input size="30" type="text" id="{field}_name" 
name="{field}_name" value="{value_contact_name}" 
onClick="{field}_contact_lookup();" readonly="readonly">
+                               <xsl:attribute name="title">
+                                       <xsl:value-of 
select="lang_select_contact_help"/>
+                               </xsl:attribute>
+                       </input>
+                       <xsl:choose>
+                               <xsl:when test="value_contact_tel!=''">
+                                       <div id="{field}_contact_tel">
+                                               <xsl:value-of 
select="value_contact_tel"/>
                                        </div>
-                                               </xsl:when>
-                                       </xsl:choose>
-                                       <xsl:choose>
-                                               <xsl:when 
test="value_contact_email!=''">
-                                       <div>
-                                                                       <a 
href="mailto:{value_contact_email}";>
-                                                                               
<xsl:value-of select="value_contact_email"/>
-                                                                       </a>
+                               </xsl:when>
+                       </xsl:choose>
+                       <xsl:choose>
+                               <xsl:when test="value_contact_email!=''">
+                                       <div id="{field}_contact_email">
+                                               <a 
href="mailto:{value_contact_email}";>
+                                                       <xsl:value-of 
select="value_contact_email"/>
+                                               </a>
                                        </div>
-                                               </xsl:when>
-                                       </xsl:choose>
+                               </xsl:when>
+                       </xsl:choose>
                </div>
+               <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>
        </div>
 </xsl:template>




reply via email to

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