示例#1
0
	<div id='div_additionalSearch' style='display:none;'>
	<table class='borderedFormTable' style="width:150px">

	<tr>
	<td class='searchRow'><label for='searchNoteTypeID'><b>Note Type</b></label>
	<br />
	<select name='search[noteTypeID]' id='searchNoteTypeID' style='width:150px'>
	<option value=''>All</option>
	<?php 
if ($search['noteTypeID'] == "none") {
    echo "<option value='none' selected>(none)</option>";
} else {
    echo "<option value='none'>(none)</option>";
}
$display = array();
$noteType = new NoteType();
foreach ($noteType->allAsArray() as $display) {
    if ($search['noteTypeID'] == $display['noteTypeID']) {
        echo "<option value='" . $display['noteTypeID'] . "' selected>" . $display['shortName'] . "</option>";
    } else {
        echo "<option value='" . $display['noteTypeID'] . "'>" . $display['shortName'] . "</option>";
    }
}
?>
	</select>
	</td>
	</tr>


	<tr>
	<td class='searchRow'><label for='searchResourceNote'><b>Note (contains)</b></label>
} else {
    $resource->resourceAltURL = '';
}
try {
    $resource->save();
    echo $resource->primaryKey;
    $resourceID = $resource->primaryKey;
    //get the provider ID in case we insert what was entered in the provider text box as an organization link
    $organizationRole = new OrganizationRole();
    $organizationRoleID = $organizationRole->getProviderID();
    //add notes
    if ($_POST['noteText'] || $_POST['providerText'] && !$_POST['organizationID']) {
        //first, remove existing notes in case this was saved before
        $resource->removeResourceNotes();
        //this is just to figure out what the creator entered note type ID is
        $noteType = new NoteType();
        $resourceNote = new ResourceNote();
        $resourceNote->resourceNoteID = '';
        $resourceNote->updateLoginID = $loginID;
        $resourceNote->updateDate = date('Y-m-d');
        $resourceNote->noteTypeID = $noteType->getInitialNoteTypeID();
        $resourceNote->tabName = 'Product';
        $resourceNote->resourceID = $resourceID;
        //only insert provider as note if it's been submitted
        if ($_POST['providerText'] && !$_POST['organizationID'] && $_POST['resourceStatus'] == 'progress') {
            $resourceNote->noteText = "Provider:  " . $_POST['providerText'] . "\n\n" . $_POST['noteText'];
        } else {
            $resourceNote->noteText = $_POST['noteText'];
        }
        $resourceNote->save();
    }
    $instance = new ImportConfig(new NamedArguments(array('primaryKey' => $configID)));
    $orgMappingInstance = new OrgNameMapping();
    $orgMappings = $orgMappingInstance->getOrgNameMappingByImportConfigID($configID);
    $configuration = json_decode($instance->configuration, true);
}
//get all alias types for output in drop-down menu
$aliasTypeArray = array();
$aliasTypeObj = new AliasType();
$aliasTypeArray = $aliasTypeObj->allAsArray();
$aliasOptions = "";
foreach ($aliasTypeArray as $aliasType) {
    $aliasOptions .= "<option value='" . $aliasType['aliasTypeID'] . "'>" . $aliasType['shortName'] . "</option>";
}
//get all note types for output in drop-down menu
$noteTypeArray = array();
$noteTypeObj = new NoteType();
$noteTypeArray = $noteTypeObj->allAsArrayForDD();
$noteOptions = "";
foreach ($noteTypeArray as $noteType) {
    $noteOptions .= "<option value='" . $noteType['noteTypeID'] . "'>" . $noteType['shortName'] . "</option>";
}
//get all organization roles for output in drop-down menu
$organizationRoleArray = array();
$organizationRoleObj = new OrganizationRole();
$organizationRoleArray = $organizationRoleObj->getArray();
$organizationOptions = "";
foreach ($organizationRoleArray as $organizationRoleID => $organizationRoleShortName) {
    $organizationOptions .= "<option value='" . $organizationRoleID . "'>" . $organizationRoleShortName . "</option>";
}
?>
<div id='importConfigColumns'>