Skip to content

Commit

Permalink
Merge pull request #43 from plegall/feature/42-compatibiliy-pwgstuffs
Browse files Browse the repository at this point in the history
fixes #42, compatibility with PWG Stuffs
  • Loading branch information
Philio authored Feb 7, 2017
2 parents b4f1c7e + 0c7fda6 commit 35c4d91
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 0 deletions.
34 changes: 34 additions & 0 deletions template/stuffs_blocks.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{foreach from=$blocks item=block key=key}
<div id="stuffs_block_{$block.ID}" class="content">
{if isset($block.TITLE)}
<nav class="navbar navbar-default" role="navigation">
<div class="container">
<div class="navbar-header">
<div class="navbar-brand">
{if isset($block.TITLE_URL)}
<a href="{$block.TITLE_URL}">{$block.TITLE}</a>
{else}
{$block.TITLE}
{/if}
</div>
</div>
<div class="navbar-right">
<ul class="nav navbar-nav">
{if !empty($block.U_EDIT)}
<li>
<a href="{$block.U_EDIT}" title="{'edit'|translate}">
<span class="glyphicon glyphicon-pencil"></span><span class="glyphicon-text">{'edit'|@translate}</span>
</a>
</li>
{/if}
</ul>
</div>
</div>
</nav>
{/if}

<div class="container">
{include file=$block.TEMPLATE}
</div>
</div>
{/foreach}
59 changes: 59 additions & 0 deletions template/stuffs_logon.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{include file='infos_errors.tpl'}

<form action="{$block.F_LOGIN_ACTION}" method="post" name="login_form" class="form-horizontal">
<div class="panel panel-primary">
<div class="panel-heading">
{'Connection settings'|@translate}
</div>
<div class="panel-body">
<div class="form-group">
<label for="username" class="col-sm-2 control-label">{'Username'|@translate}</label>
<div class="col-sm-4">
<input tabindex="1" class="form-control" type="text" name="username" id="username" maxlength="40" placeholder="{'Username'|@translate}">
</div>
</div>
<div class="form-group">
<label for="password" class="col-sm-2 control-label">{'Password'|@translate}</label>
<div class="col-sm-4">
<input tabindex="2" class="form-control" type="password" name="password" id="password" maxlength="25" placeholder="{'Password'|@translate}">
</div>
</div>
{if $authorize_remembering }
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<div class="checkbox">
<label>
<input tabindex="3" type="checkbox" name="remember_me" id="remember_me" value="1"> {'Auto login'|@translate}
</label>
</div>
</div>
</div>
{/if}
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<input type="hidden" name="redirect" value="{$smarty.server.REQUEST_URI|@urlencode}">
<input tabindex="4" type="submit" name="login" value="{'Submit'|@translate}" class="btn btn-default btn-primary">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
{if isset($block.U_REGISTER)}
<a href="{$block.U_REGISTER}" title="{'Register'|@translate}" class="pwg-state-default pwg-button">
<span class="glyphicon glyphicon-user"></span> {'Register'|@translate}
</a>
{/if}
&nbsp;&nbsp;&nbsp;
{if isset($block.U_LOST_PASSWORD)}
<a href="{$block.U_LOST_PASSWORD}" title="{'Forgot your password?'|@translate}" class="pwg-state-default pwg-button">
<span class="glyphicon glyphicon-lock"></span> {'Forgot your password?'|@translate}
</a>
{/if}
</div>
</div>
</div>
</div>
</form>

<script type="text/javascript"><!--
document.getElementById('username').focus();
//--></script>

0 comments on commit 35c4d91

Please sign in to comment.