cleanup removeme

This commit is contained in:
Mario Vavti 2015-03-04 11:01:16 +01:00
parent eceafd5777
commit 431a462d60
3 changed files with 33 additions and 23 deletions

View File

@ -9,6 +9,7 @@ function removeme_post(&$a) {
return;
if((! x($_POST,'qxz_password')) || (! strlen(trim($_POST['qxz_password']))))
notice( t('Password not correct.') . EOL);
return;
if((! x($_POST,'verify')) || (! strlen(trim($_POST['verify']))))
@ -21,6 +22,7 @@ function removeme_post(&$a) {
$account = $a->get_account();
if(! account_verify_password($account['account_email'],$_POST['qxz_password']))
notice( t('Password not correct.') . EOL);
return;
if($account['account_password_changed'] != NULL_DATE) {
@ -55,12 +57,12 @@ function removeme_content(&$a) {
'$basedir' => $a->get_baseurl(),
'$hash' => $hash,
'$title' => t('Remove This Channel'),
'$desc' => t('This will completely remove this channel from the network. Once this has been done it is not recoverable.'),
'$desc' => array(t('WARNING: '), t('This channel will be completely removed from the network. '), t('This action is permanent and can not be undone!')),
'$passwd' => t('Please enter your password for verification:'),
'$global' => array('global', t('Remove this channel and all its clones from the network'), false, t('By default only the instance of the channel located on this hub will be removed from the network')),
'$global' => array('global', t('Remove this channel and all its clones from the network'), false, t('By default only the instance of the channel located on this hub will be removed from the network'), array(t('No'),t('Yes'))),
'$submit' => t('Remove Channel')
));
return $o;
}
}

View File

@ -1941,6 +1941,16 @@ nav .dropdown-menu>li>a:hover,nav .dropdown-menu>li>a:focus{
border-radius: $radiuspx;
text-align: center;
}
.section-content-danger-wrapper {
padding: 21px 10px;
color: #a94442;
background-color: #f2dede;
margin-bottom: 3px;
border-radius: $radiuspx;
text-align: center;
}
.section-content-wrapper {
padding: 7px 10px;
background-color: $comment_item_colour;

View File

@ -1,22 +1,20 @@
<h1>{{$title}}</h1>
<div id="remove-account-wrapper">
<div id="remove-account-desc">{{$desc}}</div>
<form action="{{$basedir}}/removeme" autocomplete="off" method="post" >
<input type="hidden" name="verify" value="{{$hash}}" />
<div id="remove-account-pass-wrapper">
<label id="remove-account-pass-label" for="remove-account-pass">{{$passwd}}</label>
<input type="password" id="remove-account-pass" name="qxz_password" />
</div>
<div id="remove-account-pass-end"></div>
{{include file="field_checkbox.tpl" field=$global}}
<input type="submit" name="submit" value="{{$submit}}" />
</form>
<div class="generic-content-wrapper">
<div class="section-title-wrapper">
<h2>{{$title}}</h2>
</div>
<div class="section-content-danger-wrapper" id="remove-account-desc">
<strong>{{$desc.0}}</strong>{{$desc.1}}<strong>{{$desc.2}}</strong>
</div>
<div class="section-content-tools-wrapper">
<form action="{{$basedir}}/removeme" autocomplete="off" method="post" >
<input type="hidden" name="verify" value="{{$hash}}" />
<div class="form-group" id="remove-account-pass-wrapper">
<label id="remove-account-pass-label" for="remove-account-pass">{{$passwd}}</label>
<input class="form-control" type="password" id="remove-account-pass" name="qxz_password" />
</div>
{{include file="field_checkbox.tpl" field=$global}}
<button type="submit" name="submit" class="btn btn-danger">{{$submit}}</button>
</form>
</div>
</div>