Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Dev Small style changes for ComfortUpdate
  • Loading branch information
c-schmitz committed Aug 28, 2015
1 parent 77e5aec commit 9448fb8
Show file tree
Hide file tree
Showing 11 changed files with 126 additions and 127 deletions.
6 changes: 3 additions & 3 deletions application/views/admin/global_settings/_presentation.php
@@ -1,8 +1,8 @@
<?php
/**
* This view generate the presentation tab inside global settings.
*
*
*
*
*/
?>
<ul>
Expand All @@ -18,7 +18,7 @@

<?php $thisrepeatheadings=getGlobalSetting('repeatheadings'); ?>
<li><label for='repeatheadings'><?php eT("Repeating headings in array questions every X subquestions:"); ?></label>
<input id='repeatheadings' name='repeatheadings' value='<?php echo $thisrepeatheadings; ?>' size='4' maxlength='4' /></li>
<input type='text' id='repeatheadings' name='repeatheadings' value='<?php echo $thisrepeatheadings; ?>' size='4' maxlength='4' /></li>

<?php
// showxquestions
Expand Down
91 changes: 46 additions & 45 deletions application/views/admin/global_settings/_security.php
@@ -1,45 +1,46 @@
<?php
/**
* This view generate the 'security' tab inside global settings.
*
*/
* This view generate the 'security' tab inside global settings.
*
*/
?>
<?php $thissurveyPreview_require_Auth=getGlobalSetting('surveyPreview_require_Auth'); ?>
<li>
<label for='surveyPreview_require_Auth'><?php eT("Survey preview only for administration users"); ?></label>

<select id='surveyPreview_require_Auth' name='surveyPreview_require_Auth'>
<option value='1'
<?php if ($thissurveyPreview_require_Auth == true) { echo " selected='selected'";}?>
><?php eT("Yes"); ?></option>
<option value='0'
<?php if ($thissurveyPreview_require_Auth == false) { echo " selected='selected'";}?>
><?php eT("No"); ?></option>
</select></li>
<ul>
<li>
<label for='surveyPreview_require_Auth'><?php eT("Survey preview only for administration users"); ?></label>

<?php $thisfilterxsshtml=getGlobalSetting('filterxsshtml'); ?>
<li><label for='filterxsshtml'><?php eT("Filter HTML for XSS:"); echo ((Yii::app()->getConfig("demoMode")==true)?'*':''); ?></label>
<select id='filterxsshtml' name='filterxsshtml'>
<option value='1'
<?php if ( $thisfilterxsshtml == true) { echo " selected='selected'";}?>
><?php eT("Yes"); ?></option>
<option value='0'
<?php if ( $thisfilterxsshtml == false) { echo " selected='selected'";}?>
><?php eT("No"); ?></option>
</select>&nbsp;<span class='hint'><?php eT("(XSS filtering is always disabled for the superadministrator.)"); ?></span></li>
<select id='surveyPreview_require_Auth' name='surveyPreview_require_Auth'>
<option value='1'
<?php if ($thissurveyPreview_require_Auth == true) { echo " selected='selected'";}?>
><?php eT("Yes"); ?></option>
<option value='0'
<?php if ($thissurveyPreview_require_Auth == false) { echo " selected='selected'";}?>
><?php eT("No"); ?></option>
</select></li>

<?php $thisusercontrolSameGroupPolicy=getGlobalSetting('usercontrolSameGroupPolicy'); ?>
<li><label for='usercontrolSameGroupPolicy'><?php eT("Group member can only see own group:"); ?></label>
<select id='usercontrolSameGroupPolicy' name='usercontrolSameGroupPolicy'>
<option value='1'
<?php if ( $thisusercontrolSameGroupPolicy == true) { echo " selected='selected'";}?>
><?php eT("Yes"); ?></option>
<option value='0'
<?php if ( $thisusercontrolSameGroupPolicy == false) { echo " selected='selected'";}?>
><?php eT("No"); ?></option>
</select></li>
<?php $thisfilterxsshtml=getGlobalSetting('filterxsshtml'); ?>
<li><label for='filterxsshtml'><?php eT("Filter HTML for XSS:"); echo ((Yii::app()->getConfig("demoMode")==true)?'*':''); ?></label>
<select id='filterxsshtml' name='filterxsshtml'>
<option value='1'
<?php if ( $thisfilterxsshtml == true) { echo " selected='selected'";}?>
><?php eT("Yes"); ?></option>
<option value='0'
<?php if ( $thisfilterxsshtml == false) { echo " selected='selected'";}?>
><?php eT("No"); ?></option>
</select>&nbsp;<span class='hint'><?php eT("(XSS filtering is always disabled for the superadministrator.)"); ?></span></li>

<?php $thisforce_ssl = getGlobalSetting('force_ssl');
<?php $thisusercontrolSameGroupPolicy=getGlobalSetting('usercontrolSameGroupPolicy'); ?>
<li><label for='usercontrolSameGroupPolicy'><?php eT("Group member can only see own group:"); ?></label>
<select id='usercontrolSameGroupPolicy' name='usercontrolSameGroupPolicy'>
<option value='1'
<?php if ( $thisusercontrolSameGroupPolicy == true) { echo " selected='selected'";}?>
><?php eT("Yes"); ?></option>
<option value='0'
<?php if ( $thisusercontrolSameGroupPolicy == false) { echo " selected='selected'";}?>
><?php eT("No"); ?></option>
</select></li>

<?php $thisforce_ssl = getGlobalSetting('force_ssl');
$opt_force_ssl_on = $opt_force_ssl_off = $opt_force_ssl_neither = '';
$warning_force_ssl = sprintf(gT('Warning: Before turning on HTTPS,%s check if this link works.%s'),'<a href="https://'.$_SERVER['HTTP_HOST'].$this->createUrl("admin/globalsettings/sa").'" title="'. gT('Test if your server has SSL enabled by clicking on this link.').'">','</a>')
.'<br/> '
Expand All @@ -57,17 +58,17 @@
};
$this_opt = 'opt_force_ssl_'.$thisforce_ssl;
$$this_opt = ' selected="selected"';
?><li><label for="force_ssl"><?php eT('Force HTTPS:'); ?></label>
<select name="force_ssl" id="force_ssl">
<option value="on" <?php echo $opt_force_ssl_on; ?>><?php eT('On'); ?></option>
<option value="off" <?php echo $opt_force_ssl_off; ?>><?php eT('Off'); ?></option>
<option value="neither" <?php echo $opt_force_ssl_neither; ?>><?php eT("Don't force on or off"); ?></option>
</select></li>
<li><span style='font-size:0.7em;'><?php echo $warning_force_ssl; ?></span></li>
<?php unset($thisforce_ssl,$opt_force_ssl_on,$opt_force_ssl_off,$opt_force_ssl_neither,$warning_force_ssl,$this_opt); ?>
</ul>
?><li><label for="force_ssl"><?php eT('Force HTTPS:'); ?></label>
<select name="force_ssl" id="force_ssl">
<option value="on" <?php echo $opt_force_ssl_on; ?>><?php eT('On'); ?></option>
<option value="off" <?php echo $opt_force_ssl_off; ?>><?php eT('Off'); ?></option>
<option value="neither" <?php echo $opt_force_ssl_neither; ?>><?php eT("Don't force on or off"); ?></option>
</select></li>
<li><span style='font-size:0.7em;'><?php echo $warning_force_ssl; ?></span></li>
<?php unset($thisforce_ssl,$opt_force_ssl_on,$opt_force_ssl_off,$opt_force_ssl_neither,$warning_force_ssl,$this_opt); ?>
</ul>

<p><br/><input type='button' onclick='$("#frmglobalsettings").submit();' class='standardbtn' value='<?php eT("Save settings"); ?>' /><br /></p>
<?php if (Yii::app()->getConfig("demoMode")==true):?>
<p><?php eT("Note: Demo mode is activated. Marked (*) settings can't be changed."); ?></p>
<?php endif; ?>
<?php endif; ?>
8 changes: 4 additions & 4 deletions application/views/admin/update/_updateContainer.php
Expand Up @@ -2,11 +2,11 @@
/**
* This view generate all the structure needed for the ComfortUpdate.
* If no step is requested (by url or by post), ajax will render the check buttons, else, it will show the ComfortUpdater (menus, etc.)
*
*
* @var int $thisupdatecheckperiod : the current check period in days (0 => never ; 1 => everyday ; 7 => every week, etc.. )
* @var $updatelastcheck TODO : check type
* @var $updatelastcheck TODO : check type
* @var $UpdateNotificationForBranch TODO : check type
*
*
*/
?>

Expand All @@ -17,7 +17,7 @@
<!-- The check buttons : render by ajax only if no step is required by url or post -->
<?php $this->renderPartial("./update/check_updates/_checkButtons", array( "thisupdatecheckperiod"=>$thisupdatecheckperiod, "updatelastcheck"=>$updatelastcheck,"UpdateNotificationForBranch"=>$UpdateNotificationForBranch )); ?>
<!-- The updater -->
<?php $this->renderPartial("./update/updater/_updater"); ?>
<?php $this->renderPartial("./update/updater/_updater"); ?>
</div>

<?php
Expand Down
34 changes: 18 additions & 16 deletions application/views/admin/update/check_updates/_checkButtons.php
@@ -1,14 +1,14 @@
<?php
/**
* This view display the ckeck buttons, it is the first to be loaded when no step is setted.
* This view display the ckeck buttons, it is the first to be loaded when no step is setted.
* It give the possibility to user to choose how often the updates must be checked, wich branches (stable and/or unstable)
* and provides the button to check available updates.
*
* and provides the button to check available updates.
*
* @var int $thisupdatecheckperiod : the current check period in days (0 => never ; 1 => everyday ; 7 => every week, etc.. )
* @var obj $clang : the translate object, now moved to global function TODO : remove it
* @var $updatelastcheck
* @var $updatelastcheck
* @var $UpdateNotificationForBranch
*
*
*/
?>
<div id="ajaxupdaterLayoutLoading">
Expand All @@ -17,10 +17,10 @@
</div>

<div id="preUpdaterContainer">

<div class='header ui-widget-header'><?php echo eT("Updates"); ?></div><br/>
<ul>
<!--
<?php /*
<li>
<label for='updatecheckperiod'><?php echo eT("Automatically check for updates:"); ?></label>
<select name='updatecheckperiod' id='updatecheckperiod'>
Expand All @@ -42,7 +42,7 @@
</select>
<input type='button' id="ajaxcheckupdate" value='<?php eT("Check now"); ?>' />&nbsp;<span id='ajaxlastupdatecheck'><?php echo sprintf(gT("Last check: %s"),$updatelastcheck); ?></span>
</li>
<li>
<label for='updatenotificationforbranch'><?php echo eT("Show update notifications:"); ?></label>
<select name='updatenotificationforbranch' id='updatenotificationforbranch'>
Expand All @@ -57,19 +57,21 @@
><?php echo eT("For stable and unstable versions"); ?></option>
</select>
</li>
<!-- FOR AJAX REQUEST -->
<!--
<!--
<input type="hidden" id="updateBranch" value="<?php echo $UpdateNotificationForBranch;?>"/>
<!-- The js will inject inside this li the HTML of the update buttons -->
<!-- The js will inject inside this li the HTML of the update buttons -->
*/
?>
<li id="udapteButtonsContainer">
<span id="ajaxLoading" style="display: none;">
<div id="ajaxLoading" style="display: none;">
<p><?php eT('Please wait, looking for updates....');?>...</p>
<img src="<?php echo Yii::app()->baseUrl;?>/images/ajax-loader.gif" alt="loading..."/>
</span>
</div>
<br/>
<span id="updatesavailable"></span>
<span id="updatesavailable"></span>
</li>
</ul>
</ul>
</div>
Expand Up @@ -7,23 +7,19 @@
* @var int $destinationBuild the destination build
*/
?>

<?php
$urlNew = Yii::app()->createUrl("admin/globalsettings", array("update"=>'checkLocalErrors', 'destinationBuild' => $destinationBuild, 'access_token' => $access_token));
$errors = FALSE;
?>

<h2 class="maintitle"><?php eT('Checking basic requirements...'); ?></h2>

<?php
if( isset($localChecks->html) )
echo $localChecks->html;
?>

<table class="table">
<thead>
<tr>
<th class="span10"><?php eT('Available space in directory:');?></th>
<th class="span8"><?php eT('Available space in directory:');?></th>
<th class="span2" style="text-align: right"></th>
</tr>
</thead>
Expand Down Expand Up @@ -57,7 +53,7 @@
<table class="table">
<thead>
<tr>
<th class="span10"><?php eT('PHP version required');?></th>
<th class="span8"><?php eT('PHP version required');?></th>
<th class="span2" style="text-align: right"></th>
</tr>
</thead>
Expand All @@ -80,7 +76,7 @@
<table class="table">
<thead>
<tr>
<th class="span10"><?php eT('Required PHP modules:');?></th>
<th class="span8"><?php eT('Required PHP modules:');?></th>
<th class="span2" style="text-align: right"></th>
</tr>
</thead>
Expand All @@ -105,8 +101,6 @@
</tbody>
</table>

<ul>

<?php if($errors): ?>
<?php
if($ignore && ! $cant_ignore )
Expand Down
Expand Up @@ -2,24 +2,24 @@
/**
* This view render the textaera to display the list of existing files in the local installation but that shoulb created by the updater
* If no existing file, display a success message
*
* @var array $existingfiles array continaing the readonly files.
* @var obj clang
*
* @var array $existingfiles array continaing the readonly files.
* @var obj clang
*/
?>

<?php if (count($existingfiles)>0): ?>
<?php eT('The following files would be added by the update but already exist. This is very unusual and may be co-incidental.'); ?>
<?php eT('The following files would be added by the update but already exist. This is unusual and may result from an earlier update attempt.'); ?>
<br />
<?php eT('These files will be backuped and then replaced by the update procedure.');?>
<?php eT('These files will be backed up and then replaced by the update procedure.');?>
<br />
<textarea readonly="readonly" style="background-color: #FFF; width: 800px; height: 150px; font-family: Monospace; font-size: 11px;">
<textarea readonly="readonly" style="background-color: #FFF; width: 800px; height: 150px; font-family: Monospace; font-size: 11px;">
<?php
sort($existingfiles);
foreach ($existingfiles as $existingfile)
{
echo htmlspecialchars($existingfile['file'])."\n";
}
?>
</textarea>
</textarea>
<?php endif;?>
@@ -1,24 +1,24 @@
<?php
/**
* This view render the textaera to display the list of files modified or deleted by the updater but already modified in the local installation
* If no modified file, display a success message
*
* @var array $readonlyfiles array continaing the readonly files.
* @var obj clang
*/
* This view render the textaera to display the list of files modified or deleted by the updater but already modified in the local installation
* If no modified file, display a success message
*
* @var array $readonlyfiles array continaing the readonly files.
* @var obj clang
*/
?>
<?php if (count($modifiedfiles)>0): ?>
<?php eT('The following files will be modified or deleted but were already modified by someone else.');?>
<br/>
<?php eT('These files will be backuped and then replaced by the update procedure.');?>
<br/>
<textarea readonly="readonly" style="background-color: #FFF; width: 800px; height: 150px; font-family: Monospace; font-size: 11px;">
<?php
sort($modifiedfiles);
foreach ($modifiedfiles as $modifiedfile)
{
echo htmlspecialchars($modifiedfile['file'])."\n";
}?>
</textarea>
<?php endif;?>
if (count($modifiedfiles)>0): ?>
<p>
<?php eT('The following files will be modified or deleted but were already modified by someone else.');?>
<br/>
<?php eT('These files will be backed up and then replaced by the update procedure.');?>
</p>
<textarea readonly="readonly" style="background-color: #FFF; width: 800px; height: 150px; font-family: Monospace; font-size: 11px;"><?php
sort($modifiedfiles);
foreach ($modifiedfiles as $modifiedfile)
{
echo htmlspecialchars($modifiedfile['file'])."\n";
}?></textarea>
<?php endif;?>

Expand Up @@ -4,12 +4,12 @@
$urlContinue = Yii::app()->createUrl("admin/globalsettings", array("update"=>'welcome', 'destinationBuild'=>$_POST["destinationBuild"]));
?>
<h2 class="maintitle"><?php eT("Key update");?></h2>
<?php
<?php
if( isset($serverAnswer->html) )
echo $serverAnswer->html;
?>
<div>
<?php eT('Your key has been updated and validated! You can now use ComfortUpdate.'); ?>
<p><br><?php eT('Your key has been updated and validated! You can now use ComfortUpdate.'); ?></p>
</div>

<a class="button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only limebutton" href="<?php echo $urlContinue;?>" role="button" aria-disabled="false">
Expand Down

0 comments on commit 9448fb8

Please sign in to comment.