Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fr strings #73

Open
wants to merge 33 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
00141f6
Bugfix: Fix incomplete ledger records
georgmaisser May 24, 2024
6160a22
Version 0.9.3 (2024052101)
eynimeni May 28, 2024
67e41ef
Replace empty placeholder values with 0.00
eynimeni May 28, 2024
b64ba03
Version 0.9.4 (2024052900)
georgmaisser May 29, 2024
04123a0
WIP: UID checker
georgmaisser May 26, 2024
f2ea522
Improvement: Add possibility to delete UID by adding empty records
georgmaisser May 26, 2024
4233569
Improvement: Adding and taking away of uid now working
georgmaisser May 27, 2024
9640b49
added address config to plugin admin settings
whlk Jan 4, 2023
2117be8
added empty address page
whlk Jan 4, 2023
05b32ed
add address selection basics to address page
whlk Jan 4, 2023
b834920
add strings for address form
whlk Jan 25, 2023
9ff2a47
created database tables and fields for addresses
whlk Jan 25, 2023
2f74ad9
added modal form for adding new address
whlk Jan 25, 2023
af8e168
re-render address form after new address was saved
whlk Jan 25, 2023
bf069bd
save newly created address to database
whlk Jan 25, 2023
69c29f0
render list of addresses during checkout
whlk Jan 25, 2023
a154ec3
save selected address to shopping cart cache data
whlk Feb 1, 2023
ddb5656
fetch selected addresses on checkout
whlk Feb 1, 2023
efad1e0
render selected addresses on checkout page
whlk Feb 1, 2023
6c4faad
show selected address on confirmation page
whlk Feb 15, 2023
1c4f241
Write choosen address to history and ledger table
whlk Feb 15, 2023
0a1ae07
cleanup and code style
whlk Feb 15, 2023
3fd32d6
Fix table inclusion
georgmaisser Mar 6, 2023
6f7c76f
fix php warnings
whlk Mar 8, 2023
572fc28
fix lint warnings
whlk Mar 8, 2023
663fa5a
GH-522: Improvement: Address form with taxcategory
WunderJacob May 31, 2024
021616b
GH-522: Improvement: Service period dates
WunderJacob May 31, 2024
433c161
Feature: Add possibility to include subbookings in installment payments.
georgmaisser Jun 2, 2024
7e5760d
Grunt js files
georgmaisser Jun 2, 2024
6e38fb1
Bugfix: Units tests for shopping cart run again.
georgmaisser Jun 2, 2024
61cf1a5
Improvement: use vatnr wording instead of uid
georgmaisser Jun 2, 2024
59cf505
Fix: correct examples for tax user country labels
eynimeni Jun 3, 2024
31fde2f
GH-69 add strings file to lang
eynimeni Jun 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## Version 0.9.3 (2024052101)
* Bugfix: Fix incomplete ledger records.

## Version 0.9.0 (2024052101)
* Bugfixes: Add creation date to ledger.
* Bugfixes: Installment checkbox.
Expand Down
88 changes: 88 additions & 0 deletions address.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Address selection page.
*
* @package local_shopping_cart
* @copyright 2021 Wunderbyte GmbH
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later.
*/

use local_shopping_cart\addresses;
use local_shopping_cart\local\cartstore;
use local_shopping_cart\shopping_cart;

require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
require_once($CFG->dirroot . '/local/shopping_cart/lib.php');

require_login();

$addressesrequired = addresses::get_required_address_keys();
if (empty($addressesrequired)) {
redirect($CFG->wwwroot . '/local/shopping_cart/checkout.php', '', 0);
return;
}

global $USER, $PAGE, $OUTPUT, $CFG;

// Setup the page.
$PAGE->set_context(\context_system::instance());
$PAGE->set_url("{$CFG->wwwroot}/local/shopping_cart/address.php");
$PAGE->set_title(get_string('addresses:pagetitle', 'local_shopping_cart'));
$PAGE->set_heading(get_string('addresses:heading', 'local_shopping_cart'));

// Set the page layout.
$PAGE->set_pagelayout('standard');

$data = addresses::get_template_render_data();
// Handle form submit, when user selected new address(es).
if (isset($_POST['submit'])) {
require_sesskey();
$selectedaddressdbids = [];
// Are all required addresses present?
$alladdressesset = true;
foreach ($data['required_addresses_keys'] as $addreskey) {
$addressdbid = $_POST['selectedaddress_' . $addreskey];
if (isset($addressdbid) && !empty(trim($addressdbid)) && is_numeric($addressdbid)) {
$selectedaddressdbids[$addreskey] = $addressdbid;
} else {
$alladdressesset = false;
}
}

if (!$alladdressesset) {
$data['show_error'] = get_string('addresses:selectionrequired', 'local_shopping_cart');
} else {
$userid = $USER->id;

$cartstore = cartstore::instance($userid);
$cartstore->local_shopping_cart_save_address_in_cache($selectedaddressdbids);

redirect($CFG->wwwroot . '/local/shopping_cart/checkout.php', '', 0);
}
}

// Output the header.
echo $OUTPUT->header();

echo '<form method="post"><input type="hidden" name="sesskey" value="' . sesskey() . '"><div id="addressestemplatespace">';

echo $OUTPUT->render_from_template('local_shopping_cart/address', $data);

echo '</div></form>';
// Now output the footer.
echo $OUTPUT->footer();
8 changes: 8 additions & 0 deletions amd/build/address.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions amd/build/address.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion amd/build/cart.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion amd/build/cart.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion amd/build/cashier.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading