Welcome, Guest
Username: Password: Remember me

TOPIC: Bug Correction : Tokens, Attribute Fields

Bug Correction : Tokens, Attribute Fields 1 year 7 months ago #92948

  • lsga
  • lsga's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
Hi, just to say I corrected a bug in LS => Token => Attribute fields.

Before, when you created various attribute fields, they didn't appeared in the token form (just the last one), wich was provoking a bug when one of the none shown attributes was mandatory.

I don't know where to submit bugs correction, so I do it here.

application/controllers/admin/tokens.php
tokens::_handletokenform
$aData['attrfieldnames']=array();
/*LS HACK !!*/
$lsAttrFields = array();
$aAdditionalAttributeFields = Survey::model()->findByPk($iSurveyId)->tokenAttributes;
foreach ($aAdditionalAttributeFields as $sField=>$aData)
{
	if (in_array($sField,$aTokenFieldNames))
	{
		$lsAttrFields[$sField]=$aData;
	}
}
$aData['attrfieldnames']=$lsAttrFields;

Now, all attributes are shown in token form. ;)
Last Edit: 1 year 7 months ago by lsga.
The administrator has disabled public write access.

Bug Correction : Tokens, Attribute Fields 1 year 6 months ago #92968

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6334
  • Thank you received: 818
  • Karma: 243
Hello,
lsga wrote:
Hi, just to say I corrected a bug in LS => Token => Attribute fields.

Before, when you created various attribute fields, they didn't appeared in the token form (just the last one), wich was provoking a bug when one of the none shown attributes was mandatory.
Don't understand, just try with last GIT version and it work.
I:
- Create 8 attribute, click "Add fields"
- Click add ne token entry : and have all atribute.

I don't know where to submit bugs correction, so I do it here.
www.limesurvey.org/en/community-services/bug-tracker :)

And for patch :
github.com/LimeSurvey/LimeSurvey

Denis
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.139 seconds
Donation Image