fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [6734] property: sms from ticket


From: Sigurd Nes
Subject: [Fmsystem-commits] [6734] property: sms from ticket
Date: Fri, 07 Jan 2011 14:10:07 +0000

Revision: 6734
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6734
Author:   sigurdne
Date:     2011-01-07 14:10:06 +0000 (Fri, 07 Jan 2011)
Log Message:
-----------
property: sms from ticket

Modified Paths:
--------------
    trunk/property/inc/class.botts.inc.php
    trunk/property/inc/class.menu.inc.php
    trunk/property/inc/class.sogeneric.inc.php
    trunk/property/inc/class.uilookup.inc.php
    trunk/property/inc/class.uitts.inc.php
    trunk/property/js/yahoo/tts.view.js
    trunk/property/setup/setup.inc.php
    trunk/property/setup/tables_current.inc.php
    trunk/property/setup/tables_update.inc.php
    trunk/property/templates/base/config.tpl
    trunk/property/templates/base/tts.xsl

Modified: trunk/property/inc/class.botts.inc.php
===================================================================
--- trunk/property/inc/class.botts.inc.php      2011-01-07 07:59:59 UTC (rev 
6733)
+++ trunk/property/inc/class.botts.inc.php      2011-01-07 14:10:06 UTC (rev 
6734)
@@ -235,6 +235,7 @@
                                'F' => lang('finnish date'),
                                'SC' => lang('Status changed'),
                                'M' => lang('Sent by email to'),
+                               'MS' => lang('Sent by sms'),
                                'AC'=> lang('actual cost changed'),
                        );
 
@@ -582,6 +583,9 @@
                                        $type = lang('Sent by email to');
                                        $this->order_sent_adress = 
$value['new_value']; // in case we want to resend the order as an reminder
                                        break;
+                               case 'MS':
+                                       $type = lang('Sent by sms');
+                                       break;
                                default:
                                        // nothing
                                }

Modified: trunk/property/inc/class.menu.inc.php
===================================================================
--- trunk/property/inc/class.menu.inc.php       2011-01-07 07:59:59 UTC (rev 
6733)
+++ trunk/property/inc/class.menu.inc.php       2011-01-07 14:10:06 UTC (rev 
6734)
@@ -639,6 +639,13 @@
                                        );
                        }
 
+                       
$menus['navigation']['helpdesk']['children']['response_template'] = array
+                               (
+                                       'url'   => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uigeneric.index', 'type' => 'response_template') ),
+                                       'text'  => lang('order template'),
+                                       'image'         => array('property', 
'helpdesk')
+                               );
+
                        if ( $acl->check('.project', PHPGW_ACL_READ, 
'property') )
                        {
                                $menus['navigation']['project'] = array

Modified: trunk/property/inc/class.sogeneric.inc.php
===================================================================
--- trunk/property/inc/class.sogeneric.inc.php  2011-01-07 07:59:59 UTC (rev 
6733)
+++ trunk/property/inc/class.sogeneric.inc.php  2011-01-07 14:10:06 UTC (rev 
6734)
@@ -1567,7 +1567,49 @@
                                        );
 
                                break;
+                       case 'response_template':
 
+                               $info = array
+                                       (
+                                               'table'                         
=> 'fm_response_template',
+                                               'id'                            
=> array('name' => 'id', 'type' => 'auto'),
+                                               'fields'                        
=> array
+                                               (
+                                                       array
+                                                       (
+                                                               'name' => 
'name',
+                                                               'descr' => 
lang('name'),
+                                                               'type' => 
'varchar'
+                                                       ),
+                                                       array
+                                                       (
+                                                               'name' => 
'content',
+                                                               'descr' => 
lang('content'),
+                                                               'type' => 'text'
+                                                       ),
+                                                       array
+                                                       (
+                                                               'name' => 
'public',
+                                                               'descr' => 
lang('public'),
+                                                               'type' => 
'checkbox'
+                                                       )
+                                               ),
+                                               'edit_msg'                      
=> lang('edit'),
+                                               'add_msg'                       
=> lang('add'),
+                                               'name'                          
=> lang('response template'),
+                                               'acl_location'          => 
'.ticket',
+                                               'menu_selection'        => 
'property::helpdesk::response_template',
+                                               'default'                       
=> array
+                                               (
+                                                       'user_id'               
=> array('add'  => '$this->account'),
+                                                       'entry_date'    => 
array('add'  => 'time()'),
+                                                       'modified_date' => 
array('edit' => 'time()'),
+                                               ),
+                                               'check_grant'           => true
+                                       );
+
+                               break;
+
                        case 'responsibility_role':
 
                                $info = array

Modified: trunk/property/inc/class.uilookup.inc.php
===================================================================
--- trunk/property/inc/class.uilookup.inc.php   2011-01-07 07:59:59 UTC (rev 
6733)
+++ trunk/property/inc/class.uilookup.inc.php   2011-01-07 14:10:06 UTC (rev 
6734)
@@ -49,19 +49,20 @@
 
                var $public_functions = array
                        (
-                               'addressbook'   => true,
-                               'organisation'  => true,
-                               'vendor'                => true,
-                               'b_account'             => true,
-                               'location'              => true,
-                               'entity'                => true,
-                               'ns3420'                => true,
-                               'street'                => true,
-                               'tenant'                => true,
-                               'phpgw_user'    => true,
-                               'project_group' => true,
-                               'ecodimb'               => true,
-                               'order_template'=> true
+                               'addressbook'           => true,
+                               'organisation'          => true,
+                               'vendor'                        => true,
+                               'b_account'                     => true,
+                               'location'                      => true,
+                               'entity'                        => true,
+                               'ns3420'                        => true,
+                               'street'                        => true,
+                               'tenant'                        => true,
+                               'phpgw_user'            => true,
+                               'project_group'         => true,
+                               'ecodimb'                       => true,
+                               'order_template'        => true,
+                               'response_template'     => true
                        );
 
                function __construct()
@@ -2989,4 +2990,218 @@
 
                        $this->save_sessiondata();
                }
+
+               function response_template()
+               {
+                       if( phpgw::get_var('phpgw_return_as') != 'json' )
+                       {
+
+                               $datatable['config']['base_url']        = 
$GLOBALS['phpgw']->link('/index.php', array
+                                       (
+                                               'menuaction'                    
=> 'property.uilookup.response_template',
+                                               'second_display'        => true,
+                                               'cat_id'                        
=> $this->cat_id,
+                                               'query'                         
=> $this->query,
+                                               'filter'                        
=> $this->filter
+                                       ));
+                               $datatable['config']['allow_allrows'] = true;
+
+                               $datatable['config']['base_java_url'] = 
"menuaction:'property.uilookup.response_template',"
+                                       ."second_display:true,"
+                                       ."type:'response_template',"
+                                       ."cat_id:'{$this->cat_id}',"
+                                       ."query:'{$this->query}',"
+                                       ."filter:'{$this->filter}'";
+
+                               $datatable['actions']['form'] = array
+                                       (
+                                               array
+                                               (
+                                                       'action'        => 
$GLOBALS['phpgw']->link('/index.php',
+                                                       array
+                                                       (
+                                                               'menuaction'    
        => 'property.uilookup.response_template',
+                                                               
'second_display'        => true,
+                                                               'cat_id'        
                => $this->cat_id,
+                                                               'query'         
                => $this->query,
+                                                               'filter'        
                => $this->filter,
+                                                               'type'          
                => 'response_template'
+                                                       )
+                                               ),
+                                               'fields'        => array
+                                               (
+                                                       'field' => array
+                                                       (
+                                                               array
+                                                               ( //boton  
SEARCH
+                                                                       'id' => 
'btn_search',
+                                                                       'name' 
=> 'search',
+                                                                       'value' 
   => lang('search'),
+                                                                       'type' 
=> 'button',
+                                                                       
'tab_index' => 2
+                                                               ),
+                                                               array
+                                                               ( // TEXT IMPUT
+                                                                       'name'  
   => 'query',
+                                                                       'id'    
 => 'txt_query',
+                                                                       'value' 
   => '',//'',//$query,
+                                                                       'type' 
=> 'text',
+                                                                       'size'  
  => 28,
+                                                                       
'onkeypress' => 'return pulsar(event)',
+                                                                       
'tab_index' => 1
+                                                               )
+                                                       ),
+                                                       'hidden_value' => array
+                                                       (
+                                                               )
+                                                       )
+                                               )
+                                       );
+                       }
+
+                       $uicols = array (
+                               'input_type'    =>      
array('text','text','text'),
+                               'name'                  =>      
array('id','name','content'),
+                               'formatter'             =>      array('','',''),
+                               'descr'                 =>      
array(lang('ID'),lang('name'),lang('content'))
+                       );
+
+                       $template_list = array();
+                       $bo     = CreateObject('property.bogeneric',true);
+                       $template_list = $bo->read();
+
+                       $content = array();
+                       $j=0;
+                       if (isset($template_list) && is_array($template_list))
+                       {
+                               foreach($template_list as $template_entry)
+                               {
+                                       for 
($i=0;$i<count($uicols['name']);$i++)
+                                       {
+                                               
$datatable['rows']['row'][$j]['column'][$i]['value']    = 
$template_entry[$uicols['name'][$i]];
+                                               
$datatable['rows']['row'][$j]['column'][$i]['name']     = $uicols['name'][$i];
+                                       }
+                                       $j++;
+                               }
+                       }
+
+                       $uicols_count   = count($uicols['descr']);
+                       $datatable['rowactions']['action'] = array();
+                       for ($i=0;$i<$uicols_count;$i++)
+                       {
+                               //all colums should be have formatter
+                               
$datatable['headers']['header'][$i]['formatter'] = 
($uicols['formatter'][$i]==''?  '""' : $uicols['formatter'][$i]);
+
+                               $datatable['headers']['header'][$i]['name']     
                = $uicols['name'][$i];
+                               $datatable['headers']['header'][$i]['text']     
                = $uicols['descr'][$i];
+                               $datatable['headers']['header'][$i]['visible']  
                = true;
+                               $datatable['headers']['header'][$i]['sortable'] 
                = true;
+                               
$datatable['headers']['header'][$i]['sort_field']               = 
$uicols['name'][$i];
+                       }
+
+                       $function_exchange_values = '';
+
+                       $function_exchange_values .= 'var temp = 
opener.document.getElementsByName("values[response_text]")[0].value;' ."\r\n";
+                       $function_exchange_values .= 'if(temp){temp = temp + 
"\n";}' ."\r\n";
+                       $function_exchange_values .= 
'opener.document.getElementsByName("values[response_text]")[0].value = temp + 
data.getData("content");' ."\r\n";
+                       $function_exchange_values .= 
'opener.SmsCountKeyUp(160);' ."\r\n";
+
+                       $function_exchange_values .= 'window.close()';
+
+                       $datatable['exchange_values'] = 
$function_exchange_values;
+                       $datatable['valida'] = '';
+
+                       // path for property.js
+                       $datatable['property_js'] = 
$GLOBALS['phpgw_info']['server']['webserver_url']."/property/js/yahoo/property.js";
+
+                       // Pagination and sort values
+                       $datatable['pagination']['records_start']       = 
(int)$this->start;
+                       $datatable['pagination']['records_limit']       = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
+                       $datatable['pagination']['records_returned']= 
count($template_list);
+                       $datatable['pagination']['records_total']       = 
$this->bo->total_records;
+
+                       if ( (phpgw::get_var("start")== "") && 
(phpgw::get_var("order",'string')== ""))
+                       {
+                               $datatable['sorting']['order']                  
= 'id'; // name key Column in myColumnDef
+                               $datatable['sorting']['sort']                   
= 'name'; // ASC / DESC
+                       }
+                       else
+                       {
+                               $datatable['sorting']['order']                  
= phpgw::get_var('order', 'string'); // name of column of Database
+                               $datatable['sorting']['sort']                   
= phpgw::get_var('sort', 'string'); // ASC / DESC
+                       }
+
+                       $appname                                                
= lang('template');
+                       $function_msg                                   = 
lang('list response template');
+
+
+                       //-- BEGIN----------------------------- JSON CODE 
------------------------------
+
+                       //values for Pagination
+                       $json = array
+                               (
+                                       'recordsReturned'       => 
$datatable['pagination']['records_returned'],
+                                       'totalRecords'          => 
(int)$datatable['pagination']['records_total'],
+                                       'startIndex'            => 
$datatable['pagination']['records_start'],
+                                       'sort'                          => 
$datatable['sorting']['order'],
+                                       'dir'                           => 
$datatable['sorting']['sort'],
+                                       'records'                       => 
array()
+                               );
+
+                       // values for datatable
+                       if(isset($datatable['rows']['row']) && 
is_array($datatable['rows']['row'])){
+                               foreach( $datatable['rows']['row'] as $row )
+                               {
+                                       $json_row = array();
+                                       foreach( $row['column'] as $column)
+                                       {
+                                               if(isset($column['format']) && 
$column['format']== "link" && $column['java_link']==true)
+                                               {
+                                                       
$json_row[$column['name']] = "<a href='#' id='".$column['link']."' 
onclick='javascript:filter_data(this.id);'>" .$column['value']."</a>";
+                                               }
+                                               else 
if(isset($column['format']) && $column['format']== "link")
+                                               {
+                                                       
$json_row[$column['name']] = "<a href='".$column['link']."' target='_blank'>" 
.$column['value']."</a>";
+                                               }
+                                               else
+                                               {
+                                                       
$json_row[$column['name']] = $column['value'];
+                                               }
+                                       }
+                                       $json['records'][] = $json_row;
+                               }
+                       }
+
+                       // right in datatable
+                       if(isset($datatable['rowactions']['action']) && 
is_array($datatable['rowactions']['action']))
+                       {
+                               $json['rights'] = 
$datatable['rowactions']['action'];
+                       }
+
+                       if( phpgw::get_var('phpgw_return_as') == 'json' )
+                       {
+                               return $json;
+                       }
+
+                       $datatable['json_data'] = json_encode($json);
+                       //-------------------- JSON CODE ----------------------
+
+                       // Prepare template variables and process XSLT
+                       $template_vars = array();
+                       $template_vars['datatable'] = $datatable;
+                       
$GLOBALS['phpgw']->xslttpl->add_file(array('datatable'));
+                       $GLOBALS['phpgw']->xslttpl->set_var('phpgw', 
$template_vars);
+
+
+                       //Title of Page
+                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('property') . ' - ' . $appname . ': ' . $function_msg;
+
+                       // Prepare YUI Library
+                       $GLOBALS['phpgw']->js->validate_file( 'yahoo', 
'lookup.tenant.index', 'property' );
+
+                       $this->save_sessiondata();
+               }
+
+
+
        }

Modified: trunk/property/inc/class.uitts.inc.php
===================================================================
--- trunk/property/inc/class.uitts.inc.php      2011-01-07 07:59:59 UTC (rev 
6733)
+++ trunk/property/inc/class.uitts.inc.php      2011-01-07 14:10:06 UTC (rev 
6734)
@@ -2010,6 +2010,8 @@
 
                        $GLOBALS['phpgw']->xslttpl->add_file(array('tts', 
'files'));
 
+                       $historylog     = 
CreateObject('property.historylog','tts');
+
                        if(isset($values['save']))
                        {
                                if(!$this->acl_edit)
@@ -2087,6 +2089,22 @@
                                        }
                                }
                                //                      
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=> 
'property.uitts.index'));
+
+
+                               if( phpgw::get_var('notify_client_by_sms', 
'bool') 
+                                       && isset($values['response_text'])
+                                       && $values['response_text']
+                                       && phpgw::get_var('to_sms_phone'))
+                               {
+                                       $to_sms_phone = 
phpgw::get_var('to_sms_phone');
+               //                      $ticket['contact_phone'] = 
$to_sms_phone;
+                                       
+                                       $sms    = CreateObject('sms.sms');
+                                       
$sms->websend2pv($this->account,$to_sms_phone,$values['response_text']);
+                                       
$historylog->add('MS',$id,"{$to_sms_phone}::{$values['response_text']}");
+                               }
+
+
                        }
                        //---------end files
                        $ticket = $this->bo->read_single($id);
@@ -2337,8 +2355,6 @@
 
                        if($vendor_email)
                        {
-                               $historylog     = 
CreateObject('property.historylog','tts');
-
                                $subject = lang(workorder).": 
{$ticket['order_id']}";
 
                                $organisation = '';
@@ -2573,6 +2589,7 @@
                                {
                                        $note['order_text'] = '<input 
type="checkbox" name="values[order_text][]" value="'.$note['value_note'].'" 
title="'.lang('Check to add text to order').'">';
 
+
                                }
                        }
 
@@ -2693,6 +2710,8 @@
                        $order_catetory = 
$this->cats->formatted_xslt_list(array('select_name' => 
'values[cat_id]','selected' => $ticket['order_cat_id']));
                        $data = array
                                (
+                                       'send_response'                         
        => isset($this->bo->config->config_data['tts_send_response']) ? 
$this->bo->config->config_data['tts_send_response'] : '',
+                                       'value_sms_phone'                       
        => $ticket['contact_phone'],
                                        'access_order'                          
        => $access_order,
                                        'currency'                              
                => 
$GLOBALS['phpgw_info']['user']['preferences']['common']['currency'],
                                        'value_order_id'                        
        => $ticket['order_id'],

Modified: trunk/property/js/yahoo/tts.view.js
===================================================================
--- trunk/property/js/yahoo/tts.view.js 2011-01-07 07:59:59 UTC (rev 6733)
+++ trunk/property/js/yahoo/tts.view.js 2011-01-07 14:10:06 UTC (rev 6734)
@@ -58,6 +58,42 @@
        }
 
 
+       function SmsCountKeyUp(maxChar)
+       {
+               var msg  = 
document.getElementsByName("values[response_text]")[0];
+           var left = document.forms.form.charNumberLeftOutput;
+           var smsLenLeft = maxChar  - msg.value.length;
+           if (smsLenLeft >= 0) 
+           {
+                       left.value = smsLenLeft;
+           } 
+           else 
+           {
+                       var msgMaxLen = maxChar;
+                       left.value = 0;
+                       msg.value = msg.value.substring(0, msgMaxLen);
+           }
+       }
+
+       function SmsCountKeyDown(maxChar)
+       {
+               var msg  = 
document.getElementsByName("values[response_text]")[0];
+           var left = document.forms.form.charNumberLeftOutput;
+           var smsLenLeft = maxChar  - msg.value.length;
+           if (smsLenLeft >= 0) 
+           {
+                       left.value = smsLenLeft;
+           } 
+           else 
+           {
+                       var msgMaxLen = maxChar;
+                       left.value = 0; 
+                       msg.value = msg.value.substring(0, msgMaxLen);
+           }
+       }
+
+
+
        this.fetch_vendor_email=function()
        {
 //                     formObject = document.body.getElementsByTagName('form');

Modified: trunk/property/setup/setup.inc.php
===================================================================
--- trunk/property/setup/setup.inc.php  2011-01-07 07:59:59 UTC (rev 6733)
+++ trunk/property/setup/setup.inc.php  2011-01-07 14:10:06 UTC (rev 6734)
@@ -12,7 +12,7 @@
        */
 
        $setup_info['property']['name']                 = 'property';
-       $setup_info['property']['version']              = '0.9.17.602';
+       $setup_info['property']['version']              = '0.9.17.603';
        $setup_info['property']['app_order']    = 8;
        $setup_info['property']['enable']               = 1;
        $setup_info['property']['app_group']    = 'office';
@@ -169,6 +169,7 @@
                'fm_orders',
                'fm_order_dim1',
                'fm_order_template',
+               'fm_response_template',
                'fm_s_agreement',
                'fm_s_agreement_budget',
                'fm_s_agreement_category',

Modified: trunk/property/setup/tables_current.inc.php
===================================================================
--- trunk/property/setup/tables_current.inc.php 2011-01-07 07:59:59 UTC (rev 
6733)
+++ trunk/property/setup/tables_current.inc.php 2011-01-07 14:10:06 UTC (rev 
6734)
@@ -1774,6 +1774,21 @@
                        'ix' => array(),
                        'uc' => array()
                ),
+               'fm_response_template' => array(
+                       'fd' => array(
+                               'id' => array('type' => 'auto', 'precision' => 
4,'nullable' => False),
+                               'name' => array('type' => 'varchar', 
'precision' => 200,'nullable' => False),
+                               'content' => array('type' => 'text','nullable' 
=> True),
+                               'public' => array('type' => 'int', 'precision' 
=> 2,'nullable' => True),
+                               'user_id' => array('type' => 'int', 'precision' 
=> 4,'nullable' => True),
+                               'entry_date' => array('type' => 'int', 
'precision' => 4,'nullable' => True),
+                               'modified_date' => array('type' => 'int', 
'precision' => 4,'nullable' => True),
+                       ),
+                       'pk' => array('id'),
+                       'fk' => array(),
+                       'ix' => array(),
+                       'uc' => array()
+               ),
                'fm_s_agreement' => array(
                        'fd' => array(
                                'id' => array('type' => 'int', 'precision' => 
4,'nullable' => False,'default' => '0'),

Modified: trunk/property/setup/tables_update.inc.php
===================================================================
--- trunk/property/setup/tables_update.inc.php  2011-01-07 07:59:59 UTC (rev 
6733)
+++ trunk/property/setup/tables_update.inc.php  2011-01-07 14:10:06 UTC (rev 
6734)
@@ -4801,3 +4801,40 @@
                        return $GLOBALS['setup_info']['property']['currentver'];
                }
        }
+
+       /**
+       * Update property version from 0.9.17.602 to 0.9.17.603
+       * Add templates to response from helpdesk
+       * 
+       */
+
+       $test[] = '0.9.17.602';
+       function property_upgrade0_9_17_602()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+               $GLOBALS['phpgw_setup']->oProc->CreateTable(
+                       'fm_response_template', array(
+                               'fd' => array(
+                                       'id' => array('type' => 'auto', 
'precision' => 4,'nullable' => False),
+                                       'name' => array('type' => 'varchar', 
'precision' => 200,'nullable' => False),
+                                       'content' => array('type' => 
'text','nullable' => True),
+                                       'public' => array('type' => 'int', 
'precision' => 2,'nullable' => True),
+                                       'user_id' => array('type' => 'int', 
'precision' => 4,'nullable' => True),
+                                       'entry_date' => array('type' => 'int', 
'precision' => 4,'nullable' => True),
+                                       'modified_date' => array('type' => 
'int', 'precision' => 4,'nullable' => True),
+                               ),
+                               'pk' => array('id'),
+                               'fk' => array(),
+                               'ix' => array(),
+                               'uc' => array()
+                       )
+               );
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['property']['currentver'] = 
'0.9.17.603';
+                       return $GLOBALS['setup_info']['property']['currentver'];
+               }
+       }
+

Modified: trunk/property/templates/base/config.tpl
===================================================================
--- trunk/property/templates/base/config.tpl    2011-01-07 07:59:59 UTC (rev 
6733)
+++ trunk/property/templates/base/config.tpl    2011-01-07 14:10:06 UTC (rev 
6734)
@@ -343,6 +343,16 @@
                </tr>
 
                <tr class="row_off">
+                       <td>{lang_send_response_TTS}.</td>
+                       <td>
+                               <select name="newsettings[tts_send_response]">
+                                       <option value="" 
{selected_tts_send_response_}>NO</option>
+                                       <option value="1" 
{selected_tts_send_response_1}>YES</option>
+                               </select>
+                       </td>
+               </tr>
+
+               <tr class="row_off">
                        <td>{lang_Ask_for_workorder_approval_by_e-mail}.</td>
                        <td>
                                <select name="newsettings[workorder_approval]">

Modified: trunk/property/templates/base/tts.xsl
===================================================================
--- trunk/property/templates/base/tts.xsl       2011-01-07 07:59:59 UTC (rev 
6733)
+++ trunk/property/templates/base/tts.xsl       2011-01-07 14:10:06 UTC (rev 
6734)
@@ -760,20 +760,26 @@
                        self.name="first_Window";
                        function generate_order()
                        {
-                       Window1=window.open('<xsl:value-of 
select="order_link"/>');
+                               Window1=window.open('<xsl:value-of 
select="order_link"/>');
                        }               
+
                        function generate_request()
                        {
-                       Window1=window.open('<xsl:value-of 
select="request_link"/>');
+                               Window1=window.open('<xsl:value-of 
select="request_link"/>');
                        }               
 
                        function template_lookup()
                        {
-                       var oArgs = 
{menuaction:'property.uilookup.order_template',type:'order_template'};
+                               var oArgs = 
{menuaction:'property.uilookup.order_template',type:'order_template'};
+                               var strURL = phpGWLink('index.php', oArgs);
+                               
Window1=window.open(strURL,"Search","width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");
+                       }
 
-                       var strURL = phpGWLink('index.php', oArgs);
-
-                       
Window1=window.open(strURL,"Search","width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");
+                       function response_lookup()
+                       {
+                               var oArgs = 
{menuaction:'property.uilookup.response_template',type:'response_template'};
+                               var strURL = phpGWLink('index.php', oArgs);
+                               
Window1=window.open(strURL,"Search","width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");
                        }
                </script>
                <table cellpadding="2" cellspacing="2" width="95%" 
align="center">
@@ -1092,7 +1098,63 @@
                                        <xsl:call-template name="file_upload"/>
                                </xsl:when>
                        </xsl:choose>
+                       <xsl:choose>
+                               <xsl:when test="send_response = 1">
+                                       <tr>
+                                               <td class="th_text"  
align="left">
+                                                       <xsl:value-of 
select="php:function('lang', 'notify client by sms')" />
+                                               </td>
+                                               <td  align="left">
+                                                       <table>
+                                                               <tr>
+                                                                       <td>
+                                                                               
<input type="checkbox" name="notify_client_by_sms" value="true">
+                                                                               
        <xsl:attribute name="title">
+                                                                               
                <xsl:value-of select="value_sms_client_order_notice"/>
+                                                                               
        </xsl:attribute>
+                                                                               
</input>
+                                                                       </td>
+                                                                       <td>
+                                                                               
<input type="text" name="to_sms_phone" value="{value_sms_phone}">
+                                                                               
        <xsl:attribute name="title">
+                                                                               
                <xsl:value-of select="value_sms_client_order_notice"/>
+                                                                               
        </xsl:attribute>
+                                                                               
</input>
+                                                                       </td>
+                                                               </tr>
+                                                       </table>
+                                               </td>
+                                       </tr>
+                                       <tr>
+                                               <td valign="top">
+                                                       <a 
href="javascript:response_lookup()" >
+                                                               <xsl:attribute 
name="title">
+                                                                       
<xsl:value-of select="php:function('lang', 'response')" />
+                                                                       
</xsl:attribute>
+                                                               <xsl:value-of 
select="php:function('lang', 'response')" />
+                                                       </a>
+                                               </td>
+                                               <td>
+                                                       <textarea 
cols="{textareacols}" rows="{textarearows}" id='response_text' 
name="values[response_text]" onKeyUp="javascript: SmsCountKeyUp(160);" 
onKeyDown="javascript: SmsCountKeyDown(160);" wrap="virtual">
+                                                               <xsl:attribute 
name="title">
+                                                                       
<xsl:value-of select="php:function('lang', 'response')" />
+                                                               </xsl:attribute>
+                                                               <xsl:value-of 
select="value_order_descr"/>
+                                                       </textarea>
+                                               </td>
+                                       </tr>
 
+                                       <tr>
+                                               <td>
+                                                       <xsl:value-of 
select="php:function('lang', 'character left')" />
+                                               </td>
+                                               <td>
+                                                       <input type="text" 
readonly='readonly' size="3" maxlength="3" name="charNumberLeftOutput" 
id="charNumberLeftOutput" value="160">
+                                                       </input>
+                                               </td>
+                                       </tr>
+                               </xsl:when>
+                       </xsl:choose>
                        <xsl:choose>
                                <xsl:when test="access_order = 1">
                                        <xsl:choose>




reply via email to

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