Closed #35; various tweaks
- All form.aligned inputs got wrapped with special div for easy width control - Fixed edit jump bug
This commit is contained in:
parent
65df7f8752
commit
c6754e5866
16 changed files with 107 additions and 59 deletions
|
@ -62,10 +62,9 @@ retrievePost=anonymous
|
||||||
favoritePost=registered
|
favoritePost=registered
|
||||||
editPostSafety.own=registered
|
editPostSafety.own=registered
|
||||||
editPostSafety.all=moderator
|
editPostSafety.all=moderator
|
||||||
editPostTags.own=registered
|
editPostTags=registered
|
||||||
editPostTags.all=registered
|
editPostThumb=moderator
|
||||||
editPostThumb.own=moderator
|
editPostSource=moderator
|
||||||
editPostThumb.all=moderator
|
|
||||||
hidePost.own=moderator
|
hidePost.own=moderator
|
||||||
hidePost.all=moderator
|
hidePost.all=moderator
|
||||||
deletePost.own=moderator
|
deletePost.own=moderator
|
||||||
|
|
|
@ -1,35 +1,12 @@
|
||||||
form.auth {
|
form.auth {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
display: table;
|
|
||||||
border-collapse:separate;
|
|
||||||
border-spacing: 0 0.5em;
|
|
||||||
width: 400px;
|
width: 400px;
|
||||||
}
|
}
|
||||||
|
|
||||||
form.auth div {
|
|
||||||
display: table-row;
|
|
||||||
}
|
|
||||||
|
|
||||||
form.auth label.left {
|
form.auth label.left {
|
||||||
display: table-cell;
|
|
||||||
float: left;
|
|
||||||
width: 144px;
|
width: 144px;
|
||||||
}
|
}
|
||||||
|
|
||||||
form.auth input {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
form.auth input {
|
|
||||||
width: 156px;
|
|
||||||
padding: 5px;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
form.auth button {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
form.auth p {
|
form.auth p {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
|
|
|
@ -253,6 +253,16 @@ form.aligned input[type=checkbox] {
|
||||||
vertical-align: text-top;
|
vertical-align: text-top;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.input-wrapper {
|
||||||
|
overflow: hidden;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.input-wrapper ul.tagit,
|
||||||
|
.input-wrapper input,
|
||||||
|
.input-wrapper select {
|
||||||
|
width: 80%;
|
||||||
|
}
|
||||||
|
|
||||||
label {
|
label {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
@ -263,9 +273,11 @@ button {
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
font-size: 11pt;
|
font-size: 11pt;
|
||||||
}
|
}
|
||||||
|
ul.tagit,
|
||||||
select,
|
select,
|
||||||
input:not([type=radio]):not([type=checkbox]):not([type=file]) {
|
input:not([type=radio]):not([type=checkbox]):not([type=file]) {
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
ul.tagit input {
|
ul.tagit input {
|
||||||
border: 0 !important;
|
border: 0 !important;
|
||||||
|
|
|
@ -19,19 +19,19 @@ embed {
|
||||||
color: silver;
|
color: silver;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav {
|
#sidebar nav {
|
||||||
margin-bottom: 2em;
|
margin-bottom: 2em;
|
||||||
}
|
}
|
||||||
nav .left {
|
#sidebar nav .left {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
nav .right {
|
#sidebar nav .right {
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
nav a.disabled {
|
#sidebar nav a.disabled {
|
||||||
color: silver;
|
color: silver;
|
||||||
}
|
}
|
||||||
nav a.disabled i[class*='icon-'] {
|
#sidebar nav a.disabled i[class*='icon-'] {
|
||||||
background-color: silver;
|
background-color: silver;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -140,3 +140,7 @@ ul.tagit {
|
||||||
#theSubmit {
|
#theSubmit {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.post .form-wrapper {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
|
@ -40,10 +40,15 @@
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
form.aligned label.left {
|
form.edit label.left {
|
||||||
width: 10em;
|
width: 10em;
|
||||||
}
|
}
|
||||||
|
|
||||||
form.edit .alert {
|
form.edit .alert {
|
||||||
margin: 1em 0;
|
margin: 1em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
form.edit select,
|
||||||
|
form.edit input {
|
||||||
|
width: 16em;
|
||||||
|
}
|
||||||
|
|
|
@ -23,7 +23,8 @@ $(function()
|
||||||
$('.tags input').tagit(tagItOptions);
|
$('.tags input').tagit(tagItOptions);
|
||||||
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
$('form.edit-post').slideDown();
|
var formDom = $('form.edit-post');
|
||||||
|
formDom.show().css('height', formDom.height()).hide().slideDown();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -76,10 +76,12 @@ $(function()
|
||||||
var file = postDom.data('file');
|
var file = postDom.data('file');
|
||||||
var tags = postDom.find('[name=tags]').val();
|
var tags = postDom.find('[name=tags]').val();
|
||||||
var safety = postDom.find('[name=safety]:checked').val();
|
var safety = postDom.find('[name=safety]:checked').val();
|
||||||
|
var source = postDom.find('[name=source]').val();
|
||||||
var fd = new FormData();
|
var fd = new FormData();
|
||||||
fd.append('file', file);
|
fd.append('file', file);
|
||||||
fd.append('tags', tags);
|
fd.append('tags', tags);
|
||||||
fd.append('safety', safety);
|
fd.append('safety', safety);
|
||||||
|
fd.append('source', source);
|
||||||
|
|
||||||
var ajaxData =
|
var ajaxData =
|
||||||
{
|
{
|
||||||
|
|
|
@ -234,12 +234,15 @@ class PostController
|
||||||
$suppliedSafety = InputHelper::get('safety');
|
$suppliedSafety = InputHelper::get('safety');
|
||||||
$suppliedSafety = Model_Post::validateSafety($suppliedSafety);
|
$suppliedSafety = Model_Post::validateSafety($suppliedSafety);
|
||||||
|
|
||||||
|
|
||||||
/* tags */
|
/* tags */
|
||||||
$suppliedTags = InputHelper::get('tags');
|
$suppliedTags = InputHelper::get('tags');
|
||||||
$suppliedTags = Model_Post::validateTags($suppliedTags);
|
$suppliedTags = Model_Post::validateTags($suppliedTags);
|
||||||
$dbTags = Model_Tag::insertOrUpdate($suppliedTags);
|
$dbTags = Model_Tag::insertOrUpdate($suppliedTags);
|
||||||
|
|
||||||
|
/* source */
|
||||||
|
$suppliedSource = InputHelper::get('source');
|
||||||
|
$suppliedSource = Model_Post::validateSource($suppliedSource);
|
||||||
|
|
||||||
/* db storage */
|
/* db storage */
|
||||||
$dbPost = R::dispense('post');
|
$dbPost = R::dispense('post');
|
||||||
$dbPost->type = $postType;
|
$dbPost->type = $postType;
|
||||||
|
@ -249,6 +252,7 @@ class PostController
|
||||||
$dbPost->file_size = filesize($suppliedFile['tmp_name']);
|
$dbPost->file_size = filesize($suppliedFile['tmp_name']);
|
||||||
$dbPost->mime_type = $mimeType;
|
$dbPost->mime_type = $mimeType;
|
||||||
$dbPost->safety = $suppliedSafety;
|
$dbPost->safety = $suppliedSafety;
|
||||||
|
$dbPost->source = $suppliedSource;
|
||||||
$dbPost->hidden = false;
|
$dbPost->hidden = false;
|
||||||
$dbPost->upload_date = time();
|
$dbPost->upload_date = time();
|
||||||
$dbPost->image_width = $imageWidth;
|
$dbPost->image_width = $imageWidth;
|
||||||
|
@ -325,6 +329,17 @@ class PostController
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* source */
|
||||||
|
$suppliedSource = InputHelper::get('source');
|
||||||
|
if ($suppliedSource !== null)
|
||||||
|
{
|
||||||
|
PrivilegesHelper::confirmWithException(Privilege::EditPostSource, PrivilegesHelper::getIdentitySubPrivilege($post->uploader));
|
||||||
|
$suppliedSource = Model_Post::validateSource($suppliedSource);
|
||||||
|
$post->source = $suppliedSource;
|
||||||
|
$edited = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* db storage */
|
/* db storage */
|
||||||
if ($edited)
|
if ($edited)
|
||||||
R::store($post);
|
R::store($post);
|
||||||
|
|
|
@ -28,6 +28,18 @@ class Model_Post extends RedBean_SimpleModel
|
||||||
return $safety;
|
return $safety;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function validateSource($source)
|
||||||
|
{
|
||||||
|
$source = trim($source);
|
||||||
|
|
||||||
|
$maxLength = 100;
|
||||||
|
if (strlen($source) > $maxLength)
|
||||||
|
throw new SimpleException('Source must have at most ' . $maxLength . ' characters');
|
||||||
|
|
||||||
|
return $source;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static function validateTag($tag)
|
public static function validateTag($tag)
|
||||||
{
|
{
|
||||||
$tag = trim($tag);
|
$tag = trim($tag);
|
||||||
|
|
|
@ -9,6 +9,7 @@ class Privilege extends Enum
|
||||||
const EditPostSafety = 6;
|
const EditPostSafety = 6;
|
||||||
const EditPostTags = 7;
|
const EditPostTags = 7;
|
||||||
const EditPostThumb = 8;
|
const EditPostThumb = 8;
|
||||||
|
const EditPostSource = 26;
|
||||||
const HidePost = 9;
|
const HidePost = 9;
|
||||||
const DeletePost = 10;
|
const DeletePost = 10;
|
||||||
const FeaturePost = 25;
|
const FeaturePost = 25;
|
||||||
|
|
|
@ -6,12 +6,12 @@
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label class="left" for="name">User name:</label>
|
<label class="left" for="name">User name:</label>
|
||||||
<input id="name" name="name"/>
|
<div class="input-wrapper"><input id="name" name="name"/></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label class="left" for="password">Password:</label>
|
<label class="left" for="password">Password:</label>
|
||||||
<input type="password" id="password" name="password"/>
|
<div class="input-wrapper"><input type="password" id="password" name="password"/></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if (isset($this->context->transport->errorMessage)): ?>
|
<?php if (isset($this->context->transport->errorMessage)): ?>
|
||||||
|
|
|
@ -35,9 +35,11 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="post-template" class="post">
|
<div id="post-template" class="post">
|
||||||
<form action="<?php echo \Chibi\UrlHelper::route('post', 'upload') ?>" method="post">
|
<p class="alert alert-error">Some kind of error</p>
|
||||||
<p class="alert alert-error">Some kind of error</p>
|
|
||||||
|
|
||||||
|
<img class="thumbnail" src="<?php echo \Chibi\UrlHelper::absoluteUrl('/media/img/pixel.gif') ?>" alt="Thumbnail"/>
|
||||||
|
|
||||||
|
<div class="form-wrapper">
|
||||||
<div class="ops">
|
<div class="ops">
|
||||||
<a class="move-up-trigger">
|
<a class="move-up-trigger">
|
||||||
move up <span>↑</span>
|
move up <span>↑</span>
|
||||||
|
@ -52,8 +54,7 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<img class="thumbnail" src="<?php echo \Chibi\UrlHelper::absoluteUrl('/media/img/pixel.gif') ?>" alt="Thumbnail"/>
|
<form action="<?php echo \Chibi\UrlHelper::route('post', 'upload') ?>" method="post" class="aligned">
|
||||||
<div>
|
|
||||||
<div class="file-name">
|
<div class="file-name">
|
||||||
<label class="left">File:</label>
|
<label class="left">File:</label>
|
||||||
<strong>filename.jpg</strong>
|
<strong>filename.jpg</strong>
|
||||||
|
@ -68,11 +69,15 @@
|
||||||
|
|
||||||
<div class="tags">
|
<div class="tags">
|
||||||
<label class="left">Tags:</label>
|
<label class="left">Tags:</label>
|
||||||
<input type="text" name="tags" placeholder="enter some tags…"/>
|
<div class="input-wrapper"><input type="text" name="tags" placeholder="enter some tags…"/></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="clear"></div>
|
<div class="source">
|
||||||
</form>
|
<label class="left">Source:</label>
|
||||||
|
<div class="input-wrapper"><input type="text" name="source" placeholder="where did you get this from? (optional)"/></div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="upload-no-posts">
|
<div id="upload-no-posts">
|
||||||
|
|
|
@ -84,6 +84,13 @@
|
||||||
</div>
|
</div>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
|
<div class="key-value source">
|
||||||
|
<span class="key">Source:</span>
|
||||||
|
<span class="value" title="<?php echo $val = htmlspecialchars($this->context->transport->post->source) ?>">
|
||||||
|
<?php echo $val ?>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="permalink">
|
<div class="permalink">
|
||||||
<a href="<?php echo \Chibi\UrlHelper::route('post', 'retrieve', ['name' => $this->context->transport->post->name]) ?>" title="Download">
|
<a href="<?php echo \Chibi\UrlHelper::route('post', 'retrieve', ['name' => $this->context->transport->post->name]) ?>" title="Download">
|
||||||
<i class="icon-dl"></i>
|
<i class="icon-dl"></i>
|
||||||
|
@ -140,6 +147,7 @@
|
||||||
Privilege::EditPostSafety,
|
Privilege::EditPostSafety,
|
||||||
Privilege::EditPostTags,
|
Privilege::EditPostTags,
|
||||||
Privilege::EditPostThumb,
|
Privilege::EditPostThumb,
|
||||||
|
Privilege::EditPostSource,
|
||||||
];
|
];
|
||||||
$editPostPrivileges = array_fill_keys($editPostPrivileges, false);
|
$editPostPrivileges = array_fill_keys($editPostPrivileges, false);
|
||||||
foreach (array_keys($editPostPrivileges) as $privilege)
|
foreach (array_keys($editPostPrivileges) as $privilege)
|
||||||
|
@ -225,15 +233,22 @@
|
||||||
<?php if ($editPostPrivileges[Privilege::EditPostTags]): ?>
|
<?php if ($editPostPrivileges[Privilege::EditPostTags]): ?>
|
||||||
<div class="tags">
|
<div class="tags">
|
||||||
<label class="left" for="tags">Tags:</label>
|
<label class="left" for="tags">Tags:</label>
|
||||||
<input type="text" name="tags" id="tags" placeholder="enter some tags…" value="<?php echo join(',', array_map(function($tag) { return $tag->name; }, $this->context->transport->post->sharedTag)) ?>"/>
|
<div class="input-wrapper"><input type="text" name="tags" id="tags" placeholder="enter some tags…" value="<?php echo join(',', array_map(function($tag) { return $tag->name; }, $this->context->transport->post->sharedTag)) ?>"/></div>
|
||||||
</div>
|
</div>
|
||||||
<input type="hidden" name="tags-token" id="tags-token" value="<?php echo $this->context->transport->tagsToken ?>"/>
|
<input type="hidden" name="tags-token" id="tags-token" value="<?php echo $this->context->transport->tagsToken ?>"/>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
|
<?php if ($editPostPrivileges[Privilege::EditPostSource]): ?>
|
||||||
|
<div class="source">
|
||||||
|
<label class="left" for="source">Source:</label>
|
||||||
|
<div class="input-wrapper"><input type="text" name="source" id="suorce" value="<?php echo $this->context->transport->post->source ?>"/></div>
|
||||||
|
</div>
|
||||||
|
<?php endif ?>
|
||||||
|
|
||||||
<?php if ($editPostPrivileges[Privilege::EditPostThumb]): ?>
|
<?php if ($editPostPrivileges[Privilege::EditPostThumb]): ?>
|
||||||
<div class="thumb">
|
<div class="thumb">
|
||||||
<label class="left" for="thumb">Thumb:</label>
|
<label class="left" for="thumb">Thumb:</label>
|
||||||
<input type="file" name="thumb" id="thumb"/>
|
<div class="input-wrapper"><input type="file" name="thumb" id="thumb"/></div>
|
||||||
</div>
|
</div>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
|
|
|
@ -16,22 +16,22 @@
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label class="left" for="name">User name:</label>
|
<label class="left" for="name">User name:</label>
|
||||||
<input id="name" name="name" value="<?php echo $this->context->suppliedName ?>" placeholder="e.g. darth_vader" autocomplete="off"/>
|
<div class="input-wrapper"><input id="name" name="name" value="<?php echo $this->context->suppliedName ?>" placeholder="e.g. darth_vader" autocomplete="off"/></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label class="left" for="password1">Password:</label>
|
<label class="left" for="password1">Password:</label>
|
||||||
<input type="password" id="password1" name="password1" value="<?php echo $this->context->suppliedPassword1 ?>" placeholder="e.g. <?php echo str_repeat('●', 8) ?>" autocomplete="off"/>
|
<div class="input-wrapper"><input type="password" id="password1" name="password1" value="<?php echo $this->context->suppliedPassword1 ?>" placeholder="e.g. <?php echo str_repeat('●', 8) ?>" autocomplete="off"/></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label class="left" for="password2">Password (repeat):</label>
|
<label class="left" for="password2">Password (repeat):</label>
|
||||||
<input type="password" id="password2" name="password2" value="<?php echo $this->context->suppliedPassword2 ?>" placeholder="e.g. <?php echo str_repeat('●', 8) ?>" autocomplete="off"/>
|
<div class="input-wrapper"><input type="password" id="password2" name="password2" value="<?php echo $this->context->suppliedPassword2 ?>" placeholder="e.g. <?php echo str_repeat('●', 8) ?>" autocomplete="off"/></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label class="left" for="email">E-mail address:</label>
|
<label class="left" for="email">E-mail address:</label>
|
||||||
<input id="email" name="email" value="<?php echo $this->context->suppliedEmail ?>" placeholder="e.g. vader@empire.gov" autocomplete="off"/>
|
<div class="input-wrapper"><input id="email" name="email" value="<?php echo $this->context->suppliedEmail ?>" placeholder="e.g. vader@empire.gov" autocomplete="off"/></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -157,7 +157,7 @@
|
||||||
<?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="current-password">
|
||||||
<label class="left" for="current-password">Current password:</label>
|
<label class="left" for="current-password">Current password:</label>
|
||||||
<input type="password" name="current-password" id="current-password" placeholder="Current password"/>
|
<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 ?>
|
||||||
|
@ -165,32 +165,32 @@
|
||||||
<?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="nickname">
|
||||||
<label class="left" for="name">Name:</label>
|
<label class="left" for="name">Name:</label>
|
||||||
<input type="text" name="name" id="name" placeholder="New name…" value="<?php echo $this->context->suppliedName ?>"/>
|
<div class="input-wrapper"><input type="text" name="name" id="name" placeholder="New name…" 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="email">
|
||||||
<label class="left" for="name">E-mail:</label>
|
<label class="left" for="name">E-mail:</label>
|
||||||
<input type="text" name="email" id="email" placeholder="New e-mail…" value="<?php echo $this->context->suppliedEmail ?>"/>
|
<div class="input-wrapper"><input type="text" name="email" id="email" placeholder="New e-mail…" 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="password1">
|
||||||
<label class="left" for="password1">New password:</label>
|
<label class="left" for="password1">New password:</label>
|
||||||
<input type="password" name="password1" id="password1" placeholder="New password…" value="<?php echo $this->context->suppliedPassword1 ?>"/>
|
<div class="input-wrapper"><input type="password" name="password1" id="password1" placeholder="New password…" value="<?php echo $this->context->suppliedPassword1 ?>"/></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="password2">
|
<div class="password2">
|
||||||
<label class="left" for="password2"></label>
|
<label class="left" for="password2"></label>
|
||||||
<input type="password" name="password2" id="password2" placeholder="New password… (repeat)" value="<?php echo $this->context->suppliedPassword2 ?>"/>
|
<div class="input-wrapper"><input type="password" name="password2" id="password2" placeholder="New password… (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="access-rank">
|
||||||
<label class="left" for="access-rank">Access rank:</label>
|
<label class="left" for="access-rank">Access rank:</label>
|
||||||
<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 ?>
|
||||||
<?php if (($this->context->suppliedAccessRank != '' and $rank == $this->context->suppliedAccessRank) or ($this->context->suppliedAccessRank == '' and $rank == $this->context->transport->user->access_rank)): ?>
|
<?php if (($this->context->suppliedAccessRank != '' and $rank == $this->context->suppliedAccessRank) or ($this->context->suppliedAccessRank == '' and $rank == $this->context->transport->user->access_rank)): ?>
|
||||||
|
@ -201,7 +201,7 @@
|
||||||
<?php echo TextHelper::camelCaseToHumanCase(AccessRank::toString($rank)) ?>
|
<?php echo TextHelper::camelCaseToHumanCase(AccessRank::toString($rank)) ?>
|
||||||
</option>
|
</option>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</select>
|
</select></div>
|
||||||
</div>
|
</div>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
|
@ -223,7 +223,7 @@
|
||||||
<?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="current-password">
|
||||||
<label class="left" for="current-password">Current password:</label>
|
<label class="left" for="current-password">Current password:</label>
|
||||||
<input type="password" name="current-password" id="current-password" placeholder="Current password"/>
|
<div class="input-wrapper"><input type="password" name="current-password" id="current-password" placeholder="Current password"/></div>
|
||||||
</div>
|
</div>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue