more preparations for update to bootstrap 4

use functions instead of plain html in views
This commit is contained in:
Uwe Steinmann 2018-04-26 08:50:44 +02:00
parent 7fd33d07d0
commit d87981a204
13 changed files with 183 additions and 220 deletions

View File

@ -310,9 +310,9 @@ $(document).ready( function() {
</div>
<div class="span6">
<div class="well">
<?php $this->contentContainerStart(); ?>
<div class="ajax" data-view="AttributeMgr" data-action="form" <?php echo ($selattrdef ? "data-query=\"attrdefid=".$selattrdef->getID()."\"" : "") ?>></div>
</div>
<?php $this->contentContainerEnd(); ?>
</div>
</div>

View File

@ -144,7 +144,7 @@ $(document).ready( function() {
$this->contentHeading(getMLText("global_document_categories"));
?>
<div class="row-fluid">
<div class="span4">
<div class="span6">
<form class="form-horizontal">
<select class="chzn-select" id="selector" class="input-xlarge">
<option value="-1"><?php echo getMLText("choose_category")?>
@ -160,11 +160,10 @@ $(document).ready( function() {
<div class="ajax" data-view="Categories" data-action="info" <?php echo ($selcat ? "data-query=\"categoryid=".$selcat->getID()."\"" : "") ?>></div>
</div>
<div class="span8">
<div class="well">
<div class="span6">
<?php $this->contentContainerStart(); ?>
<div class="ajax" data-view="Categories" data-action="form" <?php echo ($selcat ? "data-query=\"categoryid=".$selcat->getID()."\"" : "") ?>></div>
</div>
<?php $this->contentContainerEnd(); ?>
</div>
</div>

View File

@ -210,11 +210,11 @@ $(document).ready( function() {
echo "<div class=\"span3\">\n";
$this->contentHeading(getMLText("chart_selection"));
echo "<div class=\"well\">\n";
$this->contentContainerStart();
foreach(array('docsperuser', 'sizeperuser', 'docspermimetype', 'docspercategory', 'docsperstatus', 'docspermonth', 'docsaccumulated') as $atype) {
echo "<div><a href=\"?type=".$atype."\">".getMLText('chart_'.$atype.'_title')."</a></div>\n";
}
echo "</div>\n";
$this->contentContainerEnd();
echo "</div>\n";
if(in_array($type, array('docspermonth', 'docsaccumulated'))) {
@ -223,18 +223,18 @@ $(document).ready( function() {
echo "<div class=\"span6\">\n";
}
$this->contentHeading(getMLText('chart_'.$type.'_title'));
echo "<div class=\"well\">\n";
$this->contentContainerStart();
?>
<div id="chart" style="height: 400px;" class="chart"></div>
<?php
echo "</div>\n";
$this->contentContainerEnd();
echo "</div>\n";
if(!in_array($type, array('docspermonth', 'docsaccumulated'))) {
echo "<div class=\"span3\">\n";
$this->contentHeading(getMLText('legend'));
echo "<div class=\"well\" id=\"legend\">\n";
echo "</div>\n";
$this->contentContainerStart('', 'legend');
$this->contentContainerEnd();
echo "</div>\n";
}

View File

@ -50,15 +50,15 @@ class SeedDMS_View_DashBoard extends SeedDMS_Bootstrap_Style {
<div class="row-fluid">
<div class="span12">
<?php $this->contentHeading('Gruppen'); ?>
<div class="well">
<?php $this->contentContainerStart(); ?>
Hier eine Übersicht der Gruppen, auf die der Anwender zugreifen darf.
</div>
<?php $this->contentContainerEnd(); ?>
</div>
<div>
<div class="row-fluid">
<div class="span4">
<?php $this->contentHeading('Lesezeichen'); ?>
<div class="well">
<?php $this->contentContainerStart(); ?>
<table class="table"><thead>
<tr>
<th></th>
@ -73,20 +73,20 @@ class SeedDMS_View_DashBoard extends SeedDMS_Bootstrap_Style {
<td>Admin</td><td>freigegeben</td></tr>
</tbody>
</table>
</div>
<?php $this->contentContainerEnd(); ?>
<?php $this->contentHeading('Neue Dokumente'); ?>
<div class="well">
</div>
<?php $this->contentContainerStart(); ?>
<?php $this->contentContainerEnd(); ?>
<?php $this->contentHeading('Dokumente zur Prüfung'); ?>
<div class="well">
</div>
<?php $this->contentContainerStart(); ?>
<?php $this->contentContainerEnd(); ?>
<?php $this->contentHeading('Dokumente zur Genehmigung'); ?>
<div class="well">
</div>
<?php $this->contentContainerStart(); ?>
<?php $this->contentContainerEnd(); ?>
</div>
<div class="span4">
<?php $this->contentHeading('Neue Beiträge im Wiki'); ?>
<div class="well">
<?php $this->contentContainerStart(); ?>
<table class="table"><thead>
<tr>
<th></th>
@ -101,15 +101,15 @@ class SeedDMS_View_DashBoard extends SeedDMS_Bootstrap_Style {
<td>H. Huber</td><td>28.11.2013</td></tr>
</tbody>
</table>
</div>
<?php $this->contentContainerEnd(); ?>
<?php $this->contentHeading('Zuletzt bearbeitet'); ?>
<div class="well">
</div>
<?php $this->contentContainerStart(); ?>
<?php $this->contentContainerEnd(); ?>
</div>
<div class="span4">
<?php $this->contentHeading('Neue Beiträge im Diskussionsforum'); ?>
<div class="well">
</div>
<?php $this->contentContainerStart(); ?>
<?php $this->contentContainerEnd(); ?>
</div>
</div>

View File

@ -229,7 +229,7 @@ $(document).ready( function() {
?>
<div class="row-fluid">
<div class="span4">
<div class="well">
<?php $this->contentContainerStart(); ?>
<form class="form-horizontal">
<div class="control-group">
<label class="control-label" for="login"><?php printMLText("selection");?>:</label>
@ -255,14 +255,14 @@ $(document).ready( function() {
</div>
</div>
</form>
</div>
<?php $this->contentContainerEnd(); ?>
</div>
<div class="span8">
<div class="well">
<?php $this->contentContainerStart(); ?>
<div class="ajax" data-view="DefaultKeywords" data-action="form" <?php echo ($selcategoryid ? "data-query=\"categoryid=".$selcategoryid."\"" : "") ?>></div>
</div>
</div>
<?php $this->contentContainerEnd(); ?>
</div>
<?php

View File

@ -300,9 +300,9 @@ $(document).ready( function() {
</div>
<div class="span8">
<div class="well">
<?php $this->contentContainerStart(); ?>
<div class="ajax" data-view="GroupMgr" data-action="form" <?php echo ($selgroup ? "data-query=\"groupid=".$selgroup->getID()."\"" : "") ?>></div>
</div>
<?php $this->contentContainerEnd(); ?>
</div>
</div>

View File

@ -179,17 +179,17 @@ class SeedDMS_View_Statistic extends SeedDMS_Bootstrap_Style {
$this->contentHeading(getMLText("folders_and_documents_statistic"));
echo "<div class=\"row-fluid\">\n";
echo "<div class=\"span8\">\n";
echo "<div class=\"well\">\n";
$this->contentContainerStart();
print "<ul>\n";
$this->printFolder($rootfolder);
print "</ul>\n";
echo "</div>\n";
$this->contentContainerEnd();
echo "</div>\n";
echo "<div class=\"span4\">\n";
echo "<div class=\"well\">\n";
$this->contentContainerStart();
print "<legend>".getMLText("legend")."</legend>\n";
print "<ul class=\"unstyled\">\n";
print "<li><span style=\"color:black\">".getMLText("access_inheritance")." </span></li>";
@ -208,7 +208,7 @@ class SeedDMS_View_Statistic extends SeedDMS_Bootstrap_Style {
print "</ul>\n";
echo "</div>\n";
$this->contentContainerEnd();
echo "</div>\n";
echo "</div>\n";

View File

@ -232,43 +232,40 @@ div.timeline-event-selected {
echo "<div class=\"span3\">\n";
$this->contentHeading(getMLText("timeline"));
echo "<div class=\"well\">\n";
$this->contentContainerStart();
?>
<form action="../out/out.Timeline.php" class="form form-inline" name="form1" id="form1">
<div class="control-group">
<label class="control-label" for="startdate"><?php printMLText('date') ?></label>
<div class="controls">
<span class="input-append date" style="display: inline;" id="fromdate" data-date="<?php echo date('Y-m-d', $from); ?>" data-date-format="yyyy-mm-dd" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
<input type="text" class="input-small" name="fromdate" value="<?php echo date('Y-m-d', $from); ?>"/>
<?php
$html = '
<span class="input-append date" style="display: inline;" id="fromdate" data-date="'.date('Y-m-d', $from).'" data-date-format="yyyy-mm-dd" data-date-language="'.str_replace('_', '-', $this->params['session']->getLanguage()).'">
<input type="text" class="input-small" name="fromdate" value="'.date('Y-m-d', $from).'"/>
<span class="add-on"><i class="icon-calendar"></i></span>
</span> -
<span class="input-append date" style="display: inline;" id="todate" data-date="<?php echo date('Y-m-d', $to); ?>" data-date-format="yyyy-mm-dd" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
<input type="text" class="input-small" name="todate" value="<?php echo date('Y-m-d', $to); ?>"/>
<span class="input-append date" style="display: inline;" id="todate" data-date="'.date('Y-m-d', $to).'" data-date-format="yyyy-mm-dd" data-date-language="'.str_replace('_', '-', $this->params['session']->getLanguage()).'">
<input type="text" class="input-small" name="todate" value="'.date('Y-m-d', $to).'"/>
<span class="add-on"><i class="icon-calendar"></i></span>
</span>
</div>
</div>
<div class="control-group">
<label class="control-label" for="skip"><?php printMLText('exclude_items') ?></label>
<div class="controls">
<input type="checkbox" name="skip[]" value="add_file" <?php echo ($skip && in_array('add_file', $skip)) ? 'checked' : '' ?>> <?php printMLText('timeline_skip_add_file') ?><br />
<input type="checkbox" name="skip[]" value="status_change_0" <?php echo ($skip && in_array('status_change_0', $skip)) ? 'checked' : '' ?>> <?php printMLText('timeline_skip_status_change_0') ?><br />
<input type="checkbox" name="skip[]" value="status_change_1" <?php echo ($skip && in_array('status_change_1', $skip)) ? 'checked' : '' ?>> <?php printMLText('timeline_skip_status_change_1') ?><br />
<input type="checkbox" name="skip[]" value="status_change_2" <?php echo ($skip && in_array('status_change_2', $skip)) ? 'checked' : '' ?>> <?php printMLText('timeline_skip_status_change_2') ?><br />
<input type="checkbox" name="skip[]" value="status_change_3" <?php echo ($skip && in_array('status_change_3', $skip)) ? 'checked' : '' ?>> <?php printMLText('timeline_skip_status_change_3') ?><br />
<input type="checkbox" name="skip[]" value="status_change_-1" <?php echo ($skip && in_array('status_change_-1', $skip)) ? 'checked' : '' ?>> <?php printMLText('timeline_skip_status_change_-1') ?><br />
<input type="checkbox" name="skip[]" value="status_change_-3" <?php echo ($skip && in_array('status_change_-3', $skip)) ? 'checked' : '' ?>> <?php printMLText('timeline_skip_status_change_-3') ?><br />
</div>
</div>
<div class="control-group">
<label class="control-label" for="enddate"></label>
<div class="controls">
<button id="update" type="_submit" class="btn"><i class="icon-search"></i> <?php printMLText("update"); ?></button>
</div>
</div>
</span>';
$this->formField(
getMLText("date"),
$html
);
$html = '
<input type="checkbox" name="skip[]" value="add_file" '.(($skip && in_array('add_file', $skip)) ? 'checked' : '').'> '.getMLText('timeline_skip_add_file').'<br />
<input type="checkbox" name="skip[]" value="status_change_0" '.(($skip && in_array('status_change_0', $skip)) ? 'checked' : '').'> '.getMLText('timeline_skip_status_change_0').'<br />
<input type="checkbox" name="skip[]" value="status_change_1" '.(($skip && in_array('status_change_1', $skip)) ? 'checked' : '').'> '.getMLText('timeline_skip_status_change_1').'<br />
<input type="checkbox" name="skip[]" value="status_change_2" '.(($skip && in_array('status_change_2', $skip)) ? 'checked' : '').'> '.getMLText('timeline_skip_status_change_2').'<br />
<input type="checkbox" name="skip[]" value="status_change_3" '.(($skip && in_array('status_change_3', $skip)) ? 'checked' : '').'> '.getMLText('timeline_skip_status_change_3').'<br />
<input type="checkbox" name="skip[]" value="status_change_-1" '.(($skip && in_array('status_change_-1', $skip)) ? 'checked' : '').'> '.getMLText('timeline_skip_status_change_-1').'<br />
<input type="checkbox" name="skip[]" value="status_change_-3" '.(($skip && in_array('status_change_-3', $skip)) ? 'checked' : '').'> '.getMLText('timeline_skip_status_change_-3').'<br />';
$this->formField(
getMLText("exclude_items"),
$html
);
$this->formSubmit('<i class="icon-search"></i> '.getMLText('update'), 'update');
?>
</form>
<?php
echo "</div>\n";
$this->contentContainerEnd();
echo "<div class=\"ajax\" data-view=\"Timeline\" data-action=\"iteminfo\" ></div>";
echo "</div>\n";

View File

@ -77,15 +77,12 @@ $(document).ready(function() {
?>
<div class="row-fluid">
<div class="span4">
<div class="well">
<?php $this->contentContainerStart(); ?>
<form class="form-horizontal">
<div class="control-group">
<label class="control-label" for="login"><?php printMLText("selection");?>:</label>
<div class="controls">
<select id="selector">
<option value="-1"><?php echo getMLText("choose_category")?>
<option value="0"><?php echo getMLText("new_default_keyword_category")?>
<?php
$html = '<select id="selector">
<option value="-1">'.getMLText("choose_category").'
<option value="0">'.getMLText("new_default_keyword_category");
$selected=0;
$count=2;
@ -95,33 +92,32 @@ $(document).ready(function() {
if ($owner->getID() != $user->getID()) continue;
if (isset($_GET["categoryid"]) && $category->getID()==$_GET["categoryid"]) $selected=$count;
print "<option value=\"".$category->getID()."\">" . htmlspecialchars($category->getName());
$html .= "<option value=\"".$category->getID()."\">" . htmlspecialchars($category->getName())."</option>";
$count++;
}
$html .= '</select>';
$this->formField(
getMLText("selection"),
$html
);
?>
</select>
</div>
</div>
</form>
</div>
<?php $this->contentContainerEnd(); ?>
</div>
<div class="span8">
<div class="well">
<?php $this->contentContainerStart(); ?>
<div id="keywords0" style="display : none;">
<form class="form-horizontal" action="../op/op.UserDefaultKeywords.php" method="post" name="addcategory">
<input type="hidden" name="action" value="addcategory">
<div class="control-group">
<label class="control-label"><?php printMLText("name");?>:</label>
<div class="controls">
<input type="text" name="name">
</div>
</div>
<div class="controls">
<input type="submit" class="btn" value="<?php printMLText("new_default_keyword_category"); ?>">
</div>
<?php
$this->formField(
getMLText("name"),
'<input type="text" name="name">'
);
$this->formSubmit(getMLText("new_default_keyword_category"));
?>
</form>
</div>
<?php
@ -192,7 +188,7 @@ $(document).ready(function() {
</div>
<?php } ?>
</div>
<?php $this->contentContainerEnd(); ?>
</div>
</div>

View File

@ -528,10 +528,10 @@ $(document).ready( function() {
</div>
<div class="span8">
<div class="well">
<?php $this->contentContainerStart(); ?>
<div class="ajax" data-view="UsrMgr" data-action="form" <?php echo ($seluser ? "data-query=\"userid=".$seluser->getID()."\"" : "") ?>></div>
</div>
</div>
<?php $this->contentContainerEnd(); ?>
</div>
<?php

View File

@ -103,9 +103,7 @@ $(document).ready( function() {
function showWorkflowActionForm($action) { /* {{{ */
if($action) {
if($action->isUsed()) {
?>
<p><?php echo getMLText('workflow_action_in_use') ?></p>
<?php
$this->infoMsg(getMLText('workflow_action_in_use'));
} else {
?>
<form class="form-inline" action="../op/op.RemoveWorkflowAction.php" method="post">
@ -117,6 +115,7 @@ $(document).ready( function() {
}
}
?>
<?php $this->contentContainerStart(); ?>
<form action="../op/op.WorkflowActionsMgr.php" method="post" class="form-horizontal">
<?php
if($action) {
@ -131,20 +130,14 @@ $(document).ready( function() {
<input type="hidden" name="action" value="addworkflowaction">
<?php
}
$this->formField(
getMLText("workflow_action_name"),
'<input type="text" id="name" name="name" value="'.($action ? htmlspecialchars($action->getName()) : '').'">'
);
$this->formSubmit('<i class="icon-save"></i> '.getMLText("save"));
?>
<div class="control-group">
<label class="control-label" for="login"><?php printMLText("workflow_action_name");?>:</label>
<div class="controls">
<input type="text" id="name" name="name" value="<?php print $action ? htmlspecialchars($action->getName()) : '';?>">
</div>
</div>
<div class="control-group">
<label class="control-label" for="login"></label>
<div class="controls">
<button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save")?></button>
</div>
</div>
</form>
<?php $this->contentContainerEnd(); ?>
<?php
} /* }}} */
@ -169,35 +162,32 @@ $(document).ready( function() {
?>
<div class="row-fluid">
<div class="span4">
<div class="well">
<form class="form-horizontal">
<div class="control-group">
<label class="control-label" for="login"><?php printMLText("selection");?>:</label>
<div class="controls">
<select id="selector" class="span9">
<option value="-1"><?php echo getMLText("choose_workflow_action")?>
<option value="0"><?php echo getMLText("add_workflow_action")?>
<div class="span4">
<?php $this->contentContainerStart(); ?>
<form class="form-horizontal">
<?php
$html = '<select id="selector" class="span9">
<option value="-1">'.getMLText("choose_workflow_action").'</option>
<option value="0">'.getMLText("add_workflow_action").'</option>';
foreach ($workflowactions as $currWorkflowAction) {
print "<option value=\"".$currWorkflowAction->getID()."\" ".($selworkflowaction && $currWorkflowAction->getID()==$selworkflowaction->getID() ? 'selected' : '').">" . htmlspecialchars($currWorkflowAction->getName());
$html .= "<option value=\"".$currWorkflowAction->getID()."\" ".($selworkflowaction && $currWorkflowAction->getID()==$selworkflowaction->getID() ? 'selected' : '').">" . htmlspecialchars($currWorkflowAction->getName());
}
$html .= '</select>';
$this->formField(
getMLText("selection"),
$html
);
?>
</select>
</div>
</form>
<?php $this->contentContainerEnd(); ?>
<div class="ajax" data-view="WorkflowActionsMgr" data-action="info" <?php echo ($selworkflowaction ? "data-query=\"workflowactionid=".$selworkflowaction->getID()."\"" : "") ?>></div>
</div>
</form>
</div>
<div class="ajax" data-view="WorkflowActionsMgr" data-action="info" <?php echo ($selworkflowaction ? "data-query=\"workflowactionid=".$selworkflowaction->getID()."\"" : "") ?>></div>
</div>
<div class="span8">
<div class="well">
<div class="span8">
<div class="ajax" data-view="WorkflowActionsMgr" data-action="form" <?php echo ($selworkflowaction ? "data-query=\"workflowactionid=".$selworkflowaction->getID()."\"" : "") ?>></div>
</div>
</div>
</div>
<?php
$this->contentEnd();
$this->htmlEndPage();

View File

@ -134,7 +134,7 @@ $(document).ready(function() {
}
}
?>
<div class="well">
<?php $this->contentContainerStart(); ?>
<form class="form-horizontal" action="../op/op.WorkflowMgr.php" method="post" enctype="multipart/form-data">
<?php
if($workflow) {
@ -159,35 +159,27 @@ $(document).ready(function() {
</div>
<?php
}
$this->formField(
getMLText("workflow_name"),
'<input type="text" id="name" name="name" value="'.($workflow ? htmlspecialchars($workflow->getName()) : '').'">'
);
$html = '
<select name="initstate">';
foreach($workflowstates as $workflowstate) {
$html .= "<option value=\"".$workflowstate->getID()."\"";
if($workflow && $workflow->getInitState()->getID() == $workflowstate->getID())
$html .= " selected=\"selected\"";
$html .= ">".htmlspecialchars($workflowstate->getName())."</option>\n";
}
$html .= '</select>';
$this->formField(
getMLText("workflow_initstate"),
$html
);
$this->formSubmit('<i class="icon-save"></i> '.getMLText("save"));
?>
<div class="control-group">
<label class="control-label"><?php printMLText("workflow_name");?>:</label>
<div class="controls">
<input type="text" name="name" value="<?php print ($workflow ? htmlspecialchars($workflow->getName()) : "");?>">
</div>
</div>
<div class="control-group">
<label class="control-label"><?php printMLText("workflow_initstate");?>:</label>
<div class="controls">
<select name="initstate">
<?php
foreach($workflowstates as $workflowstate) {
echo "<option value=\"".$workflowstate->getID()."\"";
if($workflow && $workflow->getInitState()->getID() == $workflowstate->getID())
echo " selected=\"selected\"";
echo ">".htmlspecialchars($workflowstate->getName())."</option>\n";
}
?>
</select>
</div>
</div>
<div class="controls">
<button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save")?></button>
</div>
</form>
</div>
<?php $this->contentContainerEnd(); ?>
<?php
if($workflow) {
$actions = $dms->getAllWorkflowActions();
@ -320,31 +312,30 @@ $(document).ready(function() {
?>
<div class="row-fluid">
<div class="span5">
<div class="well">
<form class="form-horizontal">
<div class="control-group">
<label class="control-label" for="login"><?php printMLText("selection");?>:</label>
<div class="controls">
<select id="selector" class="span9">
<option value="-1"><?php echo getMLText("choose_workflow")?>
<option value="0"><?php echo getMLText("add_workflow")?>
<div class="span5">
<?php $this->contentContainerStart(); ?>
<form class="form-horizontal">
<?php
$html = '<select id="selector" class="span9">
<option value="-1">'.getMLText("choose_workflow").'</option>
<option value="0">'.getMLText("add_workflow").'</option>';
foreach ($workflows as $currWorkflow) {
print "<option value=\"".$currWorkflow->getID()."\" ".($selworkflow && $currWorkflow->getID()==$selworkflow->getID() ? 'selected' : '').">" . htmlspecialchars($currWorkflow->getName());
$html .= "<option value=\"".$currWorkflow->getID()."\" ".($selworkflow && $currWorkflow->getID()==$selworkflow->getID() ? 'selected' : '').">" . htmlspecialchars($currWorkflow->getName());
}
$html .= '</select>';
$this->formField(
getMLText("selection"),
$html
);
?>
</select>
</div>
</form>
<?php $this->contentContainerEnd(); ?>
<div class="ajax" data-view="WorkflowMgr" data-action="info" <?php echo ($selworkflow ? "data-query=\"workflowid=".$selworkflow->getID()."\"" : "") ?>></div>
</div>
</form>
</div>
<div class="ajax" data-view="WorkflowMgr" data-action="info" <?php echo ($selworkflow ? "data-query=\"workflowid=".$selworkflow->getID()."\"" : "") ?>></div>
</div>
<div class="span7">
<div class="span7">
<div class="ajax" data-view="WorkflowMgr" data-action="form" <?php echo ($selworkflow ? "data-query=\"workflowid=".$selworkflow->getID()."\"" : "") ?>></div>
</div>
</div>
</div>
<?php

View File

@ -104,9 +104,7 @@ $(document).ready(function() {
function showWorkflowStateForm($state) { /* {{{ */
if($state) {
if($state->isUsed()) {
?>
<p><?php echo getMLText('workflow_state_in_use') ?></p>
<?php
$this->infoMsg(getMLText('workflow_state_in_use'));
} else {
?>
<form class="form-inline" action="../op/op.RemoveWorkflowState.php" method="post">
@ -118,6 +116,7 @@ $(document).ready(function() {
}
}
?>
<?php $this->contentContainerStart(); ?>
<form action="../op/op.WorkflowStatesMgr.php" method="post" class="form-horizontal">
<?php
if($state) {
@ -132,30 +131,24 @@ $(document).ready(function() {
<input type="hidden" name="action" value="addworkflowstate">
<?php
}
?>
<div class="control-group">
<label class="control-label" for="login"><?php printMLText("workflow_state_name");?>:</label>
<div class="controls">
<input type="text" id="name" name="name" value="<?php print $state ? htmlspecialchars($state->getName()) : '';?>">
</div>
</div>
<div class="control-group">
<label class="control-label" for="login"><?php printMLText("workflow_state_docstatus");?>:</label>
<div class="controls">
$this->formField(
getMLText("workflow_state_name"),
'<input type="text" id="name" name="name" value="'.($state ? htmlspecialchars($state->getName()) : '').'">'
);
$html = '
<select name="docstatus">
<option value=""><?php printMLText('keep_doc_status'); ?></option>
<option value="<?php echo S_RELEASED; ?>" <?php if($state && $state->getDocumentStatus() == S_RELEASED) echo "selected"; ?>><?php printMLText('released'); ?></option>
<option value="<?php echo S_REJECTED; ?>" <?php if($state && $state->getDocumentStatus() == S_REJECTED) echo "selected"; ?>><?php printMLText('rejected'); ?></option>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label" for="login"></label>
<div class="controls">
<button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save")?></button>
</div>
</div>
<option value="">'.getMLText('keep_doc_status').'</option>
<option value="'.S_RELEASED.'" '.(($state && $state->getDocumentStatus() == S_RELEASED) ? "selected" : '').'>'.getMLText('released').'</option>
<option value="'.S_REJECTED.'" '.(($state && $state->getDocumentStatus() == S_REJECTED) ? "selected" : '').'>'.getMLText('rejected').'</option>';
$html .= '</select>';
$this->formField(
getMLText("workflow_state_docstatus"),
$html
);
$this->formSubmit('<i class="icon-save"></i> '.getMLText("save"));
?>
</form>
<?php $this->contentContainerEnd(); ?>
<?php
} /* }}} */
@ -180,34 +173,31 @@ $(document).ready(function() {
?>
<div class="row-fluid">
<div class="span4">
<div class="well">
<form class="form-horizontal">
<div class="control-group">
<label class="control-label" for="login"><?php printMLText("selection");?>:</label>
<div class="controls">
<select id="selector" class="span9">
<option value="-1"><?php echo getMLText("choose_workflow_state")?>
<option value="0"><?php echo getMLText("add_workflow_state")?>
<div class="span4">
<?php $this->contentContainerStart(); ?>
<form class="form-horizontal">
<?php
$html = '<select id="selector" class="span9">
<option value="-1">'.getMLText("choose_workflow_state").'</option>
<option value="0">'.getMLText("add_workflow_state").'</option>';
foreach ($workflowstates as $currWorkflowState) {
print "<option value=\"".$currWorkflowState->getID()."\" ".($selworkflowstate && $currWorkflowState->getID()==$selworkflowstate->getID() ? 'selected' : '').">" . htmlspecialchars($currWorkflowState->getName());
$html .= "<option value=\"".$currWorkflowState->getID()."\" ".($selworkflowstate && $currWorkflowState->getID()==$selworkflowstate->getID() ? 'selected' : '').">" . htmlspecialchars($currWorkflowState->getName());
}
$html .= '</select>';
$this->formField(
getMLText("selection"),
$html
);
?>
</select>
</div>
</form>
<?php $this->contentContainerEnd(); ?>
<div class="ajax" data-view="WorkflowStatesMgr" data-action="info" <?php echo ($selworkflowstate ? "data-query=\"workflowstateid=".$selworkflowstate->getID()."\"" : "") ?>></div>
</div>
</form>
</div>
<div class="ajax" data-view="WorkflowStatesMgr" data-action="info" <?php echo ($selworkflowstate ? "data-query=\"workflowstateid=".$selworkflowstate->getID()."\"" : "") ?>></div>
</div>
<div class="span8">
<div class="well">
<div class="ajax" data-view="WorkflowStatesMgr" data-action="form" <?php echo ($selworkflowstate ? "data-query=\"workflowstateid=".$selworkflowstate->getID()."\"" : "") ?>></div>
<div class="span8">
<div class="ajax" data-view="WorkflowStatesMgr" data-action="form" <?php echo ($selworkflowstate ? "data-query=\"workflowstateid=".$selworkflowstate->getID()."\"" : "") ?>></div>
</div>
</div>
</div>
<?php
$this->contentEnd();