Skip to content

Commit

Permalink
Form module style cleanup, along with the addition of a "notice" styl…
Browse files Browse the repository at this point in the history
…e for the message queue.
  • Loading branch information
illiphilli committed Mar 16, 2011
1 parent 5fe83c0 commit 4e33dcb
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 15 deletions.
1 change: 1 addition & 0 deletions datatypes/formbuilder_form.php
Expand Up @@ -58,6 +58,7 @@ function form($object) {

// Get User list
$userlist = array();
$defaults = array();
$users = exponent_users_getAllUsers();
foreach ($db->selectObjects('formbuilder_address','form_id='.$object->id.' and user_id != 0') as $address) {
$locuser = exponent_users_getUserById($address->user_id);
Expand Down
16 changes: 10 additions & 6 deletions framework/core/assets/css/msgq.css
Expand Up @@ -21,21 +21,25 @@ div.msg-queue.error {
border: 2px solid #ff0000;
color: #ff0000;
}

div.msg-queue.notice {
background: #f1e778;
border: 2px solid #c59207;
color: #c59207;
}

.msg-queue {
position:relative;
}

.msg-queue .close {
position:absolute;
top:5px;
right:5px;
top:3px;
right:3px;
display:block;
width:16px;
height:0px;
padding-top:16px;
overflow:hidden;
background:url(../images/exp-admin-sprite.png) no-repeat 0px -480px;
}
.msg-queue.error .close {
background:url(../images/exp-admin-sprite.png) no-repeat 0px -510px;
background:url(../images/exp-admin-sprite.png) no-repeat 0px -511px;
}
Binary file modified framework/core/assets/images/exp-admin-sprite.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion modules/formmodule/class.php
Expand Up @@ -130,7 +130,9 @@ function show($view,$loc = null) {
$template = new template("formmodule",$view,$loc);
$template->assign("moduletitle",$f->name);
$template->assign("description",$f->description);
$template->assign("formmsg",$formmsg);
if ($formmsg) {
flash('notice',$formmsg);
}
$template->assign("form_html",$form->toHTML($f->id));
$template->assign("form",$f);
$template->register_permissions(array("administrate","editform","editformsettings","editreport","viewdata","editdata","deletedata"),$loc);
Expand Down
14 changes: 6 additions & 8 deletions modules/formmodule/views/Default.tpl
Expand Up @@ -19,6 +19,7 @@
{/css}

<div class="formmodule default">
{messagequeue}
{permissions}
{if $permissions.viewdata == 1 && $form->is_saved == 1}<a class="addnew mngmntlink" href="{link action=view_data module=formbuilder id=$form->id}">{$_TR.view_data}</a>&nbsp;&nbsp;{/if}
{if $permissions.viewdata == 1 && $form->is_saved == 1}|&nbsp;&nbsp;<a class="addnew mngmntlink" href="{link action=export_csv module=formbuilder id=$form->id}">{$_TR.export_cvs}</a>&nbsp;&nbsp;
Expand All @@ -30,14 +31,11 @@
{if $permissions.editreport == 1}|&nbsp;&nbsp;<a class="addnew mngmntlink" href="{link action=edit_report module=formbuilder id=$form->id}">{$_TR.edit_report}</a>&nbsp;&nbsp;{/if}
{/permissions}
{if $moduletitle != ""}<h2>{$moduletitle}</h2>{/if}
{if $formmsg != "" }
{br}{br}
{$formmsg}
{/if}
{if $description != ""}
{$description}
{/if}
<div style="border: padding: 1em;">
<div class="bodycopy">
{$description}
{if $description != ""}
{$description}
{/if}
{$form_html}
</div>
</div>

0 comments on commit 4e33dcb

Please sign in to comment.