CMS MADE SIMPLE FORGE

Availability

 

[#9306] Making reservations from the backend is not possible

avatar
Created By: Jan van Leeuwen (janvl)
Date Submitted: Sun Jun 09 10:57:49 -0400 2013

Assigned To: Robert Campbell (calguy1000)
Version: 1.8.1
CMSMS Version: 1.11.5
Severity: Critical
Resolution: None
State: Open
Summary:
Making reservations from the backend is not possible
Detailed Description:
After adding the missing table by hand based on the data from the install file,
the module is working.

Only making reservations from the backend does not work.


You can insert the frontend-user, price,  the start-date, the end-date the
resource(room) some text in the editor-area
When you click "Check" the form is emptied an no reservation is made.

I tried to find an error-log, nothing is found.
I started in debugmode but no clear error appears.

ps this is CMSMS 1.11.7

If more information is needed let me know, it is a test-installation pm me if
you need to enter as admin
The link is www.stajl.org

Kind regards,
Jan


History

Comments
avatar
Date: 2014-07-17 07:23
Posted By: denlab (denlab)

Hello, I have the same problem. NOT complete solution is:

1. first to change two lines in templates/admin_edit_resvn.php

line 271
-      jQuery('#sel_btn_check').click(function() {
+     jQuery('#sel_btn_check').live('click', function() {

line 371
 -     jQuery('#sel_btn_add').click(function() {
+     jQuery('#sel_btn_add').live('click', function(e) {
+     e.preventDefault();

2. But now we see second issue in console.Log:
Uncaught TypeError: Cannot read property 'LC_TIME' of undefined in
/lib/php_js.js on line 142

And at this moment I don't know, how to fix it.


Denlab
      
avatar
Date: 2014-07-17 08:05
Posted By: denlab (denlab)

Part 2.

A second problem was in browser locale, which is diffent from used in php_js.js
library (this library implements some php functions in javascript: strftime()
and so one).

In my case, browser locale was "ru", but there is no "ru" locale in
"phpjs.locales" object.


All I need to do, is to add this locale in that object and set it's properties:

- First, re-format  the php_js.js minified file (I used Eclipse CTRL+SHIFT+F
keys, but there is also some web-services, you liked).

- Second, add code below line 520 (I just copy fn locale initialization, and
then change the month and day names. You may need to set up additional params,
according with your locale, but maybe you dont need this really):

		phpjs.locales.ru = _copy(phpjs.locales.en);
		phpjs.locales.ru.LC_TIME.a = [ 'вс', 'пн', 'вт', 'ср', 'чт',
				'пт', 'сб' ];
phpjs.locales.ru.LC_TIME.A = [ 'воскресенье', 'понедельник', 'вторник',
				'среда', 'четверг', 'пятница', 'суббота' ];
phpjs.locales.ru.LC_TIME.b = [ 'янв', 'февр', 'мар', 'апр', 'май',
				'июн', 'июл', 'авг', 'сен', 'окт', 'ноя', 'дек' ];
phpjs.locales.ru.LC_TIME.B = [ 'январь', 'февраль', 'март', 'апрель',
'мая', 'июнь', 'июль', 'август', 'сентябрь', 'октябрь',
				'ноябрь', 'декабрь' ];
		phpjs.locales.ru.LC_TIME.c = '%a %d %b %Y %T %Z';
		phpjs.locales.ru.LC_TIME.p = [ '', '' ];
		phpjs.locales.ru.LC_TIME.P = [ '', '' ];
		phpjs.locales.ru.LC_TIME.x = '%d.%m.%Y';
		phpjs.locales.ru.LC_TIME.X = '%T';


After all this I can add and delete reserv items on "create reservation" page.
But I got another bug - can not edit reserv items, there is another error:
"Uncaught Error: Syntax error, unrecognized expression: :checkbox: " =)


Denlab