Form CSS overhaul

This commit is contained in:
Marcin Kurczewski 2014-02-16 16:03:13 +01:00
parent 80b9542c2d
commit 3e99a6336c
21 changed files with 224 additions and 264 deletions

View file

@ -1,30 +1,30 @@
form.auth { #content form {
margin: 0 auto; margin: 0 auto;
max-width: 400px; max-width: 400px;
} }
form.auth label.left { #content form label {
width: 35%; width: 35%;
} }
form.auth p { #content form p {
text-align: center; text-align: center;
margin: 10px 0; margin: 10px 0;
} }
form.auth .help { #content form .help {
opacity: .5; opacity: .5;
margin-top: 1em; margin-top: 1em;
font-size: small; font-size: small;
} }
form.auth .help p { #content form .help p {
margin: 0; margin: 0;
text-align: left; text-align: left;
} }
form.auth .help label+div { #content form .help label+div {
float: left; float: left;
} }
form.auth .help ul { #content form .help ul {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }

View file

@ -88,11 +88,10 @@ body {
} }
#top-nav li.search input { #top-nav li.search input {
border: 0; border: 0;
height: 20px; height: 28px;
line-height: 20px; line-height: 28px;
padding: 4px 10px; padding: 0 10px;
margin: 0; margin: 0;
box-sizing: content-box;
} }
#top-nav li.safety { #top-nav li.safety {
@ -237,42 +236,38 @@ a:hover i[class*='icon-'] {
form.aligned input, .form-row>label {
form.aligned button { display: inline-block;
vertical-align: text-top;
}
form.aligned label {
text-align: right; text-align: right;
vertical-align: middle; vertical-align: middle;
}
form.aligned label.left {
display: inline-block;
padding-right: 1em; padding-right: 1em;
width: 5em; width: 7em;
min-height: 1em; min-height: 1em;
float: left; float: left;
} }
form.aligned>div { label,
margin-bottom: 0.5em; input:not([type=radio]):not([type=checkbox]):not([type=file]),
clear: left; select,
} button {
form.aligned label, -webkit-box-sizing: border-box !important;
form.aligned input, -moz-box-sizing: border-box !important;
form.aligned select, box-sizing: border-box !important;
form.aligned button {
vertical-align: middle; vertical-align: middle;
line-height: 20px; line-height: 24px;
height: 34px;
} }
form.aligned label, label,
form.aligned input, input,
form.aligned select { select {
padding: 5px; padding: 5px;
font-family: inherit;
font-size: 11pt;
} }
form.aligned input[type=file] { input[type=file] {
padding: 5px 0; padding: 5px 0;
} }
form.aligned input[type=radio], input[type=radio],
form.aligned input[type=checkbox] { input[type=checkbox] {
width: auto; width: auto;
max-width: auto; max-width: auto;
margin: 0 10px 0 0; margin: 0 10px 0 0;
@ -280,51 +275,49 @@ form.aligned input[type=checkbox] {
vertical-align: middle; vertical-align: middle;
} }
button {
font-size: 12pt;
border-radius: 5px;
padding: 5px 15px;
-moz-box-sizing: border-box;
color: white;
background: hsl(205,70%,70%);
border: 0;
}
button:hover {
background-color: hsl(205,70%,60%);
cursor: pointer;
}
.form-row {
margin: 0.25em 0;
clear: left;
}
.input-wrapper { .input-wrapper {
overflow: hidden; overflow: hidden;
display: block; display: block;
} }
.input-wrapper ul.tagit,
.input-wrapper input,
.input-wrapper textarea,
.input-wrapper select {
width: 100%;
max-width: 100%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
label {
display: inline-block;
}
label,
input,
select,
button {
font-family: inherit;
font-size: 11pt;
}
ul.tagit, ul.tagit,
select, select,
textarea, textarea,
input:not([type=radio]):not([type=checkbox]):not([type=file]) { input:not([type=radio]):not([type=checkbox]):not([type=file]) {
width: 100%;
max-width: 100%;
border: 1px solid #ccc; border: 1px solid #ccc;
border-radius: 3px; border-radius: 5px;
}
ul.tagit {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
} }
ul.tagit input { ul.tagit input {
border: 0 !important; border: 0 !important;
} line-height: auto !important;
button { height: auto !important;
font-size: 115%; margin: -4px 0 !important;
padding: 0.2em 0.7em;
color: white;
background: cornflowerblue;
border: 0;
}
button:hover {
background-color: royalblue;
cursor: pointer;
} }
@ -368,7 +361,7 @@ button:hover {
border-style: solid; border-style: solid;
border-width: 1px; border-width: 1px;
max-width: 500px; max-width: 500px;
margin: 2em auto !important; margin: 2em auto;
} }
.alert-success { .alert-success {

View file

@ -4,8 +4,7 @@
#content input { #content input {
margin: 0 1em; margin: 0 1em;
height: 25px; max-width: 50%;
vertical-align: middle;
} }
pre { pre {

View file

@ -10,19 +10,20 @@
.form-wrapper { .form-wrapper {
text-align: center; text-align: center;
margin-bottom: 1em;
} }
.small-screen .form-wrapper { .small-screen .form-wrapper {
width: 100%; width: 100%;
} }
form.aligned { #content form {
margin: 0 auto; margin: 0 auto;
width: 24em; width: 24em;
text-align: left; text-align: left;
} }
form.aligned label.left { #content form label {
width: 7em; width: 9em;
} }
form h1 { #content form h1 {
display: none; display: none;
} }

View file

@ -34,19 +34,14 @@
margin-top: 0.5em; margin-top: 0.5em;
position: relative; position: relative;
} }
#url-handler input {
padding: 0.5em;
}
#url-handler .input-wrapper { #url-handler .input-wrapper {
margin-right: 7.5em; margin-right: 8.5em;
} }
#url-handler button { #url-handler button {
font-size: initial;
padding: 0.5em;
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 0;
width: 7em; width: 8em;
} }
.post .thumbnail { .post .thumbnail {
@ -119,19 +114,6 @@
font-size: 130%; font-size: 130%;
} }
.post label {
line-height: 33px;
}
.post label.left {
display: inline-block;
width: 60px;
padding-right: 10px;
float: left;
}
.post .safety label:not(.left) {
margin-right: 0.75em;
}
.post .file-name strong { .post .file-name strong {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@ -139,7 +121,7 @@
white-space: pre; white-space: pre;
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
line-height: 33px; padding: 0.5em 0;
} }
.safety-safe { .safety-safe {
@ -159,8 +141,15 @@ ul.tagit {
font-size: 1em; font-size: 1em;
} }
.submit-wrapper {
text-align: center;
}
#the-submit { #the-submit {
margin: 0 0 0 205px; margin: 0 auto;
font-size: 14.5pt;
padding: 0.35em 2em;
height: auto;
line-height: auto;
} }
.post .form-wrapper { .post .form-wrapper {

View file

@ -136,9 +136,6 @@ i.icon-dl {
.unit.edit-post { .unit.edit-post {
display: none; display: none;
} }
form.edit-post .safety label:not(.left) {
margin-right: 0.75em;
}
ul.tagit { ul.tagit {
display: block; display: block;
vertical-align: middle; vertical-align: middle;

View file

@ -17,22 +17,15 @@
} }
.form-wrapper { .form-wrapper {
width: 50%;
max-width: 24em; max-width: 24em;
display: inline-block;
text-align: center;
} }
.small-screen .form-wrapper { .small-screen .form-wrapper {
width: 100%; width: 100%;
} }
form.aligned { #content form label {
text-align: left; width: 9em;
margin: 0 auto;
} }
form.aligned label.left { #content form h1 {
width: 7em;
}
form h1 {
display: none; display: none;
} }

View file

@ -12,22 +12,12 @@
padding: 0; padding: 0;
} }
form.settings label.left, #content form {
form.delete label.left, max-width: 30em;
form.edit label.left {
width: 9em;
} }
#content form label {
form.settings .alert, width: 10em;
form.delete .alert, }
form.edit .alert { #content form .alert {
margin: 1em 0; margin: 1em 0;
} }
form.settings input,
form.delete input,
form.edit select,
form.edit input {
width: 16em;
max-width: 90%;
}

View file

@ -3,23 +3,21 @@ LayoutHelper::setSubTitle('authentication form');
LayoutHelper::addStylesheet('auth.css'); LayoutHelper::addStylesheet('auth.css');
?> ?>
<form action="<?php echo \Chibi\UrlHelper::route('auth', 'login') ?>" class="auth aligned" method="post"> <form action="<?php echo \Chibi\UrlHelper::route('auth', 'login') ?>" class="auth" method="post">
<div>
<p>If you don't have an account yet,<br/><a href="<?php echo \Chibi\UrlHelper::route('user', 'registration'); ?>">click here</a> to create a new one.</p> <p>If you don't have an account yet,<br/><a href="<?php echo \Chibi\UrlHelper::route('user', 'registration'); ?>">click here</a> to create a new one.</p>
</div>
<div> <div class="form-row">
<label class="left" for="name">User name:</label> <label for="name">User name:</label>
<div class="input-wrapper"><input type="text" id="name" name="name"/></div> <div class="input-wrapper"><input type="text" id="name" name="name"/></div>
</div> </div>
<div> <div class="form-row">
<label class="left" for="password">Password:</label> <label for="password">Password:</label>
<div class="input-wrapper"><input type="password" id="password" name="password"/></div> <div class="input-wrapper"><input type="password" id="password" name="password"/></div>
</div> </div>
<div> <div class="form-row">
<label class="left">&nbsp;</label> <label></label>
<div class="input-wrapper"> <div class="input-wrapper">
<button class="submit" type="submit">Log in</button> <button class="submit" type="submit">Log in</button>
&nbsp; &nbsp;
@ -35,8 +33,8 @@ LayoutHelper::addStylesheet('auth.css');
<input type="hidden" name="submit" value="1"/> <input type="hidden" name="submit" value="1"/>
<div class="help"> <div class="form-row help">
<label class="left">&nbsp;</label> <label></label>
<div> <div>
<p>Problems logging in?</p> <p>Problems logging in?</p>
<ul> <ul>

View file

@ -3,18 +3,18 @@ LayoutHelper::addStylesheet('comment-edit.css');
LayoutHelper::addScript('comment-edit.js'); LayoutHelper::addScript('comment-edit.js');
?> ?>
<form action="<?php echo \Chibi\UrlHelper::route('comment', 'add', ['postId' => $this->context->transport->post->id]) ?>" method="post" class="add-comment aligned"> <form action="<?php echo \Chibi\UrlHelper::route('comment', 'add', ['postId' => $this->context->transport->post->id]) ?>" method="post" class="add-comment">
<h1>add comment</h1> <h1>add comment</h1>
<div class="preview"></div> <div class="preview"></div>
<div class="text"> <div class="form-row text">
<div class="input-wrapper"><textarea name="text" cols="50" rows="3"></textarea></div> <div class="input-wrapper"><textarea name="text" cols="50" rows="3"></textarea></div>
</div> </div>
<input type="hidden" name="submit" value="1"/> <input type="hidden" name="submit" value="1"/>
<div> <div class="form-row">
<button name="sender" class="submit" type="submit" value="preview">Preview</button>&nbsp; <button name="sender" class="submit" type="submit" value="preview">Preview</button>&nbsp;
<button name="sender" class="submit" type="submit" value="submit">Submit</button> <button name="sender" class="submit" type="submit" value="submit">Submit</button>
</div> </div>

View file

@ -3,18 +3,18 @@ LayoutHelper::addStylesheet('comment-edit.css');
LayoutHelper::addScript('comment-edit.js'); LayoutHelper::addScript('comment-edit.js');
?> ?>
<form action="<?php echo \Chibi\UrlHelper::route('comment', 'edit', ['id' => $this->context->transport->comment->id]) ?>" method="post" class="edit-comment aligned"> <form action="<?php echo \Chibi\UrlHelper::route('comment', 'edit', ['id' => $this->context->transport->comment->id]) ?>" method="post" class="edit-comment">
<h1>edit comment</h1> <h1>edit comment</h1>
<div class="preview"></div> <div class="preview"></div>
<div class="text"> <div class="form-row text">
<div class="input-wrapper"><textarea name="text" cols="50" rows="3"><?php echo TextHelper::secureWhitespace($this->context->transport->comment->text) ?></textarea></div> <div class="input-wrapper"><textarea name="text" cols="50" rows="3"><?php echo TextHelper::secureWhitespace($this->context->transport->comment->text) ?></textarea></div>
</div> </div>
<input type="hidden" name="submit" value="1"/> <input type="hidden" name="submit" value="1"/>
<div> <div class="form-row">
<button name="sender" class="submit" type="submit" value="preview">Preview</button>&nbsp; <button name="sender" class="submit" type="submit" value="preview">Preview</button>&nbsp;
<button name="sender" class="submit" type="submit" value="submit">Submit</button> <button name="sender" class="submit" type="submit" value="submit">Submit</button>
</div> </div>

View file

@ -1,8 +1,9 @@
<form action="<?php echo \Chibi\UrlHelper::route('post', 'edit', ['id' => $this->context->transport->post->id]) ?>" method="post" enctype="multipart/form-data" class="edit-post aligned"> <form action="<?php echo \Chibi\UrlHelper::route('post', 'edit', ['id' => $this->context->transport->post->id]) ?>" method="post" enctype="multipart/form-data" class="edit-post">
<h1>edit post</h1> <h1>edit post</h1>
<?php if (PrivilegesHelper::confirm(Privilege::EditPostSafety, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->post->getUploader()))): ?> <?php if (PrivilegesHelper::confirm(Privilege::EditPostSafety, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->post->getUploader()))): ?>
<div class="safety"> <div class="form-row safety">
<label class="left">Safety:</label> <label>Safety:</label>
<div class="input-wrapper">
<?php foreach (PostSafety::getAll() as $safety): ?> <?php foreach (PostSafety::getAll() as $safety): ?>
<label> <label>
<input type="radio" name="safety" value="<?php echo $safety ?>" <?php if ($this->context->transport->post->safety == $safety) echo 'checked="checked"' ?>/> <input type="radio" name="safety" value="<?php echo $safety ?>" <?php if ($this->context->transport->post->safety == $safety) echo 'checked="checked"' ?>/>
@ -10,45 +11,46 @@
</label> </label>
<?php endforeach ?> <?php endforeach ?>
</div> </div>
</div>
<?php endif ?> <?php endif ?>
<?php if (PrivilegesHelper::confirm(Privilege::EditPostTags, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->post->getUploader()))): ?> <?php if (PrivilegesHelper::confirm(Privilege::EditPostTags, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->post->getUploader()))): ?>
<div class="tags"> <div class="form-row tags">
<label class="left" for="tags">Tags:</label> <label for="tags">Tags:</label>
<div class="input-wrapper"><input type="text" name="tags" id="tags" placeholder="enter some tags&hellip;" value="<?php echo join(',', array_map(function($tag) { return $tag->name; }, $this->context->transport->post->getTags())) ?>"/></div> <div class="input-wrapper"><input type="text" name="tags" id="tags" placeholder="enter some tags&hellip;" value="<?php echo join(',', array_map(function($tag) { return $tag->name; }, $this->context->transport->post->getTags())) ?>"/></div>
</div> </div>
<input type="hidden" name="edit-token" id="edit-token" value="<?php echo $this->context->transport->post->getEditToken() ?>"/> <input type="hidden" name="edit-token" id="edit-token" value="<?php echo $this->context->transport->post->getEditToken() ?>"/>
<?php endif ?> <?php endif ?>
<?php if (PrivilegesHelper::confirm(Privilege::EditPostSource, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->post->getUploader()))): ?> <?php if (PrivilegesHelper::confirm(Privilege::EditPostSource, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->post->getUploader()))): ?>
<div class="source"> <div class="form-row source">
<label class="left" for="source">Source:</label> <label for="source">Source:</label>
<div class="input-wrapper"><input type="text" name="source" id="source" value="<?php echo $this->context->transport->post->source ?>"/></div> <div class="input-wrapper"><input type="text" name="source" id="source" value="<?php echo $this->context->transport->post->source ?>"/></div>
</div> </div>
<?php endif ?> <?php endif ?>
<?php if (PrivilegesHelper::confirm(Privilege::EditPostRelations, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->post->getUploader()))): ?> <?php if (PrivilegesHelper::confirm(Privilege::EditPostRelations, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->post->getUploader()))): ?>
<div class="thumb"> <div class="form-row thumb">
<label class="left" for="relations">Relations:</label> <label for="relations">Relations:</label>
<div class="input-wrapper"><input type="text" name="relations" id="relations" placeholder="id1,id2,&hellip;" value="<?php echo join(',', array_map(function($post) { return $post->id; }, $this->context->transport->post->getRelations())) ?>"/></div> <div class="input-wrapper"><input type="text" name="relations" id="relations" placeholder="id1,id2,&hellip;" value="<?php echo join(',', array_map(function($post) { return $post->id; }, $this->context->transport->post->getRelations())) ?>"/></div>
</div> </div>
<?php endif ?> <?php endif ?>
<?php if (PrivilegesHelper::confirm(Privilege::EditPostFile, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->post->getUploader()))): ?> <?php if (PrivilegesHelper::confirm(Privilege::EditPostFile, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->post->getUploader()))): ?>
<div class="url"> <div class="form-row url">
<label class="left" for="url">File:</label> <label for="url">File:</label>
<div class="input-wrapper"><input type="text" name="url" id="url" placeholder="Some url&hellip;"/></div> <div class="input-wrapper"><input type="text" name="url" id="url" placeholder="Some url&hellip;"/></div>
</div> </div>
<div class="file"> <div class="form-row file">
<label class="left" for="file"></label> <label for="file"></label>
<div class="input-wrapper"><input type="file" name="file" id="file"/></div> <div class="input-wrapper"><input type="file" name="file" id="file"/></div>
</div> </div>
<?php endif ?> <?php endif ?>
<?php if (PrivilegesHelper::confirm(Privilege::EditPostThumb, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->post->getUploader()))): ?> <?php if (PrivilegesHelper::confirm(Privilege::EditPostThumb, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->post->getUploader()))): ?>
<div class="thumb"> <div class="form-row thumb">
<label class="left" for="thumb">Thumb:</label> <label for="thumb">Thumb:</label>
<div class="input-wrapper"> <div class="input-wrapper">
<input type="file" name="thumb" id="thumb"/> <input type="file" name="thumb" id="thumb"/>
<?php if ($this->context->transport->post->hasCustomThumb()): ?> <?php if ($this->context->transport->post->hasCustomThumb()): ?>
@ -60,8 +62,8 @@
<input type="hidden" name="submit" value="1"/> <input type="hidden" name="submit" value="1"/>
<div> <div class="form-row">
<label class="left">&nbsp;</label> <label></label>
<button class="submit" type="submit">Submit</button> <button class="submit" type="submit">Submit</button>
</div> </div>
</form> </form>

View file

@ -67,14 +67,15 @@ LayoutHelper::addScript('../lib/tagit/jquery.tagit.js');
</a> </a>
</div> </div>
<form action="<?php echo \Chibi\UrlHelper::route('post', 'upload') ?>" method="post" class="aligned"> <form action="<?php echo \Chibi\UrlHelper::route('post', 'upload') ?>" method="post">
<div class="file-name"> <div class="form-row file-name">
<label class="left">File:</label> <label>File:</label>
<strong>filename.jpg</strong> <strong>filename.jpg</strong>
</div> </div>
<div class="safety"> <div class="form-row safety">
<label class="left">Safety:</label> <label>Safety:</label>
<div class="input-wrapper">
<?php $checked = false ?> <?php $checked = false ?>
<?php foreach (PostSafety::getAll() as $safety): ?> <?php foreach (PostSafety::getAll() as $safety): ?>
<label> <label>
@ -88,16 +89,16 @@ LayoutHelper::addScript('../lib/tagit/jquery.tagit.js');
<input type="checkbox" name="anonymous" value="1"/> <input type="checkbox" name="anonymous" value="1"/>
Upload anonymously Upload anonymously
</label> </label>
</div>
</div> </div>
<div class="tags"> <div class="form-row tags">
<label class="left">Tags:</label> <label>Tags:</label>
<div class="input-wrapper"><input type="text" name="tags" placeholder="enter some tags&hellip;"/></div> <div class="input-wrapper"><input type="text" name="tags" placeholder="enter some tags&hellip;"/></div>
</div> </div>
<div class="source"> <div class="form-row source">
<label class="left">Source:</label> <label>Source:</label>
<div class="input-wrapper"><input type="text" name="source" placeholder="where did you get this from? (optional)"/></div> <div class="input-wrapper"><input type="text" name="source" placeholder="where did you get this from? (optional)"/></div>
</div> </div>

View file

@ -1,20 +1,21 @@
<div class="form-wrapper"> <div class="form-wrapper">
<form class="aligned" method="post" action="<?php echo \Chibi\UrlHelper::route('tag', 'mass-tag-redirect') ?>"> <form method="post" action="<?php echo \Chibi\UrlHelper::route('tag', 'mass-tag-redirect') ?>">
<h1>mass tag</h1> <h1>mass tag</h1>
<div>
<label class="left" for="mass-tag-query">Search query:</label> <div class="form-row">
<label for="mass-tag-query">Search query:</label>
<div class="input-wrapper"><input class="autocomplete" type="text" name="query" id="mass-tag-query" value="<?php echo isset($this->context->massTagQuery) ? $this->context->massTagQuery : '' ?>" data-autocomplete-url="<?php echo \Chibi\UrlHelper::route('tag', 'list') ?>"/></div> <div class="input-wrapper"><input class="autocomplete" type="text" name="query" id="mass-tag-query" value="<?php echo isset($this->context->massTagQuery) ? $this->context->massTagQuery : '' ?>" data-autocomplete-url="<?php echo \Chibi\UrlHelper::route('tag', 'list') ?>"/></div>
</div> </div>
<div> <div class="form-row">
<label class="left" for="mass-tag-tag">Tag:</label> <label for="mass-tag-tag">Tag:</label>
<div class="input-wrapper"><input class="autocomplete" type="text" name="tag" id="mass-tag-tag" value="<?php echo isset($this->context->massTagTag) ? $this->context->massTagTag : '' ?>" data-autocomplete-url="<?php echo \Chibi\UrlHelper::route('tag', 'list') ?>"/></div> <div class="input-wrapper"><input class="autocomplete" type="text" name="tag" id="mass-tag-tag" value="<?php echo isset($this->context->massTagTag) ? $this->context->massTagTag : '' ?>" data-autocomplete-url="<?php echo \Chibi\UrlHelper::route('tag', 'list') ?>"/></div>
</div> </div>
<input type="hidden" name="submit" value="1"/> <input type="hidden" name="submit" value="1"/>
<div> <div class="form-row">
<label class="left">&nbsp;</label> <label></label>
<button class="submit" type="submit">Tag!</button> <button class="submit" type="submit">Tag!</button>
</div> </div>
</form> </form>

View file

@ -1,20 +1,21 @@
<div class="form-wrapper"> <div class="form-wrapper">
<form class="aligned" method="post" action="<?php echo \Chibi\UrlHelper::route('tag', 'merge') ?>"> <form method="post" action="<?php echo \Chibi\UrlHelper::route('tag', 'merge') ?>">
<h1>merge tags</h1> <h1>merge tags</h1>
<div>
<label class="left" for="merge-source-tag">Source tag:</label> <div class="form-row">
<label for="merge-source-tag">Source tag:</label>
<div class="input-wrapper"><input class="autocomplete" type="text" name="source-tag" id="merge-source-tag" data-autocomplete-url="<?php echo \Chibi\UrlHelper::route('tag', 'list') ?>"/></div> <div class="input-wrapper"><input class="autocomplete" type="text" name="source-tag" id="merge-source-tag" data-autocomplete-url="<?php echo \Chibi\UrlHelper::route('tag', 'list') ?>"/></div>
</div> </div>
<div> <div class="form-row">
<label class="left" for="merge-target-tag">Target tag:</label> <label for="merge-target-tag">Target tag:</label>
<div class="input-wrapper"><input class="autocomplete" type="text" name="target-tag" id="merge-target-tag" data-autocomplete-url="<?php echo \Chibi\UrlHelper::route('tag', 'list') ?>"/></div> <div class="input-wrapper"><input class="autocomplete" type="text" name="target-tag" id="merge-target-tag" data-autocomplete-url="<?php echo \Chibi\UrlHelper::route('tag', 'list') ?>"/></div>
</div> </div>
<input type="hidden" name="submit" value="1"/> <input type="hidden" name="submit" value="1"/>
<div> <div class="form-row">
<label class="left">&nbsp;</label> <label></label>
<button class="submit" type="submit">Merge!</button> <button class="submit" type="submit">Merge!</button>
</div> </div>
</form> </form>

View file

@ -1,20 +1,21 @@
<div class="form-wrapper"> <div class="form-wrapper">
<form class="aligned simple-action" method="post" action="<?php echo \Chibi\UrlHelper::route('tag', 'rename') ?>"> <form method="post" action="<?php echo \Chibi\UrlHelper::route('tag', 'rename') ?>">
<h1>rename tags</h1> <h1>rename tags</h1>
<div>
<label class="left" for="rename-source-tag">Source tag:</label> <div class="form-row">
<label for="rename-source-tag">Source tag:</label>
<div class="input-wrapper"><input class="autocomplete" type="text" name="source-tag" id="rename-source-tag" data-autocomplete-url="<?php echo \Chibi\UrlHelper::route('tag', 'list') ?>"/></div> <div class="input-wrapper"><input class="autocomplete" type="text" name="source-tag" id="rename-source-tag" data-autocomplete-url="<?php echo \Chibi\UrlHelper::route('tag', 'list') ?>"/></div>
</div> </div>
<div> <div class="form-row">
<label class="left" for="rename-target-tag">Target tag:</label> <label for="rename-target-tag">Target tag:</label>
<div class="input-wrapper"><input type="text" name="target-tag" id="rename-target-tag"/></div> <div class="input-wrapper"><input type="text" name="target-tag" id="rename-target-tag"/></div>
</div> </div>
<input type="hidden" name="submit" value="1"/> <input type="hidden" name="submit" value="1"/>
<div> <div class="form-row">
<label class="left">&nbsp;</label> <label></label>
<button class="submit" type="submit">Rename!</button> <button class="submit" type="submit">Rename!</button>
</div> </div>
</form> </form>

View file

@ -1,7 +1,7 @@
<form action="<?php echo \Chibi\UrlHelper::route('user', 'delete', ['name' => $this->context->transport->user->name]) ?>" method="post" class="delete aligned confirmable" autocomplete="off" data-confirm-text="Are you sure you want to delete your account?"> <form action="<?php echo \Chibi\UrlHelper::route('user', 'delete', ['name' => $this->context->transport->user->name]) ?>" method="post" class="delete confirmable" autocomplete="off" data-confirm-text="Are you sure you want to delete your account?">
<?php if ($this->context->user->id == $this->context->transport->user->id): ?> <?php if ($this->context->user->id == $this->context->transport->user->id): ?>
<div class="current-password"> <div class="form-row current-password">
<label class="left" for="current-password">Current password:</label> <label for="current-password">Current password:</label>
<div class="input-wrapper"><input type="password" name="current-password" id="current-password" placeholder="Current password"/></div> <div class="input-wrapper"><input type="password" name="current-password" id="current-password" placeholder="Current password"/></div>
</div> </div>
<?php endif ?> <?php endif ?>
@ -10,8 +10,8 @@
<?php $this->renderFile('message') ?> <?php $this->renderFile('message') ?>
<div> <div class="form-row">
<label class="left">&nbsp;</label> <label></label>
<button class="submit" type="submit">Delete account</button> <button class="submit" type="submit">Delete account</button>
</div> </div>
</form> </form>

View file

@ -1,40 +1,40 @@
<form action="<?php echo \Chibi\UrlHelper::route('user', 'edit', ['name' => $this->context->transport->user->name]) ?>" method="post" class="edit aligned" autocomplete="off"> <form action="<?php echo \Chibi\UrlHelper::route('user', 'edit', ['name' => $this->context->transport->user->name]) ?>" method="post" class="edit" autocomplete="off">
<?php if ($this->context->user->id == $this->context->transport->user->id): ?> <?php if ($this->context->user->id == $this->context->transport->user->id): ?>
<div class="current-password"> <div class="form-row current-password">
<label class="left" for="current-password">Current password:</label> <label for="current-password">Current password:</label>
<div class="input-wrapper"><input type="password" name="current-password" id="current-password" placeholder="Current password"/></div> <div class="input-wrapper"><input type="password" name="current-password" id="current-password" placeholder="Current password"/></div>
</div> </div>
<hr> <hr>
<?php endif ?> <?php endif ?>
<?php if (PrivilegesHelper::confirm(Privilege::ChangeUserName, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->user))): ?> <?php if (PrivilegesHelper::confirm(Privilege::ChangeUserName, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->user))): ?>
<div class="nickname"> <div class="form-row nickname">
<label class="left" for="name">Name:</label> <label for="name">Name:</label>
<div class="input-wrapper"><input type="text" name="name" id="name" placeholder="New name&hellip;" value="<?php echo $this->context->suppliedName ?>"/></div> <div class="input-wrapper"><input type="text" name="name" id="name" placeholder="New name&hellip;" value="<?php echo $this->context->suppliedName ?>"/></div>
</div> </div>
<?php endif ?> <?php endif ?>
<?php if (PrivilegesHelper::confirm(Privilege::ChangeUserEmail, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->user))): ?> <?php if (PrivilegesHelper::confirm(Privilege::ChangeUserEmail, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->user))): ?>
<div class="email"> <div class="form-row email">
<label class="left" for="name">E-mail:</label> <label for="name">E-mail:</label>
<div class="input-wrapper"><input type="text" name="email" id="email" placeholder="New e-mail&hellip;" value="<?php echo $this->context->suppliedEmail ?>"/></div> <div class="input-wrapper"><input type="text" name="email" id="email" placeholder="New e-mail&hellip;" value="<?php echo $this->context->suppliedEmail ?>"/></div>
</div> </div>
<?php endif ?> <?php endif ?>
<?php if (PrivilegesHelper::confirm(Privilege::ChangeUserPassword, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->user))): ?> <?php if (PrivilegesHelper::confirm(Privilege::ChangeUserPassword, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->user))): ?>
<div class="password1"> <div class="form-row password1">
<label class="left" for="password1">New password:</label> <label for="password1">New password:</label>
<div class="input-wrapper"><input type="password" name="password1" id="password1" placeholder="New password&hellip;" value="<?php echo $this->context->suppliedPassword1 ?>"/></div> <div class="input-wrapper"><input type="password" name="password1" id="password1" placeholder="New password&hellip;" value="<?php echo $this->context->suppliedPassword1 ?>"/></div>
</div> </div>
<div class="password2"> <div class="form-row password2">
<label class="left" for="password2"></label> <label for="password2"></label>
<div class="input-wrapper"><input type="password" name="password2" id="password2" placeholder="New password&hellip; (repeat)" value="<?php echo $this->context->suppliedPassword2 ?>"/></div> <div class="input-wrapper"><input type="password" name="password2" id="password2" placeholder="New password&hellip; (repeat)" value="<?php echo $this->context->suppliedPassword2 ?>"/></div>
</div> </div>
<?php endif ?> <?php endif ?>
<?php if (PrivilegesHelper::confirm(Privilege::ChangeUserAccessRank, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->user))): ?> <?php if (PrivilegesHelper::confirm(Privilege::ChangeUserAccessRank, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->user))): ?>
<div class="access-rank"> <div class="form-row access-rank">
<label class="left" for="access-rank">Access rank:</label> <label for="access-rank">Access rank:</label>
<div class="input-wrapper"><select name="access-rank" id="access-rank"> <div class="input-wrapper"><select name="access-rank" id="access-rank">
<?php foreach (AccessRank::getAll() as $rank): ?> <?php foreach (AccessRank::getAll() as $rank): ?>
<?php if ($rank == AccessRank::Nobody) continue ?> <?php if ($rank == AccessRank::Nobody) continue ?>
@ -54,8 +54,8 @@
<?php $this->renderFile('message') ?> <?php $this->renderFile('message') ?>
<div> <div class="form-row">
<label class="left">&nbsp;</label> <label></label>
<button class="submit" type="submit">Submit</button> <button class="submit" type="submit">Submit</button>
</div> </div>
</form> </form>

View file

@ -9,43 +9,37 @@ LayoutHelper::setSubTitle('registration form');
LayoutHelper::addStylesheet('auth.css'); LayoutHelper::addStylesheet('auth.css');
?> ?>
<form action="<?php echo \Chibi\UrlHelper::route('auth', 'register') ?>" class="auth aligned" method="post"> <form action="<?php echo \Chibi\UrlHelper::route('auth', 'register') ?>" class="auth" method="post">
<div>
<p>Registered users can view more content,<br/>upload files and add posts to favorites.</p> <p>Registered users can view more content,<br/>upload files and add posts to favorites.</p>
</div>
<div> <div class="form-row">
<label class="left" for="name">User name:</label> <label for="name">User name:</label>
<div class="input-wrapper"><input type="text" id="name" name="name" value="<?php echo $this->context->suppliedName ?>" placeholder="e.g. darth_vader" autocomplete="off"/></div> <div class="input-wrapper"><input type="text" id="name" name="name" value="<?php echo $this->context->suppliedName ?>" placeholder="e.g. darth_vader" autocomplete="off"/></div>
</div> </div>
<div> <div class="form-row">
<label class="left" for="password1">Password:</label> <label for="password1">Password:</label>
<div class="input-wrapper"><input type="password" id="password1" name="password1" value="<?php echo $this->context->suppliedPassword1 ?>" placeholder="e.g. <?php echo str_repeat('&#x25cf;', 8) ?>" autocomplete="off"/></div> <div class="input-wrapper"><input type="password" id="password1" name="password1" value="<?php echo $this->context->suppliedPassword1 ?>" placeholder="e.g. <?php echo str_repeat('&#x25cf;', 8) ?>" autocomplete="off"/></div>
</div> </div>
<div> <div class="form-row">
<label class="left" for="password2">Password (repeat):</label> <label for="password2">Password (repeat):</label>
<div class="input-wrapper"><input type="password" id="password2" name="password2" value="<?php echo $this->context->suppliedPassword2 ?>" placeholder="e.g. <?php echo str_repeat('&#x25cf;', 8) ?>" autocomplete="off"/></div> <div class="input-wrapper"><input type="password" id="password2" name="password2" value="<?php echo $this->context->suppliedPassword2 ?>" placeholder="e.g. <?php echo str_repeat('&#x25cf;', 8) ?>" autocomplete="off"/></div>
</div> </div>
<div> <div class="form-row">
<label class="left" for="email">E-mail address:</label> <label for="email">E-mail address:</label>
<div class="input-wrapper"><input type="text" id="email" name="email" value="<?php echo $this->context->suppliedEmail ?>" placeholder="e.g. vader@empire.gov" autocomplete="off"/></div> <div class="input-wrapper"><input type="text" id="email" name="email" value="<?php echo $this->context->suppliedEmail ?>" placeholder="e.g. vader@empire.gov" autocomplete="off"/></div>
</div> </div>
<div>
<p id="email-info">Your e-mail will be used to show your <a href="http://gravatar.com/">Gravatar</a>.<br/>Leave blank for random Gravatar.</p> <p id="email-info">Your e-mail will be used to show your <a href="http://gravatar.com/">Gravatar</a>.<br/>Leave blank for random Gravatar.</p>
</div>
<div>
<?php $this->renderFile('message') ?> <?php $this->renderFile('message') ?>
</div>
<input type="hidden" name="submit" value="1"/> <input type="hidden" name="submit" value="1"/>
<div> <div class="form-row">
<label class="left"></label> <label></label>
<button class="submit" type="submit">Register</button> <button class="submit" type="submit">Register</button>
</div> </div>
</form> </form>

View file

@ -5,9 +5,9 @@
LayoutHelper::addStylesheet('auth.css'); LayoutHelper::addStylesheet('auth.css');
?> ?>
<form action="<?php echo \Chibi\UrlHelper::route($this->context->route->simpleControllerName, $this->context->route->simpleActionName) ?>" method="post" class="auth aligned" autocomplete="off"> <form action="<?php echo \Chibi\UrlHelper::route($this->context->route->simpleControllerName, $this->context->route->simpleActionName) ?>" method="post" class="auth" autocomplete="off">
<div> <div class="form-row">
<label class="left">User:</label> <label>User:</label>
<div class="input-wrapper"> <div class="input-wrapper">
<input name="name" placeholder="Name or e-mail address" type="text"/> <input name="name" placeholder="Name or e-mail address" type="text"/>
</div> </div>
@ -17,8 +17,8 @@
<?php $this->renderFile('message') ?> <?php $this->renderFile('message') ?>
<div> <div class="form-row">
<label class="left">&nbsp;</label> <label></label>
<button class="submit" type="submit">Continue</button> <button class="submit" type="submit">Continue</button>
</div> </div>
</form> </form>

View file

@ -1,6 +1,6 @@
<form action="<?php echo \Chibi\UrlHelper::route('user', 'settings', ['name' => $this->context->transport->user->name]) ?>" method="post" class="settings aligned"> <form action="<?php echo \Chibi\UrlHelper::route('user', 'settings', ['name' => $this->context->transport->user->name]) ?>" method="post" class="settings">
<div class="safety"> <div class="form-row safety">
<label class="left">Safety:</label> <label>Safety:</label>
<div class="input-wrapper"> <div class="input-wrapper">
<?php foreach (PostSafety::getAll() as $safety): ?> <?php foreach (PostSafety::getAll() as $safety): ?>
<?php if (PrivilegesHelper::confirm(Privilege::ListPosts, PostSafety::toString($safety))): ?> <?php if (PrivilegesHelper::confirm(Privilege::ListPosts, PostSafety::toString($safety))): ?>
@ -22,8 +22,8 @@
</div> </div>
</div> </div>
<div class="endless-scrolling"> <div class="form-row endless-scrolling">
<label class="left" for="endless-scrolling">Endless scrolling:</label> <label for="endless-scrolling">Endless scrolling:</label>
<div class="input-wrapper"> <div class="input-wrapper">
<label> <label>
<?php <?php
@ -41,8 +41,8 @@
</div> </div>
</div> </div>
<div class="post-tag-titles"> <div class="form-row post-tag-titles">
<label class="left" for="post-tag-titles">Tags in thumbs:</label> <label for="post-tag-titles">Tags in thumbs:</label>
<div class="input-wrapper"> <div class="input-wrapper">
<label> <label>
<?php <?php
@ -60,8 +60,8 @@
</div> </div>
</div> </div>
<div class="hide-disliked-posts"> <div class="form-row hide-disliked-posts">
<label class="left" for="hide-disliked-posts">Hide down-voted:</label> <label for="hide-disliked-posts">Hide down-voted:</label>
<div class="input-wrapper"> <div class="input-wrapper">
<label> <label>
<?php <?php
@ -83,8 +83,8 @@
<?php $this->renderFile('message') ?> <?php $this->renderFile('message') ?>
<div> <div class="form-row">
<label class="left">&nbsp;</label> <label></label>
<button class="submit" type="submit">Update settings</button> <button class="submit" type="submit">Update settings</button>
</div> </div>
</form> </form>