mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 12:11:19 +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
|
||||
*/
|
||||
$allparams = $request->query->all();
|
||||
foreach($allparams['attributes'] as $an=>$av) {
|
||||
if(is_string($av) && $av == '__notset__') {
|
||||
$tmp = explode('_', $an);
|
||||
if($attrdef = $dms->getAttributeDefinition($tmp[1])) {
|
||||
$dispname = $attrdef->getName();
|
||||
unset($allparams['attributes'][$an]);
|
||||
$newrequest = Symfony\Component\HttpFoundation\Request::create($request->getBaseUrl(), 'GET', $allparams);
|
||||
$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__" />';
|
||||
if(isset($allparams['attributes'])) {
|
||||
foreach($allparams['attributes'] as $an=>$av) {
|
||||
if(is_string($av) && $av == '__notset__') {
|
||||
$tmp = explode('_', $an);
|
||||
if($attrdef = $dms->getAttributeDefinition($tmp[1])) {
|
||||
$dispname = $attrdef->getName();
|
||||
unset($allparams['attributes'][$an]);
|
||||
$newrequest = Symfony\Component\HttpFoundation\Request::create($request->getBaseUrl(), 'GET', $allparams);
|
||||
$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