Skip to content

Commit

Permalink
Fixed issue #05742: Editing a question deletes it
Browse files Browse the repository at this point in the history
Update feature: HTML5 additions. Change "Database prefix" to "Table prefix"

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_yii@12395 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
gautamgupta committed Feb 7, 2012
1 parent dd1835f commit fc9bce7
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions application/controllers/admin/database.php
Expand Up @@ -787,10 +787,10 @@ function index($sa = null)
Questions::model()->updateAll(array('type'=>Yii::app()->request->getPost('type')), 'parent_qid=:qid', array(':qid'=>$qid));
}

Answers::model()->deleteAllByAttributes(array('qid'=>$qid, 'scale_id'=>$iAnswerScales));
Answers::model()->deleteAllByAttributes(array('qid' => $qid), 'scale_id >= :scale_id', array(':scale_id' => $iAnswerScales));

// Remove old subquestion scales
Questions::model()->deleteAllByAttributes(array('qid'=>$qid, 'scale_id'=>$iSubquestionScales));
Questions::model()->deleteAllByAttributes(array('parent_qid' => $qid), 'scale_id >= :scale_id', array(':scale_id' => $iSubquestionScales));

Yii::app()->session['flashmessage'] = $clang->gT("Question was successfully saved.");
// }
Expand Down
2 changes: 1 addition & 1 deletion application/models/InstallerConfigForm.php
Expand Up @@ -88,7 +88,7 @@ public function attributeLabels()
'dbname' => 'Database name',
'dbuser' => 'Database user',
'dbpwd' => 'Database password',
'dbprefix' => 'Database prefix',
'dbprefix' => 'Table prefix',
);
}
}
Expand Down
Expand Up @@ -16,7 +16,7 @@

<span class='annotation'> <?php $clang->eT("*This setting cannot be changed later!"); ?></span></li>
<li><label for='surveyls_title'><?php $clang->eT("Title"); ?> :</label>
<input type='text' size='82' maxlength='200' id='surveyls_title' name='surveyls_title' required="required" /> <span class='annotation'><?php $clang->eT("Required"); ?> </span>
<input type='text' size='82' maxlength='200' id='surveyls_title' name='surveyls_title' required="required" autofocus="autofocus" /> <span class='annotation'><?php $clang->eT("Required"); ?> </span>
</li>
<li><label for='description'><?php $clang->eT("Description:"); ?> </label>
<textarea cols='80' rows='10' id='description' name='description'></textarea>
Expand Down
6 changes: 3 additions & 3 deletions application/views/installer/dbconfig_view.php
Expand Up @@ -25,10 +25,10 @@
<tr>
<td style="width: 428px;">
<b><?php echo CHtml::activeLabelEx($model, 'dbtype', array('label' => $clang->gT("Database type"))); ?></b><br />
<div class="description-field"><?php $clang->eT("This is the database type."); ?> </div>
<div class="description-field"><?php $clang->eT("The name of your database management system."); ?> </div>
</td>
<td style="width: 224px;" align="right">
<?php echo CHtml::activeDropDownList($model, 'dbtype', $model->supported_db_types, array('required' => 'required', 'style' => 'width: 147px')); ?>
<?php echo CHtml::activeDropDownList($model, 'dbtype', $model->supported_db_types, array('required' => 'required', 'style' => 'width: 155px', 'autofocus' => 'autofocus')); ?>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -61,7 +61,7 @@
</tr>
<tr>
<td style="width: 428px;">
<b><?php echo CHtml::activeLabelEx($model, 'dbprefix', array('label' => $clang->gT("Database prefix"))); ?></b><br />
<b><?php echo CHtml::activeLabelEx($model, 'dbprefix', array('label' => $clang->gT("Table prefix"))); ?></b><br />
<div class="description-field"><?php $clang->eT('If your database is shared, recommended prefix is "lime_" else you can leave this setting blank.'); ?></div>
</td>
<td style="width: 224px;" align="right"><?php echo CHtml::activeTextField($model, 'dbprefix', array('value' => 'lime_')) ?></td>
Expand Down
4 changes: 2 additions & 2 deletions application/views/installer/dbsettings_view.php
Expand Up @@ -12,7 +12,7 @@
<p>&nbsp;<?php echo $descp; ?></p>
<hr />
<br />
<div class='messagebox'><div class='header'><?php echo $clang->eT('LimeSurvey setup'); ?></div>
<div class='messagebox'><div class='header'><?php $clang->eT('LimeSurvey setup'); ?></div>
<?php if (isset($adminoutputText)) echo $adminoutputText; ?>
</div><br />
</div>
Expand All @@ -26,7 +26,7 @@
<table style="font-size:11px; width: 694px;">
<tbody>
<tr>
<td align="left" style="width: 227px;"><input class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" type="button" value="Previous" onclick="javascript: window.open('<?php echo $this->createUrl("installer/database"); ?>', '_top')" /></td>
<td align="left" style="width: 227px;"><input class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" type="button" value="<?php $clang->eT('Previous'); ?>" onclick="javascript: window.open('<?php echo $this->createUrl("installer/database"); ?>', '_top')" /></td>
<td align="center" style="width: 227px;"></td>
<td align="right" style="width: 227px;"><?php if (isset($adminoutputForm)) echo $adminoutputForm; ?></td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion application/views/installer/optconfig_view.php
Expand Up @@ -25,7 +25,7 @@
<legend class="content-table-heading"><?php $clang->eT("Optional settings"); ?></legend>
<table style="width: 640px; font-size:14px;">
<tr>
<td><b><?php echo CHtml::activeLabelEx($model, 'adminLoginName', array('label' => $clang->gT("Admin login name"))); ?></b><br />
<td><b><?php echo CHtml::activeLabelEx($model, 'adminLoginName', array('label' => $clang->gT("Admin login name"), 'autofocus' => 'autofocus')); ?></b><br />
<div class="description-field"><?php $clang->eT("This will be the userid by which admin of board will login."); ?></div>
</td>
<td align="right"><?php echo CHtml::activeTextField($model, 'adminLoginName'); ?></td>
Expand Down

0 comments on commit fc9bce7

Please sign in to comment.