<commit_before><?php
/*=========================================================================
MIDAS Server
Copyright (c) Kitware SAS. 20 rue de la Villette. All rights reserved.
69328 Lyon, FRANCE.

See Copyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.  See the above copyright notices for more information.
=========================================================================*/
?>
<script type="text/javascript" src="<?php echo $this->moduleWebroot?>/public/js/upload/upload.index.js"></script>
<link type="text/css" rel="stylesheet" href="<?php echo $this->moduleWebroot?>/public/css/upload/upload.index.css" />

<b><?php echo $this->t('Step 1: Where do you want to upload your files')?>?</b>
<div>
  <br/>
  <b><?php echo $this->t('Destination:')?></b>
  <span class="destinationUpload"><?php echo $this->defaultUploadLocationText?></span>
  <br/><br/>
  <div class="belowDestinationUpload" style="display: none;"></div>
  <input type="hidden" name="parent" class="destinationId" value="<?php echo $this->defaultUploadLocation?>"/>
  <br/>
  <input style="margin-left:0px;" class="browseMIDASLink globalButton" type="button" value="Choose location" />
  <br/><br/>
</div>
  <b><?php echo $this->t('Step 2: Select a license')?></b>
<div>
  <?php
  echo $this->element('license')?>
</div>
<br/>
<b><?php echo $this->t('Step 3: Select files to upload')?></b>

<div class="chooseFolderMessage">
Click the "Choose Folder" button to select a local directory that contains a DICOM series. By default, all files in the
directory will be anonymized and then uploaded.  The temporary anonymized files will be deleted afterward.
</div>

<object name="Midas DICOM Uploader"
        class="uploadApplet"
        archive="<?php echo $this->moduleWebroot?>/public/java/dicomupload/dist/DicomUploader.jar?ts=<?php echo time()?>,
                 <?php echo $this->moduleWebroot?>/public/java/dicomupload/lib/CTP.jar,
                 <?php echo $this->moduleWebroot?>/public/java/dicomupload/lib/util.jar,
                 <?php echo $this->moduleWebroot?>/public/java/dicomupload/lib/dcm4che.jar,
                 <?php echo $this->moduleWebroot?>/public/java/dicomupload/lib/log4j.jar"
        width="480" height="190" mayscript="true"
        code="com.kitware.utils.Main">
  <param name = "type" value = "application/x-java-applet;version=1.5" />
  <param name = "background" value = "ffffff" />
  <param name = "loglevel" value = "WARNING" />
  <param name = "sessionId" value = "<?php echo session_id();?>"/>
  <param name = "baseURL" value = "<?php echo $this->protocol."://".$this->host.$this->webroot ?>/upload/"/>
  <param name = "webroot" value = "<?php echo $this->protocol."://".$this->host.$this->webroot ?>" />
  <param name = "apiURL" value = "<?php echo $this->protocol."://".$this->host.$this->webroot ?>/api/json?useSession&method=" />
  <param name = "daScript" value="<?php echo $this->protocol."://".$this->host.$this->webroot ?>/modules/dicomanonymize/public/java/dicomupload/config/DA.script"/>
  <param name = "getUploadFileOffsetBaseURL" value="gethttpuploadoffset/"/>
  <param name = "onSuccessfulUploadRedirectEnable" value="true"/>
  <param name = "onSuccessRedirectURL" value="/item/"/>
  <param name = "uploadUniqueIdentifierURL" value="gethttpuploaduniqueidentifier/"/>
  <param name = "uploadFileBaseURL" value="processjavaupload/?sid="/>
  <param name = "codebase_lookup" value="false"> <!-- must set this parameter so the applet won't look for files on the server -->
  You must install and enable Java on your system in order to use the large file uploader.
</object>
<commit_msg>Better styling on the DICOM upload tab.<commit_after><?php
/*=========================================================================
MIDAS Server
Copyright (c) Kitware SAS. 20 rue de la Villette. All rights reserved.
69328 Lyon, FRANCE.

See Copyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.  See the above copyright notices for more information.
=========================================================================*/
?>
<script type="text/javascript" src="<?php echo $this->moduleWebroot?>/public/js/upload/upload.index.js"></script>
<link type="text/css" rel="stylesheet" href="<?php echo $this->moduleWebroot?>/public/css/upload/upload.index.css" />

<b><?php echo $this->t('Step 1: Where do you want to upload your files')?>?</b>
<div>
  <br/>
  <b><?php echo $this->t('Destination:')?></b>
  <span class="destinationUpload"><?php echo $this->defaultUploadLocationText?></span>
  <br/><br/>
  <div class="belowDestinationUpload" style="display: none;"></div>
  <input type="hidden" name="parent" class="destinationId" value="<?php echo $this->defaultUploadLocation?>"/>
  <br/>
  <input style="margin-left:0px;" class="browseMIDASLink globalButton" type="button" value="Choose location" />
  <br/><br/>
</div>
<div class="licenseSelectMessage">
  <b><?php echo $this->t('Step 2: Select a license')?></b>
  <div>
  <?php
  echo $this->element('license')?>
  </div>
</div>
<br/>
<b><?php echo $this->t('Step 3: Select files to upload')?></b>

<div class="chooseFolderMessage">
Click the "Choose Folder" button to select a local directory that contains a DICOM series.
<span class="additionalMessage">By default, all files in the directory will be anonymized
    and then uploaded.  The temporary anonymized files will be deleted afterward.</span>
</div>

<object name="Midas DICOM Uploader"
        class="uploadApplet"
        archive="<?php echo $this->moduleWebroot?>/public/java/dicomupload/dist/DicomUploader.jar?ts=<?php echo time()?>,
                 <?php echo $this->moduleWebroot?>/public/java/dicomupload/lib/CTP.jar,
                 <?php echo $this->moduleWebroot?>/public/java/dicomupload/lib/util.jar,
                 <?php echo $this->moduleWebroot?>/public/java/dicomupload/lib/dcm4che.jar,
                 <?php echo $this->moduleWebroot?>/public/java/dicomupload/lib/log4j.jar"
        width="480" height="190" mayscript="true"
        code="com.kitware.utils.Main">
  <param name = "type" value = "application/x-java-applet;version=1.5" />
  <param name = "background" value = "ffffff" />
  <param name = "loglevel" value = "WARNING" />
  <param name = "sessionId" value = "<?php echo session_id();?>"/>
  <param name = "baseURL" value = "<?php echo $this->protocol."://".$this->host.$this->webroot ?>/upload/"/>
  <param name = "webroot" value = "<?php echo $this->protocol."://".$this->host.$this->webroot ?>" />
  <param name = "apiURL" value = "<?php echo $this->protocol."://".$this->host.$this->webroot ?>/api/json?useSession&method=" />
  <param name = "daScript" value="<?php echo $this->protocol."://".$this->host.$this->webroot ?>/modules/dicomanonymize/public/java/dicomupload/config/DA.script"/>
  <param name = "getUploadFileOffsetBaseURL" value="gethttpuploadoffset/"/>
  <param name = "onSuccessfulUploadRedirectEnable" value="true"/>
  <param name = "onSuccessRedirectURL" value="/item/"/>
  <param name = "uploadUniqueIdentifierURL" value="gethttpuploaduniqueidentifier/"/>
  <param name = "uploadFileBaseURL" value="processjavaupload/?sid="/>
  <param name = "codebase_lookup" value="false"> <!-- must set this parameter so the applet won't look for files on the server -->
  You must install and enable Java on your system in order to use the large file uploader.
</object>

{'fraction_non_alphanumeric': 0.206127030239007, 'fraction_numerical': 0.0055460187508253, 'mean_word_length': 4.652238805970149, 'pattern_counts': {'":': 8, '<': 143, '<?xml version=': 0, '>': 195, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4815846', 'n_tokens_mistral': 2352, 'n_tokens_neox': 2310, 'n_words': 606}