Skip to content

Commit

Permalink
dev: made changed spss/r exports look a little better
Browse files Browse the repository at this point in the history
  • Loading branch information
mennodekker committed Apr 3, 2013
1 parent f980426 commit ca33bc4
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 37 deletions.
39 changes: 23 additions & 16 deletions application/views/admin/export/r_view.php
@@ -1,20 +1,27 @@
<div class='header ui-widget-header'><?php $clang->eT("Export result data to R");?></div>
<?php echo CHtml::form(array('admin/export/sa/exportr/sid/'.$surveyid), 'post', array('id'=>'exportr'));?>
<input type='hidden' name='sid' value='<?php echo $surveyid;?>' />
<input type='hidden' name='action' value='exportr' />
<ul>
<li><label for='completionstate'><?php $clang->eT("Data selection:");?></label><select id='completionstate' name='completionstate' onchange='this.form.submit();'>
<option value='complete' <?php echo$selecthide;?>><?php $clang->eT("Completed responses only");?></option>
<option value='all' <?php echo$selectshow;?>><?php $clang->eT("All responses");?></option>
<option value='incomplete' <?php echo$selectinc;?>><?php $clang->eT("Incomplete responses only");?></option>
</select>
</li>
<li><label for='dlstructure'><?php $clang->eT("Step 1:");?></label><input type='submit' name='dlstructure' id='dlstructure' value='<?php $clang->eT("Export R syntax file");?>'/></li>
<li><label for='dldata'/><?php $clang->eT("Step 2:");?></label><input type='submit' name='dldata' id='dldata' value='<?php $clang->eT("Export .csv data file");?>'/></li>
<li><label><?php $clang->eT("Optional");?></label></li>
<li><label for='limit'><?php $clang->eT("Limit:");?></label></li><input type='text' name='limit' value='<?php echo App()->getRequest()->getParam('limit');?>' />
<li><label for='offset'><?php $clang->eT("Offset:");?></label></li><input type='text' name='offset' value='<?php echo App()->getRequest()->getParam('offset');?>' />
</ul>
<?php echo CHtml::form(array('admin/export/sa/exportr/sid/'.$surveyid), 'post', array('id'=>'exportr', 'class'=>'wrap2columns'));?>
<fieldset>
<input type='hidden' name='sid' value='<?php echo $surveyid;?>' />
<input type='hidden' name='action' value='exportr' />
<ul>
<li><label for='completionstate'><?php $clang->eT("Data selection:");?></label><select id='completionstate' name='completionstate' onchange='this.form.submit();'>
<option value='complete' <?php echo$selecthide;?>><?php $clang->eT("Completed responses only");?></option>
<option value='all' <?php echo$selectshow;?>><?php $clang->eT("All responses");?></option>
<option value='incomplete' <?php echo$selectinc;?>><?php $clang->eT("Incomplete responses only");?></option>
</select>
</li>
<li><label for='dlstructure'><?php $clang->eT("Step 1:");?></label><input type='submit' name='dlstructure' id='dlstructure' value='<?php $clang->eT("Export R syntax file");?>'/></li>
<li><label for='dldata'/><?php $clang->eT("Step 2:");?></label><input type='submit' name='dldata' id='dldata' value='<?php $clang->eT("Export .csv data file");?>'/></li>
</ul>
</fieldset>
<fieldset>
<legend><?php $clang->eT("Optional");?></legend>
<ul>
<li><label></label></li>
<li><label for='limit'><?php $clang->eT("Limit:");?></label><input type='text' name='limit' value='<?php echo App()->getRequest()->getParam('limit');?>' /></li>
<li><label for='offset'><?php $clang->eT("Offset:");?></label><input type='text' name='offset' value='<?php echo App()->getRequest()->getParam('offset');?>' /></li>
</ul>
</fieldset>
</form>

<p><div class='messagebox ui-corner-all'><div class='header ui-widget-header'><?php $clang->eT("Instructions for the impatient");?></div>
Expand Down
49 changes: 28 additions & 21 deletions application/views/admin/export/spss_view.php
@@ -1,27 +1,34 @@
<div class='header ui-widget-header'><?php $clang->eT("Export result data to SPSS");?></div>

<?php echo CHtml::form(array("admin/export/sa/exportspss/sid/{$surveyid}/"), 'post', array('id'=>'exportspss'));?>
<ul>
<li><label for='completionstate'><?php $clang->eT("Data selection:");?></label><select id='completionstate' name='completionstate' onchange='this.form.submit();'>
<option value='complete' <?php echo $selecthide;?>><?php $clang->eT("Completed responses only");?></option>
<option value='all' <?php echo $selectshow;?>><?php $clang->eT("All responses");?></option>
<option value='incomplete' <?php echo$selectinc;?>><?php $clang->eT("Incomplete responses only");?></option>
</select></li>
<?php echo CHtml::form(array("admin/export/sa/exportspss/sid/{$surveyid}/"), 'post', array('id'=>'exportspss', 'class'=>'wrap2columns'));?>
<fieldset>
<ul>
<li><label for='completionstate'><?php $clang->eT("Data selection:");?></label><select id='completionstate' name='completionstate' onchange='this.form.submit();'>
<option value='complete' <?php echo $selecthide;?>><?php $clang->eT("Completed responses only");?></option>
<option value='all' <?php echo $selectshow;?>><?php $clang->eT("All responses");?></option>
<option value='incomplete' <?php echo$selectinc;?>><?php $clang->eT("Incomplete responses only");?></option>
</select></li>

<li><label for='spssver'><?php $clang->eT("SPSS version:");?></label><select id='spssver' name='spssver' onchange='this.form.submit();'>
<?php if ($spssver == 1) $selected = "selected='selected'"; else $selected = "";?>
<option value='1' <?php echo $selected;?>><?php $clang->eT("Prior to 16");?></option>
<?php if ($spssver == 2) $selected = "selected='selected'"; else $selected = ""; ?>
<option value='2' <?php echo $selected;?>><?php $clang->eT("16 or up");?></option>
</select></li>
<input type='hidden' name='sid' value='<?php echo $surveyid;?>' />
<input type='hidden' name='action' value='exportspss' /></li>
<li><label for='dlstructure'><?php $clang->eT("Step 1:");?></label><input type='submit' name='dlstructure' id='dlstructure' value='<?php $clang->eT("Export syntax");?>'/></li>
<li><label for='dldata'/><?php $clang->eT("Step 2:");?></label><input type='submit' name='dldata' id='dldata' value='<?php $clang->eT("Export data");?>'/></li>
<li><label><?php $clang->eT("Optional");?></label></li>
<li><label for='limit'><?php $clang->eT("Limit:");?></label></li><input type='text' name='limit' value='<?php echo App()->getRequest()->getParam('limit');?>' />
<li><label for='offset'><?php $clang->eT("Offset:");?></label></li><input type='text' name='offset' value='<?php echo App()->getRequest()->getParam('offset');?>' />
</ul>
<li><label for='spssver'><?php $clang->eT("SPSS version:");?></label><select id='spssver' name='spssver' onchange='this.form.submit();'>
<?php if ($spssver == 1) $selected = "selected='selected'"; else $selected = "";?>
<option value='1' <?php echo $selected;?>><?php $clang->eT("Prior to 16");?></option>
<?php if ($spssver == 2) $selected = "selected='selected'"; else $selected = ""; ?>
<option value='2' <?php echo $selected;?>><?php $clang->eT("16 or up");?></option>
</select></li>
<input type='hidden' name='sid' value='<?php echo $surveyid;?>' />
<input type='hidden' name='action' value='exportspss' /></li>
<li><label for='dlstructure'><?php $clang->eT("Step 1:");?></label><input type='submit' name='dlstructure' id='dlstructure' value='<?php $clang->eT("Export syntax");?>'/></li>
<li><label for='dldata'/><?php $clang->eT("Step 2:");?></label><input type='submit' name='dldata' id='dldata' value='<?php $clang->eT("Export data");?>'/></li>
</ul>
</fieldset>
<fieldset>
<legend><?php $clang->eT("Optional");?></legend>
<ul>
<li><label></label></li>
<li><label for='limit'><?php $clang->eT("Limit:");?></label><input type='text' name='limit' value='<?php echo App()->getRequest()->getParam('limit');?>' /></li>
<li><label for='offset'><?php $clang->eT("Offset:");?></label><input type='text' name='offset' value='<?php echo App()->getRequest()->getParam('offset');?>' /></li>
</ul>
</fieldset>
</form>

<p><div class='messagebox ui-corner-all'><div class='header ui-widget-header'><?php $clang->eT("Instructions for the impatient");?></div>
Expand Down

0 comments on commit ca33bc4

Please sign in to comment.