Commit 9eedda0f authored by Jonny Bradley's avatar Jonny Bradley

[MRG] Automatic merge, branches/7.x 35307 to 35337

Conflicts on db/tiki.sql, lib/setup/prefs.php & lib/prefs/payment.php by using trunk versions
Manual fixes for new regime to come
parent 70920572
......@@ -1466,6 +1466,7 @@ installer/schema/20110614_provider_authentication_tiki.sql -text
installer/schema/20110615_structure_alias_tiki.sql -text
installer/schema/20110622_file_from_url_log_tiki.sql -text
installer/schema/20110630_fix_blogs_copyright_frencho_tiki.sql -text
installer/schema/20110713_add_tiki_p_edit_switch_mode_tiki.sql -text
installer/schema/99999999_image_plugins_kill_tiki.php -text
installer/schema/index.php -text
installer/shell.php -text
......@@ -2265,6 +2266,8 @@ lib/notifications/notificationlib.php -text
lib/oauthlib.php -text
lib/objectlib.php -text
lib/ointegratelib.php -text
lib/payment/behavior/cancel_cart_order.php -text
lib/payment/behavior/cart_send_confirm_email.php -text
lib/payment/behavior/execute_datachannel.php -text
lib/payment/behavior/extend_membership.php -text
lib/payment/behavior/index.php -text
......@@ -4527,6 +4530,8 @@ templates/list_file_gallery_content.tpl -text
templates/mail/blogs_send_link.tpl -text
templates/mail/cart_order_received_anon.tpl -text
templates/mail/cart_order_received_anon_subject.tpl -text
templates/mail/cart_order_received_reg.tpl -text
templates/mail/cart_order_received_reg_subject.tpl -text
templates/mail/confirm_newsletter_subscription.tpl -text
templates/mail/confirm_user_email.tpl -text
templates/mail/confirm_user_email_after_approval.tpl -text
......
INSERT INTO `users_permissions` (`permName`, `permDesc`, `level`, `type`, `admin`, `feature_check`) VALUES ('tiki_p_edit_switch_mode', 'Can switch between wiki and WYSIWYG modes while editing', 'editor', 'tiki', NULL, 'feature_wysiwyg');
......@@ -1874,8 +1874,9 @@ function dialogReplaceReplace( area_id ) {
$('.treenode:not(.done)', this)
.addClass('done')
.each(function () {
if ($('ul:first', this).hide().length) {
$(this).prepend('<span class="flipper ui-icon ui-icon-triangle-1-e" style="float: left;"/>');
if ($('ul:first', this).length) {
var dir = $('ul:first', this).css('display') === 'block' ? 's' : 'e';
$(this).prepend('<span class="flipper ui-icon ui-icon-triangle-1-' + dir + '" style="float: left;"/>');
} else {
$(this).prepend('<span style="float:left;width:16px;height:16px;"/>');
}
......@@ -1889,9 +1890,11 @@ function dialogReplaceReplace( area_id ) {
if ('block' === body.css('display')) {
$(this).removeClass('ui-icon-triangle-1-s').addClass('ui-icon-triangle-1-e');
body.hide('fast');
setCookie(body.data("catid"), "", body.data("prefix"));
} else {
$(this).removeClass('ui-icon-triangle-1-e').addClass('ui-icon-triangle-1-s');
body.show('fast');
setCookie(body.data("catid"), "o", body.data("prefix"));
}
});
});
......
<?php
// (c) Copyright 2002-2010 by authors of the Tiki Wiki/CMS/Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id: sample.php 25244 2010-02-16 06:26:12Z changi67 $
function payment_behavior_cancel_cart_order( $items = array() ) {
global $tikilib;
if (!count($items)) {
return false;
}
$mid = " WHERE `itemId` IN (" . implode(",", array_fill(0, count($items), '?') ) . ")";
$query = "UPDATE `tiki_tracker_items` SET `status` = 'c'" . $mid;
$tikilib->query($query, $items);
return true;
}
<?php
// (c) Copyright 2002-2010 by authors of the Tiki Wiki/CMS/Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id: sample.php 25244 2010-02-16 06:26:12Z changi67 $
function payment_behavior_cart_send_confirm_email( $u, $email_template_ids = array() ) {
global $prefs, $smarty, $userlib;
require_once('lib/webmail/tikimaillib.php');
$email = $userlib->get_user_email($u);
if (!$email) return false;
$smarty->assign("email_template_ids", $email_template_ids);
$mail_subject = $smarty->fetch('mail/cart_order_received_reg_subject.tpl');
$mail_data = $smarty->fetch('mail/cart_order_received_reg.tpl');
$mail = new TikiMail();
$mail->setSubject($mail_subject);
if ($mail_data == strip_tags($mail_data)) {
$mail->setText($mail_data);
} else {
$mail->setHtml($mail_data);
}
$mail->setHeader("From", $prefs['sender_email']);
$mail->send($email);
return true;
}
\ No newline at end of file
This diff is collapsed.
......@@ -183,7 +183,90 @@ function prefs_payment_list() {
'description' => tra('Unless with administer payment permissions, a user can only see his own past or cancelled payments'),
'type' => 'flag',
'default' => 'n',
),
),
'payment_cart_inventory' => array(
'name' => tra('Manage product inventory'),
'description' => tra('Activate product inventory feature, needs Products tracker to be set up properly, the itemId must be the product code'),
'type' => 'flag',
'dependencies' => array( 'payment_cart_product_tracker', 'payment_cart_inventory_type_field', 'payment_cart_inventory_total_field', 'payment_cart_inventory_lesshold_field' ),
),
'payment_cart_product_tracker' => array(
'name' => tra('Products Tracker ID'),
'description' => tra('Tracker ID of tracker that is the Products tracker, needed for advanced cart features, the itemId will be the product code'),
'type' => 'text',
'filter' => 'digits',
'size' => 3,
),
'payment_cart_product_tracker_name' => array(
'name' => tra('Products Tracker Name'),
'description' => tra('Name of tracker that is the Products tracker, needed for advanced cart features, the itemId will be the product code'),
'type' => 'text',
),
'payment_cart_inventory_type_field' => array(
'name' => tra('Inventory Type Field ID'),
'description' => tra('Field ID in Products tracker to store the inventory type, the value of the field must be "none" or "internal"'),
'type' => 'text',
'filter' => 'digits',
'size' => 3,
),
'payment_cart_inventory_total_field' => array(
'name' => tra('Inventory Total Field ID'),
'description' => tra('Field ID in Products tracker to store the total inventory of product'),
'type' => 'text',
'filter' => 'digits',
'size' => 3,
),
'payment_cart_inventory_lesshold_field' => array(
'name' => tra('Inventory Total Less Hold Field ID'),
'description' => tra('Field ID in Products tracker to store the total inventory of product less the amount on hold because they are currently in carts'),
'type' => 'text',
'filter' => 'digits',
'size' => 3,
),
'payment_cart_bundles' => array(
'name' => tra('Bundled products feature for cart'),
'description' => tra('Activate bundled products feature, needs Products tracker to be set up properly, the itemId must be the product code'),
'type' => 'flag',
'dependencies' => array( 'payment_cart_product_name_fieldname', 'payment_cart_products_inbundle_fieldname' ),
),
'payment_cart_product_name_fieldname' => array(
'name' => tra('Product Name Field Name'),
'description' => tra('Field Name in Products tracker of the product name that will be used as the label of the product, e.g. in a bundle.'),
'type' => 'text',
),
'payment_cart_products_inbundle_fieldname' => array(
'name' => tra('Items in Bundle Field Name'),
'description' => tra('Field Name in Products tracker of a comma separated list of product IDs of products in the bundle (i.e. if the field contains anything, then this product is a bundle), you can also specify the number of the sub-products, e.g. 23:("colon")2,24 means item 23 (x2) + item 24 (x1)'),
'type' => 'text',
),
'payment_cart_associated_event_fieldname' => array(
'name' => tra('Associated Event ID Field Name'),
'description' => tra('Field Name in Products tracker of the Associated Event ID, needed for the Associated Events cart feature, requires an Events tracker to be setup where the item ID there is the event ID to associate to'),
'type' => 'text',
),
'payment_cart_product_classid_fieldname' => array(
'name' => tra('Product Class ID Field Name'),
'description' => tra('Field Name in Products tracker of the Product Class ID, needed for the Gift Certificates cart feature.'),
'type' => 'text',
),
'payment_cart_orders' => array(
'name' => tra('Record cart orders in trackers'),
'description' => tra('This feature requires 2 trackers, and Orders tracker and an Orders Item tracker to be configured. It also needs profiles to be configured to do the recording.'),
'type' => 'flag',
'dependencies' => array( 'payment_cart_orders_profile', 'payment_cart_orderitems_profile' ),
),
'payment_cart_orders_profile' => array(
'name' => tra('Orders Profile'),
'description' => tra('Wiki page where the profile for creating orders is (page name must be without spaces)'),
'help' => 'Order Profile',
'type' => 'text',
),
'payment_cart_orderitems_profile' => array(
'name' => tra('Order Item Profile'),
'description' => tra('Wiki page where the profile for creating orders items is (page name must be without spaces)'),
'help' => 'Order Item Profile',
'type' => 'text',
),
);
}
......@@ -1261,7 +1261,7 @@ class ToolbarFileGallery extends Toolbar
{
$this->setLabel( tra('Choose or upload images') )
->setIcon( tra('pics/icons/pictures.png') )
->setWysiwygToken( '' ) /* disabling this by default for wysiwyg - make a custom tool with tikiimage as the wysiwyg token to override */
->setWysiwygToken( 'tikiimage' )
->setType('FileGallery')
->addRequiredPreference('feature_filegals_manager');
} // }}}
......@@ -1351,7 +1351,12 @@ JS
function isAccessible() // {{{
{
return parent::isAccessible() && ! isset($_REQUEST['zoom']) && ! isset($_REQUEST['hdr']); // no switch editor if zoom of section edit
global $tiki_p_edit_switch_mode;
return parent::isAccessible() &&
! isset($_REQUEST['zoom']) && // no switch editor if zoom of section edit (dead - remove)
! isset($_REQUEST['hdr']) && // or in section edit
$tiki_p_edit_switch_mode === 'y'; // or no perm (new in 7.1)
} // }}}
/* function getLabel() // {{{
......
......@@ -2336,7 +2336,7 @@ class TrackerLib extends TikiLib
// -------------------------------------
// remove images when needed
$old_field = $this->get_tracker_field($fieldId);
if ($old_field) {
if (!empty($old_field['fieldId'])) {
if( $old_field['type'] == 'i' && $type != 'i' ) {
$this->remove_field_images( $fieldId );
}
......
......@@ -92,7 +92,9 @@ class CatBrowseTreeMaker extends TreeMaker
//
function node_child_start_code($nodeinfo) {
return '<ul class="tree" id="' . $this->itemID . '">';
$style = getCookie($nodeinfo['id'], $this->prefix) !== 'o' ? ' style="display:none"' : '';
return '<ul class="tree" data-catid="' . $nodeinfo['id'] .
'" data-prefix="' . $this->prefix . '"' . $style .'>';
}
//
......
......@@ -118,7 +118,7 @@ function module_categories( $mod_reference, &$module_params ) {
"data" => '<a class="catname" href="'.$url.'">' . htmlspecialchars($cat['name']) . '</a><br />'
);
}
$tm = new CatBrowseTreeMaker("mod_categ");
$tm = new CatBrowseTreeMaker('mod_categ' . $module_params['module_position'] . $module_params['module_ord']);
$res = $tm->make_tree($categId, $tree_nodes);
$smarty->assign('tree', $res);
......
......@@ -235,6 +235,8 @@ function module_search( $mod_reference, $smod_params ) { // modifies $smod_param
$smod_params['input_value'] = $_REQUEST['words'];
} else if (!empty($_REQUEST['find'])) {
$smod_params['input_value'] = $_REQUEST['find'];
} else if (!empty($_REQUEST['filter']['content'])) {
$smod_params['input_value'] = $_REQUEST['filter']['content'];
} else {
$smod_params['input_value'] = '';
}
......
{tr}Your cart order has been received. Please note that orders are not finalized until payment has been made.{/tr}
......@@ -26,7 +26,7 @@
{foreach from=$item.bundledproducts item=child_item}
<tr class="{cycle}">
<td colspan="3">
{tr}Bundled Product{/tr} - {$child_item.description|escape}
{tr}Bundled Product{/tr} - {$child_item.description|escape} {if $child_item.quantity > 1}(x{$child_item.quantity|escape}){/if}
</td>
</tr>
{/foreach}
......
......@@ -5,11 +5,11 @@
{if $smod_params.tiki_search neq 'none'}
<form id="search-module-form{$search_mod_usage_counter}" method="get" action="#"{if $smod_params.use_autocomplete eq 'y'} onsubmit="return submitSearch{$search_mod_usage_counter}()"{/if}>
<div>
<input id="search_mod_input_{$search_mod_usage_counter}" name="find"{if !empty($smod_params.input_size)} style="width:{$smod_params.input_size}em"{/if} type="text" accesskey="s" value="{$smod_params.input_value}" />
<input id="search_mod_input_{$search_mod_usage_counter}" name="{if $smod_params.search_action eq 'tiki-searchindex.php'}filter~content{else}find{/if}"{if !empty($smod_params.input_size)} style="width:{$smod_params.input_size}em"{/if} type="text" accesskey="s" value="{$smod_params.input_value}" />
{if $smod_params.show_object_filter eq 'y'}
{tr}in:{/tr}
<select name="where" style="width:{$smod_params.select_size}em;">
<select name="{if $smod_params.search_action eq 'tiki-searchindex.php'}filter~type{else}where{/if}" style="width:{$smod_params.select_size}em;">
<option value="pages">{tr}Entire Site{/tr}</option>
{if $prefs.feature_wiki eq 'y'}<option value="wikis"{if $smod_params.where eq "wikis"} selected="selected"{/if}>{tr}Wiki Pages{/tr}</option>{/if}
{if $prefs.feature_directory eq 'y'}<option value="directory"{if $smod_params.where eq "directory"} selected="selected"{/if}>{tr}Directory{/tr}</option>{/if}
......@@ -28,7 +28,7 @@
{if $prefs.feature_trackers eq 'y'}<option value="trackers"{if $smod_params.where eq "trackers"} selected="selected"{/if}>{tr}Trackers{/tr}</option>{/if}
</select>
{elseif !empty($prefs.search_default_where)}
<input type="hidden" name="where" value="{$prefs.search_default_where|escape}" />
<input type="hidden" name="{if $smod_params.search_action eq 'tiki-searchindex.php'}filter~type{else}where{/if}" value="{$prefs.search_default_where|escape}" />
{/if}
{if $smod_params.tiki_search neq 'y'}
......
......@@ -65,6 +65,32 @@ if ($.ui) {
}{/jq}
</div>
</fieldset>
<fieldset>
<legend>{tr}Advanced Shopping Cart{/tr}</legend>
{preference name=payment_cart_inventory}
{preference name=payment_cart_bundles}
<fieldset>
<legend>{tr}Products Tracker Setup{/tr}</legend>
{preference name=payment_cart_product_tracker}
{preference name=payment_cart_product_tracker_name}
{preference name=payment_cart_inventory_type_field}
{preference name=payment_cart_inventory_total_field}
{preference name=payment_cart_inventory_lesshold_field}
{preference name=payment_cart_product_name_fieldname}
{preference name=payment_cart_products_inbundle_fieldname}
{preference name=payment_cart_associated_event_fieldname}
{preference name=payment_cart_product_classid_fieldname}
</fieldset>
{preference name=payment_cart_orders}
<div class="adminoptionboxchild" id="payment_cart_orders_childcontainer">
</div>
<fieldset>
<legend>{tr}Orders Tracker Setup{/tr}</legend>
{preference name=payment_cart_orders_profile}
{preference name=payment_cart_orderitems_profile}
</fieldset>
</fieldset>
<fieldset>
<legend>{tr}Shipping{/tr}</legend>
{preference name=shipping_service}
......
......@@ -32,7 +32,7 @@ $hours_minmax = '';
$caladd = array();
$rawcals = $calendarlib->list_calendars();
if ($rawcals['cant'] == 0 && $tiki_p_admin_calendar == 'y') {
$smarty->assign('msg', tra('You need to <a href="tiki-admin_calendars.php">create a calendar</a>'));
$smarty->assign('msg', tra('You need to <a href="tiki-admin_calendars.php?cookietab=2">create a calendar</a>'));
$smarty->display("error.tpl");
die;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment