Skip to content

Commit

Permalink
Dev: Add top menu save button for theme options
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Nov 22, 2017
1 parent ebee385 commit 1a4672e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
10 changes: 8 additions & 2 deletions application/controllers/admin/themeoptions.php
Expand Up @@ -235,8 +235,14 @@ protected function performAjaxValidation($model)
}
}


private function _updateCommon($model,$sid=null)
/**
* Renders the template options form.
*
* @param TemplateConfiguration $model
* @param int $sid
* @return void
*/
private function _updateCommon(TemplateConfiguration $model,$sid=null)
{
$oModelWithInheritReplacement = TemplateConfiguration::model()->findByPk($model->id);
$templateOptionPage = $oModelWithInheritReplacement->optionPage;
Expand Down
2 changes: 1 addition & 1 deletion application/views/admin/super/fullpagebar_view.php
Expand Up @@ -12,7 +12,7 @@


<!-- Right actions -->
<div class="col-md-4 text-right">
<div class="col-md-6 text-right">

<!-- Save -->
<?php if(isset($fullpagebar['savebutton']['form'])):?>
Expand Down
19 changes: 19 additions & 0 deletions application/views/admin/themeoptions/update.php
Expand Up @@ -7,6 +7,21 @@

?>

<?php if (empty($model->sid)): ?>
<!-- This is only visible when we're not in survey view. -->
<div class='container-fluid'>
<div class='menubar' id='theme-options-bar'>
<div class='row'>
<div class='text-right'>
<a class="btn btn-success" href="#" role="button" id="save-form-button" data-form-id="template-options-form">
<span class="fa fa-floppy-o"></span>
<?php eT('Save'); ?>
</a>
</div>
</div>
</div>
<?php endif; ?>

<div class="row h1"><?php echo sprintf(gT('Update survey theme options for %s'),'<em>' . $model->template_name . '</em>'); ?></div>
<!-- Using bootstrap tabs to differ between just hte options and advanced direct settings -->
<div class="row">
Expand Down Expand Up @@ -188,6 +203,10 @@

</div>

<?php if (empty($model->sid)): ?>
</div>
<?php endif; ?>


<script type="text/javascript">
var progressHandling = function(event){
Expand Down

0 comments on commit 1a4672e

Please sign in to comment.