/**
 * Copyright (c) 2018 EXTREME IDEA LLC https://www.extreme-idea.com
 * This software is the proprietary information of EXTREME IDEA LLC.
 *
 * All Rights Reserved.
 * Modification, redistribution and use in source and binary forms, with or without modification
 * are not permitted without prior written approval by the copyright holder.
 *
 */

$(document).ready(function () {
    $("#wqasi-form").alpaca({
        "view": "bootstrap-create",
        "schema": {
            "type": "object",
            "properties": {
                "files": {
                    "type": "array",
                    "title": "Files",
                    "required": true
                }
            }
        },
        "options": {
            "fields": {
                "files": {
                    "type": "upload",
                    "multiple": true,
                    "maxFileSize": 25000000,
                    "maxNumberOfFiles": 3,
                    "fileTypes": "(\.|\/)(gif|jpe?g|png)$",
                    "upload": {
                        "url": "http://www.alpacajs.org/fileupload/index.php"
                    },
                    "name": "files"
                }
            },
            "focus": true,
            "form": {
                "attributes": {
                    "method": "POST",
                    "action": "http://www.alpacajs.org/php/echo.php",
                    "enctype": "multipart/form-data"
                },
                "buttons": {
                    "submit": {
                        "value": "Submit"
                    }
                }
            }
        }
    });
});
