whitespace/codestyle. Also remove duplicate form iput runState which I think is left over from it being a popup
This commit is contained in:
parent
8405db4750
commit
ee015ee674
|
@ -18,79 +18,57 @@
|
||||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
//
|
//
|
||||||
|
|
||||||
if ( !canEdit( 'System' ) )
|
if ( !canEdit( 'System' ) ) {
|
||||||
{
|
$view = "error";
|
||||||
$view = "error";
|
return;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div id="modalState" class="modal fade">
|
<div id="modalState" class="modal fade">
|
||||||
<form class="form-horizontal" name="contentForm" id="contentForm" method="get" action="<?php echo $_SERVER['PHP_SELF'] ?>">
|
<form class="form-horizontal" name="contentForm" id="contentForm" method="get" action="<?php echo $_SERVER['PHP_SELF'] ?>">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||||
<h2 class="modal-title"><?php echo translate('RunState') ?></h2>
|
<h2 class="modal-title"><?php echo translate('RunState') ?></h2>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<input type="hidden" name="view" value="<?php echo $view ?>"/>
|
||||||
|
<input type="hidden" name="action" value="state"/>
|
||||||
|
<input type="hidden" name="apply" value="1"/>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="form-group">
|
||||||
<input type="hidden" name="view" value="<?php echo $view ?>"/>
|
<label for="runState" class="col-sm-3 control-label">Change State</label>
|
||||||
<input type="hidden" name="action" value="state"/>
|
<div class="col-sm-9">
|
||||||
<input type="hidden" name="apply" value="1"/>
|
<select id="runState" name="runState" class="form-control">
|
||||||
|
<?php if ( $running ) { ?>
|
||||||
<div class="form-group">
|
<option value="stop" selected="selected"><?php echo translate('Stop') ?></option>
|
||||||
<label for="runState" class="col-sm-3 control-label">Change State</label>
|
<option value="restart"><?php echo translate('Restart') ?></option>
|
||||||
<div class="col-sm-9">
|
<?php } else { ?>
|
||||||
<select id="runState" name="runState" class="form-control">
|
<option value="start" selected="selected"><?php echo translate('Start') ?></option>
|
||||||
<?php
|
<?php }
|
||||||
if ( $running )
|
|
||||||
{
|
|
||||||
?>
|
?>
|
||||||
<option value="stop" selected="selected"><?php echo translate('Stop') ?></option>
|
<?php foreach ( $states as $state ) { ?>
|
||||||
<option value="restart"><?php echo translate('Restart') ?></option>
|
<option value="<?php echo $state['Name'] ?>"><?php echo $state['Name'] ?></option>
|
||||||
<?php
|
<?php } ?>
|
||||||
}
|
</select>
|
||||||
else
|
</div><!--col-sm-9-->
|
||||||
{
|
</div><!--form-group-->
|
||||||
?>
|
<div class="form-group">
|
||||||
<option value="start" selected="selected"><?php echo translate('Start') ?></option>
|
<label for="newState" class="col-sm-3 control-label"><?php echo translate('NewState') ?></label>
|
||||||
<?php
|
<div class="col-sm-9">
|
||||||
}
|
|
||||||
?>
|
|
||||||
<?php
|
|
||||||
foreach ( $states as $state )
|
|
||||||
{
|
|
||||||
?>
|
|
||||||
<option value="<?php echo $state['Name'] ?>"><?php echo $state['Name'] ?></option>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="newState" class="col-sm-3 control-label"><?php echo translate('NewState') ?></label>
|
|
||||||
<div class="col-sm-9">
|
|
||||||
<input class="form-control" type="text" id="newState"/>
|
<input class="form-control" type="text" id="newState"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div> <!-- modal-body -->
|
||||||
</div> <!-- body -->
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button class="btn btn-primary" type="button" id="btnApply"><?php echo translate('Apply') ?></button>
|
<button class="btn btn-primary" type="button" id="btnApply"><?php echo translate('Apply') ?></button>
|
||||||
<button class="btn btn-primary" type="button" id="btnSave" disabled><?php echo translate('Save') ?></button>
|
<button class="btn btn-primary" type="button" id="btnSave" disabled><?php echo translate('Save') ?></button>
|
||||||
<button class="btn btn-danger" type="button" id="btnDelete" disabled><?php echo translate('Delete') ?></button>
|
<button class="btn btn-danger" type="button" id="btnDelete" disabled><?php echo translate('Delete') ?></button>
|
||||||
|
<input type="hidden" name="view" value="none"/>
|
||||||
<input type="hidden" name="view" value="none"/>
|
<input type="hidden" name="action" value="state"/>
|
||||||
<input type="hidden" name="action" value="state"/>
|
<p class="pull-left hidden" id="pleasewait"><?php echo translate('PleaseWait') ?></p>
|
||||||
<input type="hidden" name="runState" value="<?php echo validHtmlStr($_REQUEST['runState']) ?>"/>
|
</div><!-- footer -->
|
||||||
<p class="pull-left hidden" id="pleasewait"><?php echo translate('PleaseWait') ?></p>
|
</div> <!-- content -->
|
||||||
</div><!-- footer -->
|
</div> <!-- dialog -->
|
||||||
|
</form>
|
||||||
</div> <!-- content -->
|
|
||||||
</div> <!-- dialog -->
|
|
||||||
</form>
|
|
||||||
</div> <!-- state -->
|
</div> <!-- state -->
|
||||||
|
|
Loading…
Reference in New Issue