Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored ajaxquestionattributes() function
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_ci@11005 b72ed6b6-b9f8-46b5-92b4-906544132732
- Loading branch information
Showing
3 changed files
with
94 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
application/views/admin/survey/Question/advanced_settings_view.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?php | ||
$currentfieldset=''; | ||
foreach ($attributedata as $aAttribute) | ||
{ | ||
if ($currentfieldset!=$aAttribute['category']) | ||
{ | ||
if ($currentfieldset!='') | ||
{?> | ||
</ul></fieldset>'; <?php | ||
} | ||
$currentfieldset=$aAttribute['category']; | ||
?> | ||
<fieldset> | ||
<legend><?php echo $aAttribute['category'];?></legend> | ||
<ul> | ||
<?php | ||
}?> | ||
<li> | ||
<label for='<?php echo $aAttribute['name'];?>' title='<?php echo $aAttribute['help'];?>'><?php echo $aAttribute['caption']; | ||
if ($aAttribute['i18n']==true) { ?> (<?php echo $aAttribute['language'] ?>)<?php }?> | ||
</label> | ||
<?php | ||
if ($aAttribute['readonly']) | ||
{ | ||
echo $aAttribute['value']; | ||
} | ||
else | ||
{ | ||
switch ($aAttribute['inputtype']){ | ||
case 'singleselect': echo "<select id='{$aAttribute['name']}' name='{$aAttribute['name']}'>"; | ||
foreach($aAttribute['options'] as $sOptionvalue=>$sOptiontext) | ||
{ | ||
echo "<option value='{$sOptionvalue}' "; | ||
if ($aAttribute['value']==$sOptionvalue) | ||
{ | ||
echo " selected='selected' "; | ||
} | ||
echo ">{$sOptiontext}</option>"; | ||
} | ||
echo "</select>"; | ||
break; | ||
case 'text':?> <input type='text' id='<?php echo $aAttribute['name'];?>' name='<?php echo $aAttribute['name'];?>' value='<?php echo $aAttribute['value'];?>' /> | ||
<?php | ||
break; | ||
case 'integer':?> <input type='text' id='<?php echo $aAttribute['name'];?>' name='<?php echo $aAttribute['name'];?>' value='<?php echo $aAttribute['value'];?>' /> | ||
<?php | ||
break; | ||
case 'textarea':?> <textarea id='<?php echo $aAttribute['name'];?>' name='<?php echo $aAttribute['name'];?>'><?php echo $aAttribute['value'];?>' </textarea> | ||
<?php | ||
break; | ||
} | ||
}?> | ||
</li> | ||
<?php }?> | ||
</ul></fieldset> |