1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/limesurvey_ynh.git synced 2024-09-03 19:36:32 +02:00
limesurvey_ynh/sources/application/views/admin/survey/importSurvey_view.php

98 lines
5.1 KiB
PHP

<div class='header ui-widget-header'><?php echo $sHeader;?></div>
<div class='messagebox ui-corner-all'>
<?php
if ($bFailed){ ?>
<div class='errorheader'><?php $clang->eT("Error");?></div>
<?php echo $sErrorMessage; ?><br /><br />
<input type='submit' value='<?php $clang->eT("Main Admin Screen");?>' onclick="window.open('<?php echo $this->createUrl('/admin');?>', '_top')">
<input type='submit' value='<?php $clang->eT("Import again");?>' onclick="window.open('<?php echo $this->createUrl('admin/survey/sa/newsurvey#import');?>', '_top')"><br /><br /></div>
<?php } else
{?>
<div class='successheader'><?php $clang->eT("Success");?></div>&nbsp;<br />
<?php $clang->eT("File upload succeeded.");?> <?php $clang->eT("Reading file..");?><br />
<?php if (isset($aImportResults['error']) && $aImportResults['error']!=false)
{?>
<div class='warningheader'><?php $clang->eT("Error");?></div><br />
<?php
if(is_array($aImportResults['error']))
{
foreach($aImportResults['error'] as $error)
echo $error."<br/>";
} else
{
echo $aImportResults['error'];
}
?><br /><br />
<input type='submit' value='<?php $clang->eT("Main Admin Screen");?>' onclick="window.open('<?php echo $this->createUrl('/admin');?>', '_top')" />
<?php } else
{?>
<br /><div class='successheader'><?php $clang->eT("Success");?></div>
<strong><?php echo $sSummaryHeader; ?></strong><br />
<ul style="text-align:left;">
<li><?php $clang->eT("Surveys");?>: <?php echo $aImportResults['surveys'];?></li>
<li><?php $clang->eT("Languages");?>: <?php echo $aImportResults['languages'];?></li>
<li><?php $clang->eT("Question groups");?>: <?php echo $aImportResults['groups'];?></li>
<li><?php $clang->eT("Questions");?>: <?php echo $aImportResults['questions'];?></li>
<li><?php $clang->eT("Question attributes");?>: <?php echo $aImportResults['question_attributes'];?></li>
<li><?php $clang->eT("Answers");?>: <?php echo $aImportResults['answers'];?></li>
<?php if (isset($aImportResults['subquestions']))
{?>
<li><?php $clang->eT("Subquestions");?>: <?php echo $aImportResults['subquestions'];?></li>
<?php }
if (isset($aImportResults['defaultvalues']))
{?>
<li><?php $clang->eT("Default answers");?>: <?php echo $aImportResults['defaultvalues'];?></li>
<?php }
if (isset($aImportResults['conditions']))
{?>
<li><?php $clang->eT("Condition");?>: <?php echo $aImportResults['conditions'];?></li>
<?php }
if (isset($aImportResults['labelsets']))
{?>
<li><?php $clang->eT("Label sets");?>: <?php echo $aImportResults['labelsets'];?></li>
<?php }
if (isset($aImportResults['deniedcountls']) && $aImportResults['deniedcountls']>0)
{?>
<li><?php $clang->eT("Not imported label sets");?>: <?php echo $aImportResults['deniedcountls'];?> <?php $clang->eT("(Label sets were not imported since you do not have the permission to create new label sets.)"); ?> </li>
<?php }?>
<li><?php $clang->eT("Assessments");?>: <?php echo $aImportResults['assessments'];?></li>
<li><?php $clang->eT("Quotas");?>: <?php echo $aImportResults['quota'];?> (<?php echo $aImportResults['quotamembers']?> <?php $clang->eT("quota members");?> <?php $clang->eT("and");?> <?php echo $aImportResults['quotals']?> <?php $clang->eT("quota language settings"); ?></li>
</ul>
<?php
if (isset($aImportResults['responses']))
{?>
<strong><?php $clang->eT("Response import summary"); ?></strong><br />
<ul>
<li><?php $clang->eT("Responses");?>: <?php echo $aImportResults['responses'];?></li>
<?php }?>
</ul>
<br />
<?php
if (count($aImportResults['importwarnings'])>0)
{ ?>
<div class='warningheader'><?php $clang->eT("Warnings");?>:</div>
<ul style="text-align:left;">
<?php
foreach ($aImportResults['importwarnings'] as $warning)
{ ?>
<li><?php echo $warning; ?></li>
<?php
} ?>
</ul><br />
<?php }
if ($action == 'importsurvey')
{?>
<strong><?php $clang->eT("Import of survey is completed.");?></strong><br />
<?php }
elseif($action == 'copysurvey')
{?>
<strong><?php $clang->eT("Copy of survey is completed.");?></strong><br />
<?php } ?>
<br>
<input type='submit' value='<?php $clang->eT("Go to survey");?>' onclick="window.open('<?php echo $sLink; ?>', '_top')"><br /><br />
<?php } ?>
</div><br />
<?php }?>