Skip to content
Permalink
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
1 contributor

Users who have contributed to this file

60 lines (52 sloc) 2.3 KB
<?php
/**
* COmanage Match Matchgrid Records Fields
*
* Portions licensed to the University Corporation for Advanced Internet
* Development, Inc. ("UCAID") under one or more contributor license agreements.
* See the NOTICE file distributed with this work for additional information
* regarding copyright ownership.
*
* UCAID licenses this file to you under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @link http://www.internet2.edu/comanage COmanage Project
* @package match
* @since COmanage Match v1.0.0
* @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
*/
if($action == 'add' || $action == 'edit') {
print $this->Field->control('sor', ['type' => 'select', 'options' => $sor, 'empty' => __('match.fd.select'), 'required' => true]);
print $this->Field->control('sorid', ['required' => true]);
foreach($attributes as $attr) {
$options = [];
// If there is an attribute grouping, we need to append it to the api name
// XXX There's similar logic in BulkLoad, maybe make this a call on Attributes?
// eg: Attributes->getInternalApiName()
$f = $attr->api_name;
if(!empty($attr->attribute_group->name)) {
$f .= "/" . $attr->attribute_group->name;
}
// We have to manually set the current value since the control name doesn't
// map to the object name
if($action == 'edit') {
$options['default'] = $vv_obj->{$attr->name};
}
print $this->Field->control($f, $options, false, $attr->name);
}
print $this->Field->control('referenceid', [], false, __('match.fd.referenceid', [1]));
}
if($action == 'edit') {
print $this->Field->control('request_time');
// Force resolution to read only since it might not be populated
print $this->Field->control('resolution_time', ['readonly' => true]);
}