Bienvenue, Invité
Nom d'utilisateur : Mot de passe : Se souvenir de moi

SUJET : Bug Correction : Tokens, Attribute Fields

Bug Correction : Tokens, Attribute Fields il y a 1 an 9 mois #92948

  • lsga
  • Portrait de lsga
  • Hors ligne
  • Fresh Lemon
  • Messages : 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. ;)
Dernière édition: il y a 1 an 9 mois par lsga.
L'administrateur a désactivé l'accès en écriture pour le public.

Bug Correction : Tokens, Attribute Fields il y a 1 an 9 mois #92968

  • DenisChenu
  • Portrait de DenisChenu
  • Hors ligne
  • Moderator Lime
  • Messages : 6551
  • Remerciements reçus 869
  • Karma: 257
Hello,
lsga écrit:
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
L'administrateur a désactivé l'accès en écriture pour le public.
Modérateurs: ITEd
Temps de génération de la page : 0.172 secondes
Donation Image