Commit Graph

426 Commits

Author SHA1 Message Date
ralf
71d079c9f3 only send password (or hash) to client-side, if explicitly requested 2022-02-25 13:53:03 +02:00
ralf
e3113455cc taking modification time of api/etemplate.php script into account too for .xet cache-buster 2022-02-16 20:14:38 +02:00
nathan
8203eb3efd Use flatpickr for date widget calendar 2022-02-15 11:51:23 -07:00
Ralf Becker
f23a800f83 add missing $relpath 2022-02-03 15:39:33 +02:00
Ralf Becker
10d61dd4c7 extract data-preparation from Etemplate\Widget\Vfs::beforeSendToClient() to use it to send the data to client-side in an AJAX call 2022-02-03 15:33:10 +02:00
nathan
ccfcf2a086 Add a hook for before get_rows is called 2021-12-16 14:43:33 -07:00
nathan
d69d57e6e9 Merge branch 'master' into web-components 2021-12-06 10:52:10 -07:00
Hadi Nategh
c115e762b1 Add underline button into html editor's toolbar 2021-12-06 10:14:37 +01:00
nathan
d126834468 * Etemplate: Add link icon overlay to link list 2021-12-03 14:28:54 -07:00
nathan
98882c3159 Replace hyphen in utf-8 2021-12-03 14:28:54 -07:00
nathan
41c2f0c92b Api: Force merge placeholder charset to UTF-8, avoids mangled accent characters 2021-12-03 14:28:54 -07:00
nathan
5af7d0f644 * Etemplate: Add link icon overlay to link list 2021-12-03 14:18:48 -07:00
nathan
0e5e2f3ceb Replace hyphen in utf-8 2021-12-03 11:37:47 -07:00
nathan
2453bafbe9 Api: Force merge placeholder charset to UTF-8, avoids mangled accent characters 2021-12-03 11:36:02 -07:00
nathan
2545c8fde1 Merge branch 'master' into web-components 2021-12-01 15:31:45 -07:00
Ralf Becker
c688315141 fix syntax error under PHP 7.3
7.3 is still the minimum requirement for 21.1
2021-12-01 19:59:41 +02:00
Ralf Becker
cbb72e06d9 fix / work around PHP 8.0 Error Call to undefined method EGroupware\Api\Etemplate\Widget\Vfs::set_attrs() 2021-11-24 20:57:45 +01:00
nathan
b91e1d8a5f Merge branch 'master' into web-components 2021-11-18 10:28:30 -07:00
Ralf Becker
dfb1a3be22 fix PHP 8.0 TypeError: Cannot access offset of type string on string 2021-11-15 16:01:11 +01:00
Ralf Becker
8063b9a8ef fix PHP 8.0 TypeError: array_merge(): Argument #1 must be of type array, null given 2021-11-13 17:18:21 +01:00
Ralf Becker
392a27b77c try fixing an other case where an unrelated XML error was reported
Error passing XML file '<text type="text" id="#Kunde_Firma"/>' line 12: EndTag: '</' not found
There is obviously no line 12 ;)
2021-11-11 09:49:31 +01:00
nathan
ed66beaf8f Merge branch 'master' into web-components 2021-11-10 10:25:51 -07:00
Ralf Becker
577ff9dd26 fix unrelated XML errors sometimes shown parsing eTemplates 2021-11-10 13:55:48 +01:00
Ralf Becker
c1dfa685ec fix PHP 8.0 TypeError: array_merge(): Argument #2 must be of type array, null given 2021-11-10 12:47:05 +01:00
nathan
e03b8bbdc9 Merge branch 'master' into web-components 2021-11-05 11:08:31 -06:00
Ralf Becker
9fbd07e335 fix PHP 8.0 TypeError: Unsupported operand types: null + array 2021-11-05 14:49:56 +01:00
nathan
672ed0aa0e - DateTime widget to handle dates with times
- Time & Date+time parser & formatter functions
- Date widget does not return a time
2021-11-03 09:05:16 -06:00
nathan
76d7447dab Merge branch 'master' into web-components 2021-11-01 09:37:26 -06:00
nathan
be6146661d Api: Fix check of disabled attribute was misbehaving if the value was null or 0
This showed up when validating tracker config, some rows were disabled with disabled="@tracker".  When tracker=0, they did not return their value.
2021-10-28 14:02:13 -06:00
Ralf Becker
b1af39be37 fix big chunk of PHP 8.0 warnings 2021-10-21 10:39:57 +02:00
Ralf Becker
f6d756a0c1 closing/commiting the session to speed up calendar loading 2021-10-20 13:53:41 +02:00
nathan
fbbc466c78 Merge branch 'master' into web-components 2021-10-18 10:56:05 -06:00
nathan
965e100082 Fix expansion broken in ddddc5ba05
Caused export field checkboxes in new definition to not keep their value
2021-10-13 15:08:16 -06:00
nathan
918d91eb9b Fix ReflectionParameter::isArray() was deprecated as of PHP 8.0.0 2021-10-13 10:52:56 -06:00
Ralf Becker
f29a2b5ea8 fix PHP Warning: Illegal string offset 'tmp_name' 2021-10-11 14:02:46 +02:00
Ralf Becker
fac81f660d fix PHP 8.0 errors around ACL dialog and policy:
- bitwise AND operator gives TypeError if both values are neither a number nor a numeric string, eg: null, "run"
- Etemplate::setElementAttribute() must NOT be called before instantiating an Etemplate object, you will get fatal error otherwise, because no request object
2021-10-08 09:05:58 +02:00
nathan
c73a7beac8 Add placeholder list for calendar & filemanager 2021-10-07 13:47:14 -06:00
Ralf Becker
417bbccbe3 fix PHP 8.0 Fatal error: Declaration of Api\Etemplate\Request\Session::read($id = null) must be compatible with Api\Etemplate\Request::read($id = null, $handle_not_found = true) 2021-10-07 18:39:40 +02:00
Ralf Becker
460d8cbe0d fix not working preferences GUI after ddddc5ba05 2021-10-07 17:28:06 +02:00
Ralf Becker
e4f95d9c20 fix missing icons after previous commit 2021-10-07 11:57:20 +02:00
Ralf Becker
91bd7c7aeb an other chunk of fixed PHP 8.0 Warnings 2021-10-07 10:14:43 +02:00
nathan
02dce82010 Merge branch 'master' into web-components 2021-10-06 14:02:22 -06:00
nathan
a0a89a6b74 Placeholder dialog: Add placeholders for projectmanager, timesheet, tracker 2021-10-05 16:09:39 -06:00
Ralf Becker
ddddc5ba05 next big chunk of fixed PHP 8.0 Warnings 2021-10-05 14:11:11 +02:00
Ralf Becker
357fefaad0 fixing some conditions in the previous commit stalling InfoLog list 2021-10-05 11:14:40 +02:00
Ralf Becker
1747a2236a fixing a ton of PHP Warnings slowing us down in PHP 8.0 2021-10-04 18:50:51 +02:00
nathan
96bdcd7c0e Fix some placeholder dialog bugs:
- Fix user placeholder does not use selected entry, so looks like a bug.  Now hiding entry for user placeholders.
- Fix user & general showed up in entry app selectbox
- Fix insert address dialog was not passing selected entry
2021-10-01 13:35:27 -06:00
nathan
7f930a6221 Placeholder dialog: Support for other apps, starting with Infolog 2021-09-27 14:46:41 -06:00
nathan
eb57294146 Placeholder dialog: Allow & show general fields 2021-09-27 11:09:38 -06:00
nathan
25773a929f Merge remote-tracking branch 'origin/master' into web-components 2021-09-23 10:22:18 -06:00
nathan
704b6c6dc2 Add user placeholders into placeholder dialog 2021-09-22 11:15:49 -06:00
nathan
8e67e2efad WIP on placeholders
- Some TS cleanup
- Fix error in preview giving wrong results
2021-09-21 10:19:24 -06:00
nathan
29bd739955 W.I.P on collabora placeholder insert 2021-09-20 15:34:55 -06:00
Ralf Becker
582793d52b Revert "Bring web-component work into master branch"
To many things are not working :(
- addressbook, infolog, even timesheet index lacks at least r/o textbox and problably other widgets
- smallPART (with many extra widgets) is completly unusable
- *box widget seems not to skip empty boxes
--> we need more testing and progress, before we can merge that

This reverts commit 9cee681b94.
2021-09-03 11:28:22 +02:00
Ralf Becker
ef1239b017 fix URL if custom template from VFS is used 2021-09-03 11:02:06 +02:00
nathan
9cee681b94 Bring web-component work into master branch 2021-09-02 10:52:10 -06:00
nathan
538e483499 Merge branch 'master' into web-components 2021-08-23 15:41:27 -06:00
nathan
e34ca22499 Split textarea off from textbox & start implementing
Splitting the two made things a lot simpler to deal with
2021-08-20 15:52:22 -06:00
Ralf Becker
6baf07090e implement some missing features from old eTemplate:
- evaluate class set on a grid cell as done for the widget contained (probably more a bug-fix then a feature)
- allow to preset query for link-entry widget by passing an object with a query attribute
- allow to overwrite not only $readonlys[__ALL__] but also widget readonly attribute with a $readonlys value of false
2021-08-19 10:46:34 +02:00
Ralf Becker
d060d98fad modify eTemplates server-side to add et2- prefix for widgets converted to web-components
- uses a regular expression to identify the widgets already converted (using XML parsing is slower and more complicated)
- replaces automatic old <menulist...><menupopup type="select-*"/></menulist> with <select type="select-*" .../> to not build support for that into web-component code
- currently only box and button are converted, as converting v/hbox gives a JavaScript error with nextmatch headers (seems a problem with the children)
- caching is currently also disabled, as you would need to clear the filesystem-cache, when you modify the list of supported widgets (browser cache needs to be cleared!)
2021-08-15 14:59:23 +02:00
nathan
4f225054f8 WIP on Date widget
Something's not right with the parser/formatter, they're not getting called.

Times not handled yet
2021-08-13 15:26:18 -06:00
nathan
5fee9fcafe Make et2-textbox as a WebComponent
Not all attributes are handled yet, but value cycle is working
2021-07-22 14:54:10 -06:00
nathan
723ec70009 Get button to validate server-side 2021-07-15 10:12:47 -06:00
Hadi Nategh
a4f21bc804 Fix 404 errors caused by none existing html editor icons 2021-06-15 12:11:43 +02:00
nathangray
6ef766edf0 Etemplate: Better error message for parse errors in xml strings (not files)
This happens in things like Transformer, where we generate some XML for parsing

(cherry picked from commit 7cf7c5a638)
2021-06-11 13:17:55 -06:00
Ralf Becker
39ad3a7977 port csv-export from old eTemplate nextmatch to separate Api\Etemplate\Export class to not have to rely on old eTemplate 2021-05-23 08:58:47 +02:00
nathangray
5fbdd1376a Fix PHP warnings for PHP 8 compatability 2021-05-21 10:43:52 -06:00
nathangray
51f9177634 Try harder for nextmatch template name so it can be passed to hooks. If it can't be found in value, look in original attributes. 2021-04-19 10:42:48 -06:00
Ralf Becker
fb30713cbb fix not working load_via parameter 2021-04-18 21:07:38 +02:00
Ralf Becker
e03b1aeb16 fix PHP 8 error: key() Argument #1 must be of type array, null given 2021-04-07 13:12:32 +02:00
Ralf Becker
4045c06896 fix PHP 8 errors 2021-04-06 15:32:21 +02:00
Ralf Becker
fed41622c2 fixing all sorts of PHP 8 errors and PHPStorm errors 2021-03-31 17:50:01 +02:00
Ralf Becker
79040d1524 disable warnings under PHP 8 for now, as the hide fatal errors and log errors in xet files 2021-03-31 11:30:34 +02:00
Ralf Becker
868135775c PHP 8 fixes 2021-03-29 16:47:19 +02:00
Ralf Becker
ab9c089f70 fix PHP 8 Fatal error Array and string offset access syntax with curly braces is no longer supported 2021-03-21 21:13:07 +01:00
Ralf Becker
e54aebebca xml tags must not include undeclared namespaces like: <link-entry:infolog
Reinstating "throw an exception on XML errors in eTemplates for easier fixing"

This reverts commit 18b7d9311c.
2021-02-16 21:52:40 +02:00
nathangray
18b7d9311c Revert "throw an exception on XML errors in eTemplates for easier fixing"
This reverts commit 81b4737710.
2021-02-16 11:39:38 -07:00
Ralf Becker
81b4737710 throw an exception on XML errors in eTemplates for easier fixing 2021-02-16 17:38:47 +02:00
nathangray
98d5e86121 Avoid some warnings 2021-02-05 08:57:48 -07:00
Ralf Becker
04f4a327c2 implement date-duration select_unit="false" to show durations like "0:01:20" 2021-02-05 15:57:59 +02:00
nathangray
be9fcea5c5 Etemplate: Make sure all attributes get expanded 2021-02-04 14:48:22 -07:00
Ralf Becker
15c72f284f change client-side to only deal with a duration converted server-side from an end-datetime or a duration like "+123seconds" 2021-01-28 19:53:14 +02:00
Ralf Becker
5b4a436ab3 countdown: convert datetime server-side into a duration to avoid problems with wrong time or timezone on client 2021-01-28 16:02:38 +02:00
Ralf Becker
69b33e9288 make countdown a value-widget to get automatic timezone handling by date widgets beforeSendToClient method 2021-01-28 12:08:29 +02:00
Ralf Becker
1259ae8d04 More automatic timezone handling schema for new code (hopefully not breaking existing code):
1. SO converts all timestamps to Api\DateTime objects using Api\DateTime::server2user($ts, 'object')
 - Api\Storage and Api\Storage\Base class do that automatic if using 'object' as $timestamp_type constructor parameter
 - if using just Api\Db you need to iterate over your selects manually and apply Api\DateTime::server2user($ts, 'object')
 - timestamps are store in DB in server timezone and above conversation honors that and additionally set the user TZ
2. Rest of the app should keep all timestamps as Api\DateTime objects
 - direct comparison works for Api\DateTime (and PHP \DateTime) as __toString() method automatic converts to UTC timestamps
 - do NOT convert them to timezone-less timestamps and no further timezone conversation needed for output with eTemplate
3. eTemplate2 converts automatic to user timezone for displaying dates and times
 - you need to use <date-time ... data_format="object"/> to get Api\DateTime objects back from eTemplate!
4. Api\Db converts automatic to server timezone when quoting DateTime objects for integer or timestamp columns
5. only output other then eTemplate might need to set a timezone different from the user TZ before calling $ts->format()
2021-01-26 11:16:42 +02:00
Ralf Becker
8425f380fe some fixes for int/float widget: server-side was not expanding min/max attribute and client-side considers empty min/max attr as 0 2021-01-22 17:24:55 +02:00
Ralf Becker
fe320938e5 document EGroupware timestamps and remove own __toString() method to be able to compare objects 2021-01-22 15:18:39 +02:00
nathangray
0a95588642 Preference needs this to not get changed here, otherwise validation doesn't find what it needs 2020-12-22 11:54:31 -07:00
nathangray
6af3e37bed * Etemplate: Add context menu action on linked files to copy them somewhere else
Also, update vfsSelect to use request(), so it processes the additional stuff in response so we can have a success message.
2020-12-21 13:53:24 -07:00
nathangray
93b64235a2 Etemplate: Fix customfield prefix attribute length assumption 2020-12-17 10:07:50 -07:00
nathangray
8910983c8e Etemplate: Fix for some attributes not getting set 2020-12-17 09:17:38 -07:00
Hadi Nategh
cde6c10e05 Add Segoe font family into HTMLEditor 2020-12-09 13:17:37 +01:00
Hadi Nategh
c8020e6456 Do not query server if there's no actual taglist query, fix fatal error "Memory exhaustion" 2020-12-07 10:58:42 +01:00
nathangray
15084c8439 Etemplate: Use the actual template attribute if set for action processing, instead of always using the deprecated options attribute 2020-11-12 14:41:23 -07:00
nathangray
0fcfad04b4 Etemplate: Match server-side grid row namespacing to client-side
Client side does not open a new data perspective if row has an ID, server now doesn't to match.  Fixes grids with row IDs lost their data on submit.
2020-11-05 13:41:36 -07:00
nathangray
10b98897d2 Etemplate: Fix sub-templates not expanded and children not processed if id is set but does not expand 2020-11-04 16:10:09 -07:00
nathangray
b3ed6372f7 Etemplate: Fix unwanted row reset if box had no ID 2020-11-04 12:53:29 -07:00
nathangray
1eae5d3780 Etemplate: Fix for Box not properly handling namespaces, now working for submit too 2020-10-28 09:51:55 -06:00
nathangray
5566a9d971 Etemplate: Fix for Box not properly handling namespaces 2020-10-27 10:29:46 -06:00
Ralf Becker
3292e478b6 creating a new dir from filemanager-select dialog always gave an error 2020-10-19 13:00:05 +02:00
Hadi Nategh
43600426c7 * Api: Add table button into html editor's toolbar 2020-10-14 11:05:51 +02:00
nathangray
05ee7eba37 Avoid some 'array_key_exists() expects parameter 2 to be array' warnings by checking first 2020-10-13 15:20:33 -06:00
Hadi Nategh
acbd23a60a * Mail: Add custom html toolbar settings in mail site-configuration in order to be able to add/remove certain actions only for mail-compose dialog. 2020-09-25 14:17:29 +02:00
nathangray
32b061919f Etemplate: Change default for password widget suggest to off
Customfields still default to on
2020-07-21 15:36:45 -06:00
nathangray
4c7709d49f Etemplate: Get vfsUpload values to use expose so they work like links 2020-07-03 14:23:41 -06:00
nathangray
ee498f703d Etemplate: Fix password widget could not be cleared entirely 2020-07-03 09:25:51 -06:00
Hadi Nategh
b95e9be02a Cleanup widget browser 2020-06-18 14:58:24 +02:00
nathangray
b56a8f9901 Default password customfield plaintext attribute to false 2020-06-16 09:23:54 -06:00
Ralf Becker
2c489ef5b8 change default for password attribute plaintext back to true, to not break every existing usage of that widget 2020-06-16 08:37:51 +02:00
nathangray
d7d5837ecf Nicer password widget on account edit dialog
- Added plain-text attribute to avoid encrypting password
- Suggest password now fills both fields the same
2020-06-15 16:08:24 -06:00
nathangray
aab5415873 * Etemplate: Password widget improvements - suggest password button, added as custom field type (stored encrypted) 2020-06-12 10:56:53 -06:00
nathangray
a993938134 Etemplate: Fix VFS & file widgets were not properly handling files 2020-06-10 10:20:30 -06:00
Ralf Becker
1ea45e6591 Mime-Type check can only work for the first chunk, further ones will always fail 2020-06-02 13:46:46 +02:00
Hadi Nategh
8d022c5908 do not try to push notifications for api.queue requests 2020-05-22 10:16:59 +02:00
Ralf Becker
ab20dbb70c * Mail: automatic remove some invisible Unicode chars breaking email addresses: zero width space, variation selectors 2020-04-30 10:16:24 +02:00
nathangray
6664aea901 Etemplate: Register time_or_date widget, fixes wrong timestamps in mobile template mail list 2020-04-01 15:03:58 -04:00
Hadi Nategh
faca76f6a9 Do not run restrict validation check for type taglist-account if free entries are allowed 2020-01-31 16:13:45 +01:00
Ralf Becker
d95894d530 use etemplate-exec-id as CSRF token for ajax requests 2020-01-29 11:08:44 +01:00
nathangray
121d5f82ef Etemplate: Fix taglist-account would reject most values 2019-10-11 11:55:10 -06:00
nathangray
084d2f7ac7 Etemplate: Expand VFS path attribute, if present 2019-09-27 13:40:24 -06:00
nathangray
1131d07199 Revert "Etemplate - avoid error if child is not a widget", it causes other random breaking
This reverts commit 1f63996a2c.
2019-08-02 11:08:14 -06:00
nathangray
1f63996a2c Etemplate - avoid error if child is not a widget
though it never should be...
2019-08-02 10:33:38 -06:00
nathangray
6f7c939d8b Etemplate - avoid warning from method_exists if method is a callable 2019-07-11 11:25:30 -06:00
Ralf Becker
b6bbe8c681 trying to fix not working HtmlArea / TinyMCE in 19.1
seems it's caused by - for what ever reason - caching the wrong class for "htmlarea" widget
2019-07-08 10:09:01 +02:00
nathangray
9daa2fe8b6 Etemplate - add new attributes to URL widget
allow_path: Allow a path instead of a URL, must start with /
	trailing_slash: Require or forbid that the URL ends with /
2019-05-10 14:53:00 -06:00
nathangray
a4a4a32d7b If there's a failure storing uploaded file, make sure to show it 2019-04-29 16:03:34 -06:00
nathangray
7e51edf39d Etemplate - contact widget: Fix sometimes missing n_fn 2019-04-24 14:28:40 -06:00
nathangray
eeab4ebe31 Use expanded form name to look up path from widget ID 2019-04-23 14:47:52 -06:00
nathangray
ff120e64da Add some defaults to select-bitwise if no app is specified 2019-04-09 11:45:14 -06:00
nathangray
7f6088490a Etemplate - Fix some Scrutinizer warnings 2019-03-20 14:37:39 -06:00
nathangray
ec98f00ff1 Add missing break statements 2019-03-20 10:31:32 -06:00
nathangray
006f8c1823 Remove unused variable 2019-03-19 14:52:46 -06:00
nathangray
6af45ef40a Add select-bitwise selectbox type 2019-03-19 14:31:33 -06:00
Ralf Becker
fa8ee606b3 WIP admin history: using eTemplate tree instead of regexp to parse labels and selectbox values 2019-03-19 15:34:44 +01:00
Ralf Becker
fd662a266b fix different attribute-name on server- and client-side: data_format
has to be changed in customfields too
2019-03-18 16:04:45 +01:00
Ralf Becker
58b617907a fix different attribute-name on server- and client-side: data_format 2019-03-12 20:35:46 +01:00
Ralf Becker
21962bdfe4 WIP admin history 2019-03-12 17:13:36 +01:00
Ralf Becker
e1476e4167 Merge pull request #57 from asig2016/add_class_to_dropdown
select-cat widget: add different class per level to allow different …
2019-03-12 17:01:40 +01:00
Hadi Nategh
09e90b1235 Take ascii mode into account before purifying the value 2019-02-28 11:47:53 +01:00
nathangray
f71b9ba093 Etemplate - fix using date widget min/max attributes made it required, even if not set as such 2019-02-26 13:49:50 -07:00
Hadi Nategh
781700ea6d Better approach to query existing contacts 2019-02-18 14:04:53 +01:00
Hadi Nategh
3a51767b67 Try to narrow down search criteria to only email and email_home columns 2019-02-18 12:23:30 +01:00
Hadi Nategh
c5c09c4f9f Deprecate CKEDITOR and remove it from source 2019-01-25 12:41:13 +01:00
Hadi Nategh
8b661df737 Remember recently used folders in vfs select 2019-01-14 17:43:43 +01:00
Ralf Becker
86ec8ee17d fix TypeError: Argument 6 passed to Nextmatch::call_get_rows() must be an instance of Etemplate\Widget or null
fix calendar edit gives an error when using [Save] button in list-view
2019-01-07 18:13:08 +01:00
Hadi Nategh
4d8a55fb17 Handle VFS full path when generating VFS select contents 2019-01-07 15:05:56 +01:00
nathangray
41b95af046 Commit session right after we get rows from app 2018-12-20 10:03:12 -07:00
nicorac
a33665e373 Removed source file with clashing filename and a typo in contained class name 2018-12-20 10:00:03 +01:00
Nathan Gray
d40a282f0d
Merge pull request #47 from neomorina/patch-5
Update Taglist.php
2018-12-19 10:04:40 -07:00
nathangray
19ead4c1cc Fix some more PHP 7.2 warnings
Remove some calls to deprecated each()
2018-12-18 09:49:29 -07:00