AAAA.htaccess000066600000000177151374251520006360 0ustar00 Order allow,deny Deny from all multi_upload/.htaccess000066600000000177151374251520011056 0ustar00 Order allow,deny Deny from all multi_upload/index.html000066600000000000151374251520011236 0ustar00multi_upload/input_multi_upload.php000066600000001530151374251520013700 0ustar00 'Attachments', 'input_name' => 'attachments_{n}[]', 'hide_label' => '0', 'label_over' => '0', 'validations' => '', 'instructions' => '', 'tooltip' => '', 'container_id' => 0, 'data_path' => '', 'data_path_name' => '', 'data_path_original_name' => '', 'data_path_id' => '', 'limit' => 3, ); } return array('element_params' => $element_params); } } ?>multi_upload/images/.htaccess000066600000000177151374251520012323 0ustar00 Order allow,deny Deny from all multi_upload/images/delete.png000066600000001724151374251520012474 0ustar00PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<fIDATxLS[hU\fKL7-}jmGQPXl41TzQZAeK%AJ*""HSR4kfomsN߸f 4a&(In08{UGe2m(@$p f魫_;!P8̓t7]lW* Ta td K&aYZ6 _}F@)纈RskPFHO!„>|g$FyX?~?Ig\>otf9>N끏Xn9SHtra }t ;PcyX ~} J[lB4GxUi=U[} tc)~x(k#`t ՗qz[/@3EDX@lBzcN >Wo!i!Ux:c7@F#$ rV|x Ofi0v4PV SSpkA,8$T(Ak%Ƒ>{5*jƟ?tK^^+^$JnQ>a,߾|j5/pƹ2־TT3 W׋v>+,B A&;1إ ž;>|mwG{Z,K"~X>SDώ>ı,W`?Բl$I۲`9/|wEunyg C@:rJ7{{[QqWv, |)addScript($uri->root().'administrator/components/com_chronoforms/form_widgets/multi_upload/multi_upload.js'); $clean_fldname = str_replace('[]', '', $params['input_name']); ?>
files[$clean_fldname])){ $fields_data_list = $form->files[$clean_fldname]; $file_name_key = 'name'; $file_orig_name_key = 'original_name'; $file_id_key = 'file_id'; }else{ if(!empty($params['data_path']) && !is_null($form->get_array_value($form->data, explode('.', trim($params['data_path']))))){ $fields_data_list = $form->get_array_value($form->data, explode('.', trim($params['data_path']))); $file_name_key = !empty($params['data_path_name']) ? $params['data_path_name'] : ''; $file_orig_name_key = !empty($params['data_path_original_name']) ? $params['data_path_original_name'] : ''; $file_id_key = !empty($params['data_path_id']) ? $params['data_path_id'] : ''; } } //print_r2($form->data); foreach($fields_data_list as $k => $field_data): ?>
multi_upload/multi_upload.js000066600000002006151374251520012305 0ustar00var MultiUpload = new Class({}); MultiUpload.addAttachment = function(source, name, limit, path){ if(parseInt(source.getParent().getFirst('.multi-upload-limit').get('value')) < limit){ var file = new Element('div', {'style':'float:left; clear:left;', 'html':' '}); file.inject(source.getParent().getPrevious('.multi-upload-attachments-wrapper')); source.getParent().getFirst('.multi-upload-limit').set('value', parseInt(source.getParent().getFirst('.multi-upload-limit').get('value')) + 1); } } MultiUpload.removeAttachment = function(source){ source.getParent().destroy(); } MultiUpload.fixLimit = function(source, ID){ if(source.checked == true){ $(ID).set('value', parseInt($(ID).get('value')) + 1); }else{ $(ID).set('value', parseInt($(ID).get('value')) - 1); } }multi_upload/input_multi_upload.ctp000066600000014714151374251520013707 0ustar00
Multi Upload
input('chronofield[{n}][input_multi_upload_{n}_label_text]', array('type' => 'hidden', 'id' => 'input_multi_upload_{n}_label_text', 'value' => $element_params['label_text'])); ?> input('chronofield[{n}][input_multi_upload_{n}_input_name]', array('type' => 'hidden', 'id' => 'input_multi_upload_{n}_input_name', 'value' => $element_params['input_name'])); ?> input('chronofield[{n}][input_multi_upload_{n}_limit]', array('type' => 'hidden', 'id' => 'input_multi_upload_{n}_limit', 'value' => $element_params['limit'])); ?> input('chronofield[{n}][input_multi_upload_{n}_label_over]', array('type' => 'hidden', 'id' => 'input_multi_upload_{n}_label_over', 'value' => $element_params['label_over'])); ?> input('chronofield[{n}][input_multi_upload_{n}_hide_label]', array('type' => 'hidden', 'id' => 'input_multi_upload_{n}_hide_label', 'value' => $element_params['hide_label'])); ?> input('chronofield[{n}][input_multi_upload_{n}_data_path]', array('type' => 'hidden', 'id' => 'input_multi_upload_{n}_data_path', 'value' => $element_params['data_path'])); ?> input('chronofield[{n}][input_multi_upload_{n}_data_path_name]', array('type' => 'hidden', 'id' => 'input_multi_upload_{n}_data_path_name', 'value' => $element_params['data_path_name'])); ?> input('chronofield[{n}][input_multi_upload_{n}_data_path_original_name]', array('type' => 'hidden', 'id' => 'input_multi_upload_{n}_data_path_original_name', 'value' => $element_params['data_path_original_name'])); ?> input('chronofield[{n}][input_multi_upload_{n}_data_path_id]', array('type' => 'hidden', 'id' => 'input_multi_upload_{n}_data_path_id', 'value' => $element_params['data_path_id'])); ?>
Header(array('general' => 'General', 'republish' => 'Data Republish', 'other' => 'Other', 'validation' => 'Validation'), 'input_multi_upload_element_config_{n}'); ?> tabStart('general'); ?> input('input_multi_upload_{n}_label_text_config', array('type' => 'text', 'label' => 'Label Text', 'class' => 'small_input', 'value' => '')); ?> input('input_multi_upload_{n}_input_name_config', array('type' => 'text', 'label' => 'Field Name', 'class' => 'small_input', 'value' => '', 'smalldesc' => "Don't forget to add 2 square brackets [] after the field name to post array of files, e.g: attachments[]")); ?> input('input_multi_upload_{n}_limit_config', array('type' => 'text', 'label' => 'Limit', 'class' => 'small_input', 'value' => '')); ?> tabEnd(); ?> tabStart('republish'); ?> input('input_multi_upload_{n}_data_path_config', array('type' => 'text', 'label' => "Files Data Path", 'class' => 'medium_input', 'smalldesc' => 'The data array key under which the files data will be available in the form->data array.')); ?> input('input_multi_upload_{n}_data_path_name_config', array('type' => 'text', 'label' => "File Name", 'smalldesc' => 'The array key under which the file name is stored, leave empty if the names are under the data path directly.')); ?> input('input_multi_upload_{n}_data_path_original_name_config', array('type' => 'text', 'label' => "File Original Name", 'smalldesc' => 'The array key under which the file original name is stored.')); ?> input('input_multi_upload_{n}_data_path_id_config', array('type' => 'text', 'label' => "File ID", 'smalldesc' => 'The array key under which the file id is stored.')); ?> input('input_multi_upload_{n}_target_path_config', array('type' => 'text', 'label' => "Target Data Path", 'smalldesc' => 'The data array key under which the files data will be stored after submission.')); ?> tabEnd(); ?> tabStart('other'); ?> input('input_multi_upload_{n}_label_over_config', array('type' => 'checkbox', 'label' => 'Label Over', 'value' => '1', 'rule' => "bool")); ?> input('input_multi_upload_{n}_hide_label_config', array('type' => 'checkbox', 'label' => 'Hide Label', 'value' => '1', 'rule' => "bool")); ?> input('input_multi_upload_{n}_instructions_config', array('type' => 'textarea', 'label' => 'Instructions for users', 'rows' => 5, 'cols' => 50)); ?> input('input_multi_upload_{n}_tooltip_config', array('type' => 'textarea', 'label' => 'Tooltip', 'rows' => 5, 'cols' => 50)); ?> tabEnd(); ?> tabStart('validation'); ?> input('input_multi_upload_{n}_validations_config', array('type' => 'checkbox', 'label' => 'Required', 'class' => 'small_input', 'value' => 'required', 'rule' => "split", 'splitter' => ",")); ?> tabEnd(); ?>
index.html000066600000000000151374251520006540 0ustar00