1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-03-12 09:10:19 +01:00

Fix minori

This commit is contained in:
Luca 2019-07-30 16:51:33 +02:00
parent 48149dd6d6
commit 4d9d27e9da
7 changed files with 62 additions and 31 deletions

View File

@ -871,3 +871,7 @@ input.small-width {
list-style: none; list-style: none;
margin-left: 11px; margin-left: 11px;
} }
.progress .progress-bar span{
color:#000;
}

View File

@ -97,15 +97,15 @@ if (Auth::check()) {
} }
echo ' echo '
password: { password: {
"wordMinLength": "'.tr('La tua password è troppo corta').'", "wordMinLength": "'.tr('La password è troppo corta').'",
"wordMaxLength": "'.tr('La tua password è troppo lunga').'", "wordMaxLength": "'.tr('La password è troppo lunga').'",
"wordInvalidChar": "'.tr('La tua password contiene un carattere non valido').'", "wordInvalidChar": "'.tr('La password contiene un carattere non valido').'",
"wordNotEmail": "'.tr('Non usare la tua e-mail come password').'", "wordNotEmail": "'.tr('Non usare la tua e-mail come password').'",
"wordSimilarToUsername": "'.tr('La tua password non può contenere il tuo nome').'", "wordSimilarToUsername": "'.tr('La password non può contenere il tuo nome').'",
"wordTwoCharacterClasses": "'.tr('Usa classi di caratteri diversi').'", "wordTwoCharacterClasses": "'.tr('Usa classi di caratteri diversi').'",
"wordRepetitions": "'.tr('Troppe ripetizioni').'", "wordRepetitions": "'.tr('La password contiene ripetizioni').'",
"wordSequences": "'.tr('La tua password contiene sequenze').'", "wordSequences": "'.tr('La password contiene sequenze').'",
"errorList": "'.tr('Errori').':", "errorList": "'.tr('Attenzione').':",
"veryWeak": "'.tr('Molto debole').'", "veryWeak": "'.tr('Molto debole').'",
"weak": "'.tr('Debole').'", "weak": "'.tr('Debole').'",
"normal": "'.tr('Normale').'", "normal": "'.tr('Normale').'",
@ -338,7 +338,7 @@ if (Auth::check()) {
$user_photo = $user->photo; $user_photo = $user->photo;
if ($user_photo) { if ($user_photo) {
echo ' echo '
<img src="'.$user_photo.'" class="img-responsive" alt="'.$user['username'].'" />'; <img src="'.$user_photo.'" class="img-circle pull-left" alt="'.$user['username'].'" />';
} else { } else {
echo ' echo '
<i class="fa fa-user-circle-o fa-3x pull-left" alt="'.tr('OpenSTAManager').'"></i>'; <i class="fa fa-user-circle-o fa-3x pull-left" alt="'.tr('OpenSTAManager').'"></i>';

View File

@ -2,6 +2,12 @@
include_once __DIR__.'/../../core.php'; include_once __DIR__.'/../../core.php';
$user_photo = $user->photo;
if ($user_photo) {
echo '
<center><img src="'.$user_photo.'" class="img-responsive" alt="'.$user['username'].'" /></center>';
}
echo ' echo '
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">

View File

@ -25,7 +25,7 @@ $module = Modules::get('Utenti e permessi');
echo ' echo '
<div class="box box-widget widget-user"> <div class="box box-widget widget-user">
<div class="widget-user-header bg-yellow"> <div class="widget-user-header bg-'.(($theme!='default') ? $theme : 'primary').'">
<h3 class="widget-user-username">'.$user['username'].'</h3> <h3 class="widget-user-username">'.$user['username'].'</h3>
<h5 class="widget-user-desc">'.$user['gruppo'].'</h5> <h5 class="widget-user-desc">'.$user['gruppo'].'</h5>
</div> </div>
@ -35,7 +35,7 @@ echo '
$user_photo = $user->photo; $user_photo = $user->photo;
if ($user_photo) { if ($user_photo) {
echo ' echo '
<img src="'.$user_photo.'" class="img-responsive" alt="'.$user['username'].'" />'; <img src="'.$user_photo.'" class="img-circle" alt="'.$user['username'].'" />';
} else { } else {
echo ' echo '
<i class="fa fa-user-circle-o fa-4x pull-left" alt="'.tr('OpenSTAManager').'"></i>'; <i class="fa fa-user-circle-o fa-4x pull-left" alt="'.tr('OpenSTAManager').'"></i>';
@ -43,7 +43,6 @@ if ($user_photo) {
echo ' echo '
</div> </div>
<div class="box-footer"> <div class="box-footer">
<div class="row"> <div class="row">
<div class="col-sm-4 border-right"> <div class="col-sm-4 border-right">

View File

@ -42,11 +42,16 @@ if (!empty($user)) {
echo ' echo '
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
{[ "type": "checkbox", "label": "'.tr('Cambia password').'", "name": "change_password", "value": "1" ]} {[ "type": "checkbox", "label": "'.tr('Cambia password').'", "name": "change_password", "value": "0" ]}
</div> </div>
</div> </div>
<script> <script>
$(function() {
$("#password").attr("disabled", true);
$("#submit-button").attr("disabled", false).removeClass("disabled");
});
$("#change_password").change(function() { $("#change_password").change(function() {
if (this.checked) { if (this.checked) {
$("#password").attr("disabled", false); $("#password").attr("disabled", false);

View File

@ -82,7 +82,7 @@ class DefaultHandler implements HandlerInterface
*/ */
protected function password(&$values, &$extras) protected function password(&$values, &$extras)
{ {
$values['icon-after'] = '<i onclick="togglePassword_'.$values['id'].'()" class="fa clickable" id="'.$values['id'].'_toggle"></i>'; $values['icon-after'] = '<i onclick="togglePassword_'.$values['id'].'()" class="clickable fa" id="'.$values['id'].'_toggle"></i>';
$result = ' $result = '
<script> <script>
@ -122,7 +122,15 @@ class DefaultHandler implements HandlerInterface
}, },
progressBarExtraCssClasses: "progress-bar-striped active", progressBarExtraCssClasses: "progress-bar-striped active",
showPopover: true, showPopover: true,
showProgressBar: false,
popoverPlacement: "top",
showStatus: true,
showErrors: true, showErrors: true,
showVerdicts: true,
useVerdictCssClass: false,
showScore: false,
progressBarMinWidth: 50,
colorClasses: ["danger", "danger", "warning", "warning", "success", "success"],
}, },
i18n: { i18n: {
t: function (key) { t: function (key) {

View File

@ -26,7 +26,7 @@ class HTMLWrapper implements WrapperInterface
if (!empty($values['icon-before']) || !empty($values['icon-after']) || !empty($values['validation'])) { if (!empty($values['icon-before']) || !empty($values['icon-after']) || !empty($values['validation'])) {
$result .= ' $result .= '
<div class="input-group">'; <div class="input-group has-feedback">';
if (!empty($values['icon-before'])) { if (!empty($values['icon-before'])) {
$result .= ' $result .= '
@ -52,7 +52,7 @@ class HTMLWrapper implements WrapperInterface
if (!empty($values['validation'])) { if (!empty($values['validation'])) {
$result .= ' $result .= '
<span class="input-group-addon" id="'.$pseudo_id.'_validation"> <span class="input-group-addon after" id="'.$pseudo_id.'_validation">
<span class="tip" title="'.tr('Validazione').'"><i class="fa fa-question-circle "></i></span> <span class="tip" title="'.tr('Validazione').'"><i class="fa fa-question-circle "></i></span>
</span>'; </span>';
} }
@ -119,24 +119,33 @@ class HTMLWrapper implements WrapperInterface
}, },
success: function(data) { success: function(data) {
data = JSON.parse(data); data = JSON.parse(data);
if(data.result) { if (value == ""){
icon.attr("class", "fa fa-check"); parent.removeClass("has-success").removeClass("has-error");
parent.addClass("has-success").removeClass("has-error"); icon.attr("class", "fa fa-question-circle");
} else { message.tooltipster("content", "'.tr('Validazione').'");
icon.attr("class", "fa fa-close");
parent.addClass("has-error").removeClass("has-success");
} }
else{
if(data.result) {
icon.attr("class", "fa fa-check");
parent.addClass("has-success").removeClass("has-error");
} else {
icon.attr("class", "fa fa-close");
parent.addClass("has-error").removeClass("has-success");
}
message.tooltipster("content", data.message);
input.attr("valid", +(data.result));
message.tooltipster("content", data.message); if (data.fields) {
input.attr("valid", +(data.result)); fields = data.fields;
if (data.fields) { Object.keys(fields).forEach(function(element) {
fields = data.fields; $("[name=" + element + "]").val(fields[element]);
});
Object.keys(fields).forEach(function(element) { }
$("[name=" + element + "]").val(fields[element]);
});
} }
} }
}); });