Skip to content

Commit

Permalink
Fixed issue: Page Header and TopBar: Settings - Homepage Settings - C…
Browse files Browse the repository at this point in the history
…reate Box

- Added Green Bar
- Added Shadow under Top Bar
- Adjusted content
- Moved Required Message to the bottom of the page
- Updated old URL createbox
  • Loading branch information
thedirtypanda committed Jun 10, 2021
1 parent b62a9d0 commit 5f2eedd
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 22 deletions.
20 changes: 17 additions & 3 deletions application/controllers/HomepageSettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,25 @@ public function actionCreateBox()
}
}

$this->aData = [
'pageTitle' => 'New box',
'fullpagebar' => [
'savebutton' => [
'form' => 'boxes-form',
],
'saveandclosebutton' => [
'form' => 'boxes-form'
],
'closebutton' => [
'url' => Yii::app()->createUrl('homepageSettings/index')
]
],
'model' => $model,
];

$this->render(
'create',
[
'model' => $model
]
$this->aData
);
}

Expand Down
8 changes: 4 additions & 4 deletions application/views/admin/super/fullpagebar_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,27 @@

<!-- Save and Close -->
<?php if(isset($fullpagebar['saveandclosebutton']['form'])):?>
<a class="btn btn-default" href="#" role="button" id="save-and-close-form-button" onclick="$(this).addClass('disabled').attr('onclick', 'return false;');" data-form-id="<?php echo $fullpagebar['saveandclosebutton']['form']; ?>">
<a class="btn btn-default" href="#" role="button" id="save-and-close-form-button" onclick="$(this).addClass('disabled').attr('onclick', 'return false;');" data-form-id="<?php echo $fullpagebar['saveandclosebutton']['form']; ?>" style="margin-top: 10px;">
<span class="fa fa-saved"></span>
<?php eT("Save and close");?>
</a>
<?php endif; ?>

<!-- Close -->
<?php if(isset($fullpagebar['closebutton']['url'])):?>
<a class="btn btn-danger" href="<?php echo $fullpagebar['closebutton']['url']; ?>" role="button">
<a class="btn btn-danger" href="<?php echo $fullpagebar['closebutton']['url']; ?>" role="button" style="margin-top: 10px;">
<span class="fa fa-close"></span>
<?php eT("Close");?>
</a>
<?php endif;?>

<!-- Box Buttons -->
<?php if(isset($fullpagebar['boxbuttons'])):?>
<a href="<?php echo $this->createUrl('homepageSettings/createBox/');?>" class="btn btn-default">
<a href="<?php echo $this->createUrl('homepageSettings/createBox/');?>" class="btn btn-default" style="margin-top: 10px;">
<span class="icon-add text-success"></span>
<?php eT("Create a new box");?>
</a>
<a href="<?php echo $this->createUrl('homepageSettings/resetAllBoxes/');?>" class="btn btn-danger" data-confirm="<?php eT('This will delete all current boxes to restore the default ones. Are you sure you want to continue?'); ?>">
<a href="<?php echo $this->createUrl('homepageSettings/resetAllBoxes/');?>" class="btn btn-danger" data-confirm="<?php eT('This will delete all current boxes to restore the default ones. Are you sure you want to continue?'); ?>" style="margin-top: 10px;">
<span class="fa fa-refresh"></span>
<?php eT("Reset to default boxes");?>
</a>
Expand Down
2 changes: 1 addition & 1 deletion application/views/homepageSettings/_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
// See class documentation of CActiveForm for details on this.
'enableAjaxValidation'=>false
)); ?>
<p class="note"><?php printf(gT('Fields with %s*%s are required.'),'<span class="required">','</span>'); ?></p>

<?php if($form->errorSummary($model)):?>
<div class="alert alert-danger" role="alert">
Expand Down Expand Up @@ -156,6 +155,7 @@
<?php endif;?>
</div>

<p class="note"><?php printf(gT('Fields with %s*%s are required.'),'<span class="required">','</span>'); ?></p>
<div class="form-group buttons">
<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save', array('class' => 'form-control hidden')); ?>
</div>
Expand Down
10 changes: 0 additions & 10 deletions application/views/homepageSettings/create.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,6 @@
?>
<div class="col-lg-12 list-surveys">

<?php $this->renderPartial('//admin/super/fullpagebar_view', array(
'fullpagebar' => array(
'savebutton' => array('form' => 'boxes-form'),
'saveandclosebutton' => array('form' => 'boxes-form'),
'closebutton' => array('url' => Yii::app()->createUrl('homepageSettings/index'))
)
)); ?>

<h3><?php eT('New box');?></h3>

<div class="row">
<div class="col-lg-12 content-right">

Expand Down
8 changes: 4 additions & 4 deletions application/views/layouts/fullpagebar_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,31 @@

<!-- Save -->
<?php if (isset($fullpagebar['savebutton']['form'])) :?>
<a class="btn btn-success" href="#" role="button" id="save-form-button" onclick="$(this).addClass('disabled').attr('onclick', 'return false;');" data-form-id="<?php echo $fullpagebar['savebutton']['form']; ?>">
<a class="btn btn-success" href="#" role="button" id="save-form-button" onclick="$(this).addClass('disabled').attr('onclick', 'return false;');" data-form-id="<?php echo $fullpagebar['savebutton']['form']; ?>" style="margin-top: 10px;">
<span class="fa fa-floppy-o"></span>
<?php eT("Save");?>
</a>
<?php endif;?>

<!-- Save and Close -->
<?php if (isset($fullpagebar['saveandclosebutton']['form'])) :?>
<a class="btn btn-default" href="#" role="button" id="save-and-close-form-button" onclick="$(this).addClass('disabled').attr('onclick', 'return false;');" data-form-id="<?php echo $fullpagebar['saveandclosebutton']['form']; ?>">
<a class="btn btn-default" href="#" role="button" id="save-and-close-form-button" onclick="$(this).addClass('disabled').attr('onclick', 'return false;');" data-form-id="<?php echo $fullpagebar['saveandclosebutton']['form']; ?>" style="margin-top: 10px;">
<span class="fa fa-saved"></span>
<?php eT("Save and close");?>
</a>
<?php endif; ?>

<!-- Close -->
<?php if (isset($fullpagebar['closebutton']['url'])) :?>
<a class="btn btn-danger" href="<?php echo $fullpagebar['closebutton']['url']; ?>" role="button">
<a class="btn btn-danger" href="<?php echo $fullpagebar['closebutton']['url']; ?>" role="button" style="margin-top: 10px;">
<span class="fa fa-close"></span>
<?php eT("Close");?>
</a>
<?php endif;?>

<!-- Box Buttons -->
<?php if (isset($fullpagebar['boxbuttons'])) :?>
<a href="<?php echo $this->createUrl('admin/homepagesettings/sa/create/');?>" class="btn btn-default" style="margin-top: 10px;">
<a href="<?php echo $this->createUrl('homepageSettings/createBox/');?>" class="btn btn-default" style="margin-top: 10px;">
<span class="icon-add text-success"></span>
<?php eT("Create a new box");?>
</a>
Expand Down

0 comments on commit 5f2eedd

Please sign in to comment.