use sam layout as for managing categories

This commit is contained in:
Uwe Steinmann 2018-11-29 06:27:53 +01:00
parent e490c1a0f2
commit 34e934fb8f

View File

@ -117,6 +117,23 @@ $(document).ready( function() {
<?php <?php
} /* }}} */ } /* }}} */
function actionmenu() { /* {{{ */
$dms = $this->params['dms'];
$user = $this->params['user'];
$selcategoryid = $this->params['selcategoryid'];
if($selcategoryid && $selcategoryid > 0) {
?>
<form style="display: inline-block;" method="post" action="../op/op.DefaultKeywords.php" >
<?php echo createHiddenFieldWithKey('removecategory'); ?>
<input type="hidden" name="categoryid" value="<?php echo $selcategoryid?>">
<input type="hidden" name="action" value="removecategory">
<button class="btn" type="submit"><i class="icon-remove"></i> <?php echo getMLText("rm_default_keyword_category")?></button>
</form>
<?php
}
} /* }}} */
function form() { /* {{{ */ function form() { /* {{{ */
$dms = $this->params['dms']; $dms = $this->params['dms'];
$user = $this->params['user']; $user = $this->params['user'];
@ -129,30 +146,27 @@ $(document).ready( function() {
if(!$category) { if(!$category) {
?> ?>
<form class="form-inline" action="../op/op.DefaultKeywords.php" method="post" id="form"> <form class="form-horizontal" action="../op/op.DefaultKeywords.php" method="post" id="form">
<?php echo createHiddenFieldWithKey('addcategory'); ?> <?php echo createHiddenFieldWithKey('addcategory'); ?>
<input type="hidden" name="action" value="addcategory"> <input type="hidden" name="action" value="addcategory">
<?php printMLText("name");?>: <input type="text" class="name" name="name"> <?php
<input type="submit" class="btn" value="<?php printMLText("new_default_keyword_category"); ?>"> $this->formField(
getMLText("name"),
array(
'element'=>'input',
'type'=>'text',
'name'=>'name',
'value'=>''
)
);
$this->formSubmit("<i class=\"icon-save\"></i> ".getMLText('new_default_keyword_category'));
?>
</form> </form>
<?php <?php
} else { } else {
$owner = $category->getOwner(); $owner = $category->getOwner();
if ((!$user->isAdmin()) && ($owner->getID() != $user->getID())) return; if ((!$user->isAdmin()) && ($owner->getID() != $user->getID())) return;
?> ?>
<div class="control-group">
<label class="control-label"></label>
<div class="controls">
<form action="../op/op.DefaultKeywords.php" method="post">
<?php echo createHiddenFieldWithKey('removecategory'); ?>
<input type="Hidden" name="action" value="removecategory">
<input type="Hidden" name="categoryid" value="<?php echo $category->getID()?>">
<button type="submit" class="btn" title="<?php echo getMLText("delete")?>"><i class="icon-remove"></i> <?php printMLText("rm_default_keyword_category");?></button>
</form>
</div>
</div>
<div class="control-group"> <div class="control-group">
<label class="control-label"><?php echo getMLText("name")?>:</label> <label class="control-label"><?php echo getMLText("name")?>:</label>
<div class="controls"> <div class="controls">
@ -229,14 +243,10 @@ $(document).ready( function() {
?> ?>
<div class="row-fluid"> <div class="row-fluid">
<div class="span4"> <div class="span4">
<?php $this->contentContainerStart(); ?>
<form class="form-horizontal"> <form class="form-horizontal">
<div class="control-group"> <select class="chzn-select" id="selector" class="input-xlarge">
<label class="control-label" for="login"><?php printMLText("selection");?>:</label> <option value="-1"><?php echo getMLText("choose_category")?>
<div class="controls"> <option value="0"><?php echo getMLText("new_default_keyword_category")?>
<select id="selector" class="input-xlarge">
<option value="-1"><?php echo getMLText("choose_category")?>
<option value="0"><?php echo getMLText("new_default_keyword_category")?>
<?php <?php
$selected=0; $selected=0;
@ -252,10 +262,8 @@ $(document).ready( function() {
} }
?> ?>
</select> </select>
</div>
</div>
</form> </form>
<?php $this->contentContainerEnd(); ?> <div class="ajax" style="margin-bottom: 15px;" data-view="DefaultKeywords" data-action="actionmenu" <?php echo ($selcategoryid ? "data-query=\"categoryid=".$selcategoryid."\"" : "") ?>></div>
</div> </div>
<div class="span8"> <div class="span8">