View Issue Details

IDProjectCategoryView StatusLast Update
14602Development Survey participants (Tokens)public2019-04-17 10:19
Reporterritapas Assigned To 
PrioritynoneSeverityminor 
Status newResolutionopen 
Product Version3.x 
Summary14602: incomplete results from ldap query
Description

Inside the /application/views/admin/token/ldappost.php script it seems that something is missing.
In each of the two braches of the if-else there is a foreach to build the invalid mail list (lines 27 and 50) but none for the duplicate list so that only a list is created while having both would be useful.

Moreover, the toggle() function does not work for the p> element in our version of chrome.

TagsNo tags attached.

Activities

ritapas

ritapas

2019-03-05 15:32

reporter   ~50779

This is how we worked around it but we guess it can be done better than this.

ldappost.php (3,878 bytes)   
<?php
/**
 * Result of ldap upload
 */
?>

<div class='side-body <?php echo getSideBodyClass(false); ?>'>
    <div class="row">
        <div class="col-lg-12 content-right">
            <?php if ($xz != 0): ?>
            <!-- Success -->
                <div class="jumbotron message-box">
                    <h2 class="text-success"><?php eT("Success"); ?></h2>
                    <p><?php echo $resultnum; ?></p>
                    <p>
                        <?php eT("Results from LDAP Query."); ?><br />
                        <?php printf(gT("%s records met minimum requirements"),$xv); ?><br />
                        <?php echo $xz; ?> <?php eT("Records imported"); ?>.<br />
                    </p>
                <?php if ($xy != 0): ?>
                    <p>
                    <?php echo $xy; ?> <?php eT("Duplicate records removed"); ?>
                    </p>
                    <p>
                        [<a href='#' onclick='$("#duplicateslist").toggle();'><?php eT("List"); ?></a>]

                    </p>
                    <div class='badtokenlist' id='duplicateslist' style='display: none;'>
                        <ul class="list-unstyled">
                            <?php foreach ($duplicatelist as $aData) { ?>
                                <li><?php echo $aData; ?></li>
                            <?php } ?>
                        </ul>
                    </div>
                <?php endif;?>
                <?php if ($invalidemailcount != 0): ?>
                <p>
                <?php echo $invalidemailcount; ?> <?php eT("Records with invalid email address removed"); ?>
                </p>
                <p>
                        [<a href='#' onclick='$("#invalidemaillist").toggle();'><?php eT("List"); ?></a>]
                    </p>
                    <div class='badtokenlist' id='invalidemaillist' style='display: none;'>
                        <ul class="list-unstyled">
                            <?php foreach ($invalidemaillist as $aData) { ?>
                                <li><?php echo $aData; ?></li>
                            <?php } ?>
                        </ul>
                    </div>
                <?php endif;?>
		</div>
            <?php else: ?>
           	<!-- Error -->
                <div class="jumbotron message-box message-box-error">
                  <h2 class="text-danger"><?php eT("Error"); ?></h2>
 		<?php if ($xy != 0): ?>
		    <p>
 		    <?php echo $xy; ?> <?php eT("Duplicate records removed"); ?>
                    </p>
		    <p>
                        [<a href='#' onclick='$("#duplicateslist").toggle();'><?php eT("List"); ?></a>]

                    </p>
                    <div class='badtokenlist' id='duplicateslist' style='display: none;'>
                        <ul class="list-unstyled">
                            <?php foreach ($duplicatelist as $aData) { ?>
                                <li><?php echo $aData; ?></li>
                            <?php } ?>                
                        </ul>        
                    </div>
		<?php endif;?>
 		<?php if ($invalidemailcount != 0): ?>
		<p>
		<?php echo $invalidemailcount; ?> <?php eT("Records with invalid email address removed"); ?>
                </p>
   		<p>
                        [<a href='#' onclick='$("#invalidemaillist").toggle();'><?php eT("List"); ?></a>]
                    </p>
                    <div class='badtokenlist' id='invalidemaillist' style='display: none;'>
                        <ul class="list-unstyled">
                            <?php foreach ($invalidemaillist as $aData) { ?>
                                <li><?php echo $aData; ?></li>
                            <?php } ?>
                        </ul>
                    </div>
		<?php endif;?>
             </div>
	     <?php endif;?>
        </div>
    </div>
</div>
<br />
ldappost.php (3,878 bytes)   

Issue History

Date Modified Username Field Change
2019-03-05 14:46 ritapas New Issue
2019-03-05 15:32 ritapas File Added: ldappost.php
2019-03-05 15:32 ritapas Note Added: 50779
2019-04-17 10:19 c_schmitz Description Updated View Revisions