Skip to content
This repository has been archived by the owner on Nov 6, 2019. It is now read-only.

Commit

Permalink
sendcase -save to database- added
Browse files Browse the repository at this point in the history
  • Loading branch information
b-fender committed Jan 30, 2017
1 parent 13e0270 commit 168362f
Show file tree
Hide file tree
Showing 15 changed files with 13 additions and 1 deletion.
Empty file modified README.md
100755 → 100644
Empty file.
Empty file modified assets/.htaccess
100755 → 100644
Empty file.
Empty file modified assets/css/dropzone.css
100755 → 100644
Empty file.
Empty file modified assets/js/dropzone.js
100755 → 100644
Empty file.
10 changes: 10 additions & 0 deletions classes/fileMoveAndAppend.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,16 @@ public function moveAppend(&$arrSubmittedArray, $arrLabelsArray, $objForm, $arrF
$arrSubmittedArray[$myElemData->name] .= "\nhttp://" . $_SERVER['SERVER_NAME'] . '/' . $subfolder . $uploadFolder.'/'.$storeFolderPreFile . $curFile;
}
}
if(in_array($myElemData->sendcase,array('link','savetodb')))
{
// Dateien speichern -> Formular save to database
if (file_exists(TL_ROOT . '/' . $uploadFolder.'/'.$storeFolderPreFile . $curFile))
{
$subfolder = str_replace(array('/','\\'),'',$GLOBALS['TL_CONFIG']['websitePath']);
if( $subfolder != '') $subfolder.= '/';
$arrSubmittedArray[$myElemData->name] .= $uploadFolder.'/'.$storeFolderPreFile . $curFile;
}
}
if($myElemData->sendcase == 'attach')
{
// Datei-Verlinkung loeschen
Expand Down
Empty file modified classes/processFormData.php
100755 → 100644
Empty file.
Empty file modified config/autoload.ini
100755 → 100644
Empty file.
Empty file modified config/autoload.php
100755 → 100644
Empty file.
Empty file modified config/config.php
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion dca/tl_form_field.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
'default' => 'attach',
'exclude' => true,
'inputType' => 'radio',
'options' => array('attach', 'link', 'all'),
'options' => array('attach', 'link', 'all', 'savetodb'),
'eval' => array('mandatory'=>true),
'reference' => &$GLOBALS['TL_LANG']['tl_form_field'],
'sql' => "varchar(32) NOT NULL default ''"
Expand Down
Empty file modified dca/tl_multiuploadfilecounter.php
100755 → 100644
Empty file.
Empty file modified elements/DropUpload.php
100755 → 100644
Empty file.
1 change: 1 addition & 0 deletions languages/de/tl_form_field.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
$GLOBALS['TL_LANG']['tl_form_field']['sendcase'] = array('Dateiversand','Bitte geben Sie hier an, ob die Dateien als Anhang versandt oder als Link verchickt werden sollen.');
$GLOBALS['TL_LANG']['tl_form_field']['attach'] = array('Dateien anhängen','');
$GLOBALS['TL_LANG']['tl_form_field']['link'] = array('Dateien verlinken','');
$GLOBALS['TL_LANG']['tl_form_field']['savetodb'] = array('Dateien speichern für "Formulardaten speichern"','');
$GLOBALS['TL_LANG']['tl_form_field']['all'] = array('Dateien anhängen und verlinken','');
$GLOBALS['TL_LANG']['tl_form_field']['storecase'] = array('Speicheroptionen','Damit es zu keinen Konflikten kommt, wird für jeden Seitenbesucher eine neue ID erzeugt. <br><br>Diese ID wird verwendet um die hochgeldenen Bilder zu unterscheiden und Duplikate zu vermeiden. <br><br>Dateien werden nach erfolgrichem Formularversand entweder in den neuen Unterordner "ID" kopiert, oder direkt in das ausgewählte Verzeichnis mit neuem Dateinamen "ID_Dateiname".');
$GLOBALS['TL_LANG']['tl_form_field']['folder'] = array('Im Unterordner ID speichern','');
Expand Down
1 change: 1 addition & 0 deletions languages/en/tl_form_field.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
$GLOBALS['TL_LANG']['tl_form_field']['sendcase'] = array('File forewarding','Please enter if the uploaded files shall be forwareded as attachement or as links.');
$GLOBALS['TL_LANG']['tl_form_field']['attach'] = array('Attach files','');
$GLOBALS['TL_LANG']['tl_form_field']['link'] = array('Link files','');
$GLOBALS['TL_LANG']['tl_form_field']['savetodb'] = array('Save file for "save form-data to database"','');
$GLOBALS['TL_LANG']['tl_form_field']['all'] = array('Attach and link files','');
$GLOBALS['TL_LANG']['tl_form_field']['storecase'] = array('Save file options','To prevent conflicts, a new ID is generated for each visitor. <br><br>This ID is used to differentiate the uploaded files and to prevent duplicates. <br><br>After successfull send of the form, files are either copied to a subolder "ID" or copied directly to the choosen folder with new name "ID_filename".');
$GLOBALS['TL_LANG']['tl_form_field']['folder'] = array('Save to subfolder ID.','');
Expand Down
Empty file modified templates/form_multifileupload.html5
100755 → 100644
Empty file.

0 comments on commit 168362f

Please sign in to comment.