/*********************************************************************************
 * This file is part of QuickCRM Mobile Full.
 * QuickCRM Mobile Full is a mobile client for Sugar/SuiteCRM
 * 
 * Author : NS-Team (http://www.ns-team.fr)
 * All rights (c) 2011-2021 by NS-Team
 *
 * This Version of the QuickCRM Mobile Full is licensed software and may only be used in 
 * alignment with the License Agreement received with this Software.
 * This Software is copyrighted and may not be further distributed without
 * witten consent of NS-Team
 * 
 * You can contact NS-Team at NS-Team - 55 Chemin de Mervilla - 31320 Auzeville - France
 * or via email at quickcrm@ns-team.fr
 * 
 ********************************************************************************/

Disclaimer:
-----------
The software and documents are distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.

Installation:
-------------
Use Sugar/SuiteCRM Module Loader and install QuickCRM-Mobile-Full

Usage:
------
From your mobile, setup your-crm-url in the iOS, Android and Windows native apps.
You can then login with the same credentials you use for the web based client.

Change Log:
-----------

- 6.6.0 :
  * Support of PDF Templates in SuiteCRM 7.12

- 6.5.7 :
  * Bug with SAML Authentication
  * Emails could not be sent with SuiteCRM < 7.10

- 6.5.6 :
  * Prevent saving and display error message in before_save logic hooks
  * Fix issue with SuiteCRM Store / SugarOutfitters licensing
  * Fix issue with wrong default latitude and longitude
  * Minor bug fixes

- 6.5.5 :
  * Fix QuickCRM general settings validation

- 6.5.4 :
  * Larger fonts in SuiteCRM Report charts
  * Support of SuiteCRM Contracts
  * Bug fix: search by email address
  * Bug fixes for SuiteCRM Reports version 7.1

- 6.5.3 :
  * Fix reset QuickCRM configuration
  * Fix copy home page to users in a role

- 6.5.2 :
  * Fix PHP 7.2 warnings
  * New REST APIs

- 6.5.1 :
  * Fix language issues for SugarCRM CE and old versions of SuiteCRM

- 6.5.0 :
  * Select field for searching by Barcode/QRCode
  * New default detail/edit view

- 6.4.2 :
  * Allow overriding Outbound mail account

- 6.4.1 :
  * Fix Bug with saved searches for non-admin users

- 6.4.0 :
  * Add support for SAML authentication (works with app version 8.1.0 or later)
  * Add your logo on top of the homepage (works with app version 8.1.0 or later)
  * Set WhatsApp parameters (works with app version 8.0.3 or later)
  * Fix Bug with LDAP authentication
  * Fix Bug with shared saved searches

- 6.3.10 :
  * When a module is disabled, related fields to that module are removed from views
  * Allow customization of Authentication class

- 6.3.9 :
  * Minor bug fixes

- 6.3.7 :
  * Fix notice for SuiteCRM Store and SugarOutfitters versions

- 6.3.6 :
  * Fix bug when saving Homepage

- 6.3.5 :
  * Edit Homepage allow making searches private or public
  * Fix bug when copying Homepage to Users

- 6.3.4 :
  * Bug fix (require aor_utils.php should be require_once)

- 6.3.3 :
  * Add capability for server side validation when saving a record
  * Add capability for server side custom edit/delete rights verification when reading a record

- 6.3.2 :
  * Fix issue in HomePage detail and edit views
  * Fix issue with target lists in Offline mode

- 6.3.1 :
  * Retrieve additional translations
  * Faster retrieval of app settings when loading app

- 6.3.0 :
  * Support for automatic Offline mode
  * Basic version users can be disabled if some customizations are important
    (set $sugar_config['quickcrm_DisableBasicVersion']=true;)

- 6.2.5 :
  * Fix issue with license management

- 6.2.4 :
  * Get Subpanels labels from SuiteCRM/Sugar
  * Fix minor issue with Quotes and Invoices

- 6.2.3 :
  * Fix issue with default Popup search filter
  * Campaign Logs can be displayed

- 6.2.2 :
  * Bug fix for subpanels with old versions of SuiteCRM

- 6.2.1 :
  * Bug fix: Employees module could not be displayed

- 6.2.0 :
  * Display all types of SuiteCRM Report Graphs (requires App 6.8 or later)
  * New admin Homepages menu allow copy of a home page definition to all users or all users with a given role
  * Views configuration take into account Displayed modules and Subpanels settings
  * Bug fixes for Emails when users have their own SMTP settings
  * Bug fix for subpanels with SugarCRM CE and SuiteCRM < 7.3.2
  * New translations available for the apps

- 6.1.2 :
  * Log errors when an attachment is not found
  * Bug fix for PHP 7.2

- 6.1.1 :
  * Support of File fields (https://store.suitecrm.com/addons/file-field?tag=ns-team)
  * Improved performances for contacts or email search
  * Improved performances for subpanels display
  * Bug fixes (missing labels for SuiteCRM 7.10, 7.11)

- 6.1.0 :
  * Popup search fields can be defined (require app 6.7 or higher)
  * Bug fixes

- 6.0.3 :
  * Fix issue with PHP 5.3

- 6.0.2 :
  * UX improvements for Views configuration

- 6.0.1 :
  * Bug fix (dynamic dropdown fields)

- 6.0 :
  * Panels can be added in Detail and Edit View
  * Fix Admin page icons in SuiteCRM
  * Fix issue with Case Updates
  * Support of Signature Fields (https://store.suitecrm.com/addons/signature-field-widget?tag=ns-team)
  * Support of signatures in PDF templates
  * Fix issue with send mail attachments
  * New utilities to copy homepages

- 5.4.3 :
  * Support of File custom modules

- 5.4.2 :
  * Bug fix license management

- 5.4.1 :
  * Bug fix for SuiteCRM 7.10.11 or higher

- 5.4.0 :
  * Send Mail in app via CRM server
  * Extensions for JavaScript customizations

- 5.3.4 :
  * Bug fix

- 5.3.3 :
  * Offline sync optimizations
  * Manage reminders
  * Manage $sugar_config['save_query'] 

- 5.3.2 :
  * Filter Users list  

- 5.3.0 :
  * Manage Calls reschedule (SuiteCRM)
  * Show or hide field names in Views configuration
  * Show or hide module icons on app Home Page
  * Limit record creation to Subpanels (for example Opportunities creation could be limited to Accounts or Contacts subpanels)
  * Improved Error messages in app for permission errors
  * Allows new filters for non-required relate or text fields: Is empty/Is not empty  

- 5.2.1 :
  * Get currency digits preferences  
  * filter Modules in Select Modules page
  * New REST API for Documents upload (fix file mime type)
  * Set support email address for app Options/Support menu ($sugar_config['quickcrm_support_email'])
  * Set support menu label for app Options/Support menu ($sugar_config['quickcrm_support_menu'])
  * Log QuickCRM users login in SuiteCRM/Sugar log file (if $sugar_config['quickcrm_log_users'] = true;) 
  * Bug fix: some custom modules were not available for the app

- 5.2.0 :
  * Get Google Maps key from SuiteCRM or $sugar_config (SugarCRM or SuiteCRM < 7.8)
  * Bug fixes  

- 5.1.9 :
  * Fix get_relationships REST API 

- 5.1.8 :
  * New hooks in mobile web version
  * Fix REST API for image/photo fields

- 5.1.7 :
  * Fixes PHP 7.1 issue 
  * Changes in license management (SuiteCRM Store and SugarOutfitters)

- 5.1.6 :
  * Fixes for translations 

- 5.1.5 :
  * Fixes for Trial version 

- 5.1.4 :
  * Added option to display tabs hidden in the CRM 

- 5.1.3 :
  * Manage currencies (require app 6.1.5 or higher)
  * Manage Opportunities probabilities (require app 6.1.5 or higher)
  * Fix bugs with SugarCRM 6.3 and 6.4

- 5.1.2 :
  * Select licensed users by role (QuickCRM Store)
  * Fix PHP notices
  * Bug fix with date/datetime format
  * Bug fix in Detail View when not synced with Edit View
  * Bug fix with labels removed in SuiteCRM 7.9

- 5.1.1 :
  * Fix get_entry_list REST API for Users module

- 5.1 :
  * Improved flexibility on Totals display
  * Support of SuiteCRM Favorites
  * Send Quotes and Invoices by email (iOS)
  * Support precision for float and decimal fields
  * Bug fixes

- 5.0.3 :
  * Bug fixes

- 5.0.2 :
  * Fixed PHP 7.1 warnings
  * Updated REST APIs

- 5.0.1 :
  * Updated REST APIs

- 5.0.0 :
  * Add totals on list views (sum, count or average)
  * Name fields are no longer preset in views and can be replaced
  * List view can be extended with "Emphasized" fields

- 4.9.7 :
  * Fixed issue with installation on PHP 7.1
  * Fixed issue with sort order in lists
  * Fixed issue with one2one relationships

- 4.9.6 :
  * Fixed issue with date format in generated PDFs
  * Fixed issue with time zone in Cases Updates
  * Fixed issue with AOR_Reports on SuiteCRM version 7.5 or higher
  * Fixed issue with AOR_Charts and PHP version 5.4 or higher

- 4.9.5 :
  * Fixed issues with email notifications
  * Extension of REST API for PDF downloads in all modules
  * Fixed issue with Project tasks in global search
  * QuickCRM configuration is now stored in files rather than database

- 4.9.4 :
  * Added fallback authentification mode when SAML is the authentication in Sugar/SuiteCRM
  * Improved support of SugarCRM 6.1
  * Fixed minor issue with SuiteCRM theme SuiteR

- 4.9.3 :
  * Use PDF templates orientation and size added in SuiteCRM 7.8.3

- 4.9.2 :
  * Support of custom modules in global search
  * Bug fix : JJWG sometimes not correctly initialized

- 4.9.1 :
  * Fix bug in REST API for Calls / Meetings notification

- 4.9.0 :
  * Extension of REST API for Quotes/Invoices PDF downloads

- 4.8.1 :
  * General settings has a new option to change Offline Maximum duration
  * Extension of REST API for improved access rights support

- 4.8.0 :
  * Bug fixes (Rows per subpanel)
  * Extension of REST API for improved access rights support

- 4.7.0 :
  * Bug fixes
  * Support for SuiteCRM 7.7

- 4.4 :
  * Support for KReports, SuiteCRM Reports and alineaSol Reports Enterprise
  
- 4.2 :
  * Support for SuiteCRM Charts

- 4.1.3 :
  * Support for SuiteCRM 7.2

- 4.1.0 :
  * Share saved searches
  * Store saved searches and homepage definitions on server
  * Search int, float, currency and relate fields
  * Web app aligned with native app
   
- 3.3.18 :
  * Bug fix in web app
- 3.3.17 :
  * Allow resetting of license key
  * All references to QuickCRM Mobile Pro changed to QuickCRM Mobile Full 
  * Fixed bug with old versions of AOS module 
- 3.3.16 :
  * Security fix
  * Additional options for searching date fields
- 3.3.15 :
  * Bug fixes 
- 3.3.14 :
  * Bug fixes 
- 3.3.13 :
  * Bug fixes 
	- Default fields for employees
	- Calendar did not work in Offline mode
  * Support for multi-day meetings in Calendar
  
- 3.3.12 :
  * Support for iFrame fields (require app 3.7 or later)
  * Support for Employees module (require app 3.7 or later)
  * Support for custom modules based on document (file) template (require app 3.7 or later)
- 3.3.11 :
  * Bug fixes
- 3.3.10 :
  * Display background colors in list views based on Dropdown or boolean fields or "My items" - requires App 3.6.1 or later
  * Search related fields (due to SugarCRM limitations, only related fields stored in the database are supported)
  * Choose if user selection is made with dropdowns or search input (more convenient with a large number of users) - requires App 3.6.1 or later
  * Support custom fields related to Users
- 3.3.9 :
  * Support for SuiteCRM Dynamic DropDown fields
  * New Select All and Deselect All buttons in Users configuration page
- 3.3.7 :
  * Support for future plugins
  * Improved multi-language support
- 3.3.6 :
  * Improved support for Emails module with app 3.5 or later
- 3.3.5 :
  * Some modules not working with QuickCRM apps can no longer be selected
- 3.3.4 :
  * Fix bug in some SugarCRM translations preventing module installation.
  * Support for radioenum fields
- 3.3.0 :
  * Supports Documents Module
  * Customize List Views
- 3.2.4 :
  * Order app module icons from admin settings (Pro version) 
- 3.2 :
  * Clear searches
  * Clear input text fields
  * Supports Nederlands language
  * Support for new features is JJWDesign Google Maps (module selection)
  * Optimizations (Offline sync)
  * Bug fixes
- 3.1 :
  * New Homepage with a "Facebook-like" left panel with Global Search and Last Viewed items
  * Display on a map Contacts/Accounts/... within a given distance from your current location
  * Display on a map Contacts/Accounts/... within a given distance from a given Account/Contact/... (QuickCRM Mobile Full)
  * New Lock button adds a password protection to your data
  * Select interface language
  * Supports Traditional and Simplified Chinese language
- 3.0.4 :
  * Bug Fix : fixed issues with SugarCRM 6.0 and 6.1
  * Bug Fix : creation/update were impossible if search fields were not displayed
- 3.0.3 :
  * Updated Date/Time picker
  * Bug Fix : Close button for Calls and Meetings didn't work on some versions of SugarCRM
  * Bug Fix : Required enum fields were not correctly checked
  * Bug Fix : multienums fields display and edit
- 3.0.2 :
  * Bug Fix : Cases could not be edited
- 3.0.1 :
  * Bug Fix : Offline mode was not available if Opportunities were disabled on the mobile
- 3.0.0 :
  * New : Global search
  * New : Offline mode (iOS and Android apps with Pro Version - SugarCRM version 6.3 or later)
  * New : Modules disabled in user's roles are automatically hidden
- 2.6.2 :
  * Bug Fix : Subpanels were not translated
  * Bug Fix : Dates could not be entered or searched after 2014
  * Bug Fix : Tapping on + buttons in Date Picker scrolled twice on some Android devices
  * Bug Fix : Group users could not be assigned or searched
  * Bug Fix : Notes fields could not be customized
- 2.6.0 :
  * New : Alerts when new data are assigned or own data modified by other users(Native apps and Pro version)
  * Redesigned pages for fields selection (Pro Version)
  * Select and order subpanels (Pro Version)
- 2.5.8 :
  * Bug Fix : \ in fields labels prevented application from loading
  * Bug Fix : Date entered and Date modified were not displayed in Sort order options 
- 2.5.7 :
  * Bug Fix : Links to same module (members, direct reports) were not correctly supported
- 2.5.6 :
  * New : Adds support for Target Lists (Pro version)
- 2.5.5 :
  * New : German Language interface
- 2.5.4 :
  * New : Previous and Next buttons in list are disabled when appropriate
  * Bug fix : Calls placed to Leads are correctly attached
- 2.5.3 :
  * Bug fix : Opportunities could be related to wrong contact
  * Bug fix : Application would not load if enum list were longer than 40000 characters.
- 2.5.2 :
  * Bug fix : Double Quotes could not be used in text fields
- 2.5 :
  * New: Add favorite saved searches to your home page (Pro Version)
  * New: Add create links to your home page (Pro Version)
  * New: Calendar has a new 30 days option (Pro Version)
  * New: Search email fields with today, last month, this month, etc. (Pro Version)
- 2.4 :
  * New: Search date fields with today, last month, this month, etc. (Pro Version)
  * New: Save searches (Pro Version)
  * New: Option to hide empty subpanels
  * New: Option to filter old data in lists and subpanels (Pro Version)
  * Bug fixes
  * Support for upcoming iOS app
- 2.3 :
  * New: Converted contact, account and opportunity links on Leads view
  * New: Customize Home page (a new option allow you to show/hide icons on the home page)
  * New: Manage Custom Modules (Pro Version).
- 2.2 :
  * New: Define sort order for modules in options page.
  * New: Calls and Meetings are available on Home page
  * New: Create button in Search page, List page and All Modules page (Pro Version).
  * New: Date Picker widget.
  * Bug fixes: Time entries on iOS
- 2.1 :
  * New: "Remember Me" checkbox on login page.
  * New: Download link on Notes with attachments (displaying the attachment might require specific software on some devices)
  * New: Calls can be placed directly from any list when the record has phone numbers (Pro version)
  * New: Numeric fields can be used as search criteria (Pro version)
  * New: Upload attachments on Notes if authorized by device (Pro version)
- 2.0.3 :
  * Bug Fix: Options for Calls and Meetings list under Accounts or Contacts were not taken into account
  * New: My Items option in search pages is now saved from one session to another
- 2.0.2 :
  * Bug Fix: Works with MS SQL
  * Bug Fix: Disabled modules do not appear in subpanels
- 2.0.1 :
  * New: Display total number of elements in list view (SugarCRM 6.5 and later)
  * Bug Fix: Next and previous buttons in list views
- 2.0 :
  * New: Interface with a toolbar for quick access to main functions
  * New: All Modules page allowing search of Meetings and Calls
  * New: Support for Cases, Projects and Project Tasks
  * New: Admin interface for selection of displayed fields and search criteria
  * New: Support for multienum fields
  * New: Delete function
- 1.6.0 :
  * New Log Call function creates a call when calling a contact, lead or account (depending on user option)
  * New SMS button on mobile phone of contacts and leads
  * New create/edit tasks and notes
  * Bug fix: State could not be edited
  * Bug fix: Support multiple lines when editing text areas (street, description, ...)
- 1.5.0 :
  * New "Last Viewed" function
  * Customizable number of elements displayed in lists
  * Options are memorized
  * Authorized mobile users can be defined in the admin section of SugarCRM
- 1.4.3 :
  * Implementation of Accounts/Leads links
- 1.4.2 :
  * Bug fix : Date/time of meetings and calls were incorrectly displayed
- 1.4.0 :
  * Add support for boolean fields in edit and search forms
- 1.3.5 :
  * Bug fix : Improved Time Zone support for some browsers
  * Bug fix : Application could hang after login if $site_url variable was not correctly defined in config.php 
- 1.3.4 :
  * Bug fix : SugarCRM >= 6.1 : When creating new calls and meetings, user was not in the invitees list  
  * Bug fix : Could not erase date or time fields in edit forms
  * Bug fix : missing translation for tasks
  * Bug fix : missing field names for enum fields in edit forms
  * Optimizations and improved browser support thanks to jQueryMobile 1.1 
- 1.3.3 :
  * User name is memorized 
- 1.3.2 :
  * Bug fix : Datetime display and edit in spanish version
- 1.3.1 :
  * Bug fix : List of Leads was not displayed when Leads had no account
- 1.3 :
   * Custom Search fields in Accounts, Contacts, Opportunities, Tasks and Leads.
     Any field of type text, date or enum can be used in search criteria
   * Search by "My Items" (CE version)
   * Bug fix : Account country current value was not displayed in Edit form
   * Bug fix : date or datetimes could not be entered properly on some browsers
- 1.2 :
   * Optimizations and improved browser support thanks to jQueryMobile 1.0.1
- 1.1 :
   * New features : Tasks, Opportunities, Calendar
   * Added spanish support (thanks to Mediterranean Consulting)
   * Fix bugs when SugarCRM default language is not english or french
- 1.01 :
   * Fix bugs with SugarCRM 6.2 and 6.3
   * Fix bug when searching contacts or leads with empty first name or last name
