fixing fatal error after deleting server;

login screen: changing h2 to h3 and large buttons to medium;
tooltip: show on hover instead of focus;
changing styling of flashmessage (removing status text, adding icon, changing width);
changing shortcodes from info to success for some actions;
changing all php file permissions to 0644;
This commit is contained in:
Pepijn Over 2014-03-28 16:24:03 +01:00
parent 9866ab0c22
commit c7a3ba66c1
43 changed files with 43 additions and 27 deletions

0
cron/status.cron.php Executable file → Normal file
View File

0
index.php Executable file → Normal file
View File

0
install.php Executable file → Normal file
View File

0
src/bootstrap.php Executable file → Normal file
View File

0
src/includes/functions.inc.php Executable file → Normal file
View File

0
src/lang/bg_BG.lang.php Executable file → Normal file
View File

0
src/lang/de_DE.lang.php Executable file → Normal file
View File

0
src/lang/en_US.lang.php Executable file → Normal file
View File

0
src/lang/fr_FR.lang.php Executable file → Normal file
View File

0
src/lang/ko_KR.lang.php Executable file → Normal file
View File

0
src/lang/nl_NL.lang.php Executable file → Normal file
View File

0
src/lang/pt_BR.lang.php Executable file → Normal file
View File

23
src/psm/Module/AbstractController.class.php Executable file → Normal file
View File

@ -362,24 +362,33 @@ abstract class AbstractController implements ControllerInterface {
/**
* Add one or multiple message to the stack to be displayed to the user
* @param string|array $msg
* @param string $status success/warning/error
* @param string $shortcode info/success/warning/error
* @return \psm\Module\AbstractModule
*/
public function addMessage($msg, $status = 'info') {
public function addMessage($msg, $shortcode = 'info') {
if(!is_array($msg)) {
$msg = array($msg);
}
if($status == 'error') {
$shortcode = 'important';
} else {
$shortcode = $status;
switch($shortcode) {
case 'error':
$icon = 'exclamation-sign';
break;
case 'success':
$icon = 'ok-sign';
break;
case 'warning':
$icon = 'question-sign';
break;
default:
$icon = 'info-sign';
break;
}
foreach($msg as $m) {
$this->messages[] = array(
'message' => $m,
'status' => ($status == null) ? '' : strtoupper($status),
'shortcode' => $shortcode,
'icon' => $icon,
);
}
return $this;

0
src/psm/Module/Config/ConfigModule.class.php Executable file → Normal file
View File

View File

@ -164,7 +164,7 @@ class ConfigController extends AbstractController {
}
}
$this->addMessage(psm_get_lang('config', 'updated'));
$this->addMessage(psm_get_lang('config', 'updated'), 'success');
if($clean['language'] != psm_get_conf('language')) {
header('Location: ' . $_SERVER['REQUEST_URI']);

View File

0
src/psm/Module/Install/InstallModule.class.php Executable file → Normal file
View File

View File

View File

View File

@ -136,7 +136,7 @@ class ServerController extends AbstractServerController {
array('server_id' => $server_id)
);
if (empty($edit_server)) {
$this->addMessage('Invalid server id');
$this->addMessage('Invalid server id', 'error');
return $this->initializeAction('index');
}
@ -191,12 +191,12 @@ class ServerController extends AbstractServerController {
$clean,
array('server_id' => $server_id)
);
$this->addMessage(psm_get_lang('servers', 'updated'));
$this->addMessage(psm_get_lang('servers', 'updated'), 'success');
} else {
// add
$clean['status'] = 'on';
$this->db->save(PSM_DB_PREFIX.'servers', $clean);
$this->addMessage(psm_get_lang('servers', 'inserted'));
$this->addMessage(psm_get_lang('servers', 'inserted'), 'success');
}
}
$this->initializeAction('index');
@ -210,13 +210,14 @@ class ServerController extends AbstractServerController {
$id = intval($_GET['id']);
// do delete
$res = $this->db->delete(PSM_DB_PREFIX . 'servers', array('server_id' => $id));
if($res->rowCount() == 1) {
if($res == 1) {
$this->db->delete(PSM_DB_PREFIX.'log', array('server_id' => $id));
$this->db->delete(PSM_DB_PREFIX.'users_servers', array('server_id' => $id));
$this->db->delete(PSM_DB_PREFIX.'servers_uptime', array('server_id' => $id));
$this->db->delete(PSM_DB_PREFIX.'servers_history', array('server_id' => $id));
}
$this->addMessage(psm_get_lang('system', 'deleted'));
$this->addMessage(psm_get_lang('system', 'deleted'), 'success');
}
$this->initializeAction('index');
}

View File

View File

0
src/psm/Router.class.php Executable file → Normal file
View File

0
src/psm/Service/Database.class.php Executable file → Normal file
View File

0
src/psm/Service/Template.class.php Executable file → Normal file
View File

0
src/psm/Txtmsg/Clickatell.class.php Executable file → Normal file
View File

0
src/psm/Txtmsg/Core.class.php Executable file → Normal file
View File

0
src/psm/Txtmsg/Inetworx.class.php Executable file → Normal file
View File

0
src/psm/Txtmsg/Mollie.class.php Executable file → Normal file
View File

0
src/psm/Txtmsg/Mosms.class.php Executable file → Normal file
View File

0
src/psm/Txtmsg/Spryng.class.php Executable file → Normal file
View File

0
src/psm/Txtmsg/Textmarketer.php Executable file → Normal file
View File

0
src/psm/Txtmsg/TxtmsgInterface.class.php Executable file → Normal file
View File

0
src/psm/Util/Install/Installer.class.php Executable file → Normal file
View File

0
src/psm/Util/Mailer.class.php Executable file → Normal file
View File

0
src/psm/Util/Updater/Autorun.class.php Executable file → Normal file
View File

0
src/psm/Util/Updater/StatusNotifier.class.php Executable file → Normal file
View File

0
src/psm/Util/Updater/StatusUpdater.class.php Executable file → Normal file
View File

18
src/templates/login.tpl.html Normal file → Executable file
View File

@ -1,15 +1,15 @@
<!--%tpl_login-->
<div class="container">
<form class="form-signin" method="post">
<h2 class="form-signin-heading">{title_sign_in}</h2>
<h3 class="form-signin-heading">{title_sign_in}</h3>
<input type="text" name="user_name" class="input-block-level" placeholder="{label_username}" value="{value_user_name}" required>
<input type="password" name="user_password" class="input-block-level" placeholder="{label_password}" required>
<input type="hidden" name="action" value="login">
<label class="checkbox">
<input type="checkbox" name="user_rememberme" value="1" {value_rememberme}> {label_remember_me}
</label>
<button class="btn btn-large btn-primary" type="submit">{label_login}</button>
<a class="btn btn-large" href="?action=forgot">{label_password_forgot}</a>
<button class="btn btn-primary" type="submit">{label_login}</button>
<a class="btn" href="?action=forgot">{label_password_forgot}</a>
</form>
</div>
<!--%%tpl_login-->
@ -17,10 +17,10 @@
<!--%tpl_login_forgot-->
<div class="container">
<form class="form-signin" method="post">
<h2 class="form-signin-heading">{title_forgot}</h2>
<h3 class="form-signin-heading">{title_forgot}</h3>
<input type="text" name="user_name" class="input-block-level" placeholder="{label_username}" value="{value_user_name}" required>
<button class="btn btn-large btn-primary" type="submit">{label_submit}</button>
<a class="btn btn-large" href="?">{label_go_back}</a>
<button class="btn btn-primary" type="submit">{label_submit}</button>
<a class="btn" href="?">{label_go_back}</a>
</form>
</div>
<!--%%tpl_login_forgot-->
@ -28,12 +28,12 @@
<!--%tpl_login_reset-->
<div class="container">
<form class="form-signin" method="post">
<h2 class="form-signin-heading">{title_reset}</h2>
<h3 class="form-signin-heading">{title_reset}</h3>
<input type="text" name="user_name" class="input-block-level" placeholder="{label_username}" value="{value_user_name}" required disabled="disabled">
<input type="password" name="user_password_new" class="input-block-level" placeholder="{label_password}" required autocomplete="off">
<input type="password" name="user_password_repeat" class="input-block-level" placeholder="{label_password_repeat}" required autocomplete="off">
<button class="btn btn-large btn-primary" type="submit">{label_reset}</button>
<a class="btn btn-large" href="?">{label_go_back}</a>
<button class="btn btn-primary" type="submit">{label_reset}</button>
<a class="btn" href="?">{label_go_back}</a>
</form>
</div>
<!--%%tpl_login_reset-->

View File

@ -51,10 +51,10 @@
</div>
<div class="row-fluid">
<div class="span12">
<div id="flashmessage" class="alert alert-info hide">
<div id="flashmessage" class="hide">
<!--%tpl_repeat_messages-->
<div>
<p class="pull-left span1"><span class="label label-{shortcode}">{status}</span></p>
<div class="alert alert-{shortcode}">
<p class="pull-left span1"><i class="icon-{icon}"></i></p>
<p>{message}</p>
</div>
<!--%%tpl_repeat_messages-->

View File

@ -10,7 +10,7 @@ body {
.navbar-fixed-top .navbar-inner {
padding-left: 0;
padding-right: 0;
}
}
body.install{
padding-top:20px;
}
@ -82,4 +82,10 @@ legend{
line-height: 18px;
color: #333333;
white-space: nowrap;
}
#flashmessage {
max-width: 350px;
margin: auto;
margin-bottom: 18px;
}

View File

@ -8,7 +8,7 @@ function sm_delete(id, mod) {
function psm_tooltips() {
$('input[data-toggle="tooltip"]').tooltip({
'trigger':'focus',
'trigger':'hover',
'placement': 'right',
'container': 'body'
});

0
vendor/PHPMailer/class.phpmailer.php vendored Executable file → Normal file
View File