1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-06 05:07:49 +02:00

Frontend Improvements

This commit is contained in:
Awilum
2013-12-17 11:01:24 +02:00
parent 2fbb4c30c3
commit 2c3d224e62
6 changed files with 53 additions and 44 deletions

View File

@@ -1,5 +1,5 @@
<h2><?php echo __('New Snippet', 'snippets'); ?></h2>
<br />
<br>
<?php if (Notification::get('success')) Alert::success(Notification::get('success')); ?>
@@ -9,26 +9,30 @@
<?php echo (Form::hidden('csrf', Security::token())); ?>
<?php echo (Form::label('name', __('Name', 'snippets'))); ?>
<?php echo (Form::label('name', __('Name', 'snippets'))); ?>
<div class="input-group">
<?php echo (Form::input('name', $name, array('class' => (isset($errors['snippets_empty_name']) || isset($errors['snippets_exists'])) ? 'form-control error-field' : 'form-control'))); ?><span class="input-group-addon">.snippet.php</span>
</div>
<div class="input-append">
<?php echo (Form::input('name', $name, array('class' => (isset($errors['snippets_empty_name']) || isset($errors['snippets_exists'])) ? 'input-xxlarge error-field' : 'input-xxlarge'))); ?><span class="add-on">.snippet.php</span>
</div>
<?php
if (isset($errors['snippets_empty_name'])) echo '&nbsp;&nbsp;&nbsp;<span style="color:red">'.$errors['snippets_empty_name'].'</span>';
if (isset($errors['snippets_exists'])) echo '&nbsp;&nbsp;&nbsp;<span style="color:red">'.$errors['snippets_exists'].'</span>';
?>
<?php
if (isset($errors['snippets_empty_name'])) echo '&nbsp;&nbsp;&nbsp;<span style="color:red">'.$errors['snippets_empty_name'].'</span>';
if (isset($errors['snippets_exists'])) echo '&nbsp;&nbsp;&nbsp;<span style="color:red">'.$errors['snippets_exists'].'</span>';
?>
<br>
<?php
echo (
Form::label('content', __('Snippet content', 'snippets')).
Form::textarea('content', $content, array('style' => 'width:100%;height:400px;', 'class'=>'source-editor'))
);
?>
<?php
echo (
Html::br(2).
Form::label('content', __('Snippet content', 'snippets')).
Form::textarea('content', $content, array('style' => 'width:100%;height:400px;', 'class'=>'source-editor')).
Html::br(2).
Form::submit('add_snippets_and_exit', __('Save and Exit', 'snippets'), array('class' => 'btn')).Html::nbsp(2).
Form::submit('add_snippets_and_exit', __('Save and Exit', 'snippets'), array('class' => 'btn btn-primary')).Html::nbsp(2).
Form::submit('add_snippets', __('Save', 'snippets'), array('class' => 'btn')).
Form::close()
);
?>