mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-12 12:41:30 +00:00
check if attributes in url are set
This commit is contained in:
parent
d48ece4a43
commit
8b7eae47d3
|
@ -1145,15 +1145,17 @@ $(document).ready(function() {
|
||||||
* This currently just workѕ for attributes
|
* This currently just workѕ for attributes
|
||||||
*/
|
*/
|
||||||
$allparams = $request->query->all();
|
$allparams = $request->query->all();
|
||||||
foreach($allparams['attributes'] as $an=>$av) {
|
if(isset($allparams['attributes'])) {
|
||||||
if(is_string($av) && $av == '__notset__') {
|
foreach($allparams['attributes'] as $an=>$av) {
|
||||||
$tmp = explode('_', $an);
|
if(is_string($av) && $av == '__notset__') {
|
||||||
if($attrdef = $dms->getAttributeDefinition($tmp[1])) {
|
$tmp = explode('_', $an);
|
||||||
$dispname = $attrdef->getName();
|
if($attrdef = $dms->getAttributeDefinition($tmp[1])) {
|
||||||
unset($allparams['attributes'][$an]);
|
$dispname = $attrdef->getName();
|
||||||
$newrequest = Symfony\Component\HttpFoundation\Request::create($request->getBaseUrl(), 'GET', $allparams);
|
unset($allparams['attributes'][$an]);
|
||||||
$menuitems[] = array('label'=>'<i class="fa fa-remove"></i> '.$dispname.' is not set', 'link'=>$newrequest->getRequestUri(), 'attributes'=>[['title', 'Click to remove']], '_badge'=>'x');
|
$newrequest = Symfony\Component\HttpFoundation\Request::create($request->getBaseUrl(), 'GET', $allparams);
|
||||||
echo '<input type="hidden" name="attributes['.$an.']" value="__notset__" />';
|
$menuitems[] = array('label'=>'<i class="fa fa-remove"></i> '.$dispname.' is not set', 'link'=>$newrequest->getRequestUri(), 'attributes'=>[['title', 'Click to remove']], '_badge'=>'x');
|
||||||
|
echo '<input type="hidden" name="attributes['.$an.']" value="__notset__" />';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user