improved policy apply feature

This commit is contained in:
SJ 2013-04-17 21:45:02 +02:00
parent b92431b0e1
commit caeb050af3
6 changed files with 23 additions and 12 deletions

View File

@ -23,12 +23,13 @@ class ControllerPolicyApply extends Controller {
system('sudo -n /etc/init.d/rc.piler reload', $val);
if($val === 0) {
print $lang->data['text_applied'];
$this->data['x'] = $lang->data['text_applied'];
} else {
print $lang->data['text_install_sudo_apply'];
$this->data['x'] = $lang->data['text_install_sudo_apply'];
}
$this->render();
}
}

View File

@ -107,6 +107,5 @@
<div>
<p><input type="button" class="btn btn-danger" onclick="Piler.reload_piler();" value="<?php print $text_apply_changes; ?>" /></p>
<span id="applyChangesOutput"></span>
<input type="button" class="btn btn-danger" onclick="Piler.reload_piler();" value="<?php print $text_apply_changes; ?>" /> <span id="applyChangesOutput"></span>
</div>

View File

@ -112,7 +112,6 @@
<div>
<p><input type="button" class="btn btn-danger" onclick="Piler.reload_piler();" value="<?php print $text_apply_changes; ?>" /></p>
<span id="applyChangesOutput"></span>
<input type="button" class="btn btn-danger" onclick="Piler.reload_piler();" value="<?php print $text_apply_changes; ?>" /> <span id="applyChangesOutput"></span>
</div>

View File

@ -0,0 +1,14 @@
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<h3 id="myModalLabel"><?php print $x; ?></h3>
</div>
<div class="modal-footer">
<button class="btn btn-primary" data-dismiss="modal" aria-hidden="true">OK</button>
</div>
</div>
<script>
$('#myModal').modal('show');
</script>

View File

@ -104,8 +104,7 @@
<?php } ?>
<div>
<p><input type="button" class="btn btn-danger" onclick="Piler.reload_piler();" value="<?php print $text_apply_changes; ?>" /></p>
<span id="applyChangesOutput"></span>
<div class="top20px">
<input type="button" class="btn btn-danger" onclick="Piler.reload_piler();" value="<?php print $text_apply_changes; ?>" /> <span id="applyChangesOutput"></span>
</div>

View File

@ -111,9 +111,8 @@
<div>
<p><input type="button" class="btn btn-danger" onclick="Piler.reload_piler();" value="<?php print $text_apply_changes; ?>" /></p>
<span id="applyChangesOutput"></span>
<div class="top20px">
<input type="button" class="btn btn-danger" onclick="Piler.reload_piler();" value="<?php print $text_apply_changes; ?>" /> <span id="applyChangesOutput"></span>
</div>