diff --git a/views/bootstrap/class.AddEvent.php b/views/bootstrap/class.AddEvent.php
index 9d7dbf70b..014fe2e69 100644
--- a/views/bootstrap/class.AddEvent.php
+++ b/views/bootstrap/class.AddEvent.php
@@ -96,11 +96,22 @@ $(document).ready(function() {
);
$this->formField(
getMLText("name"),
- ''
+ array(
+ 'element'=>'input',
+ 'type'=>'text',
+ 'id'=>'name',
+ 'name'=>'name',
+ 'required'=>true
+ )
);
$this->formField(
getMLText("comment"),
- ''
+ array(
+ 'element'=>'textarea',
+ 'name'=>'comment',
+ 'rows'=>4,
+ 'cols'=>80
+ )
);
$this->formSubmit(getMLText('add_event'));
?>
diff --git a/views/bootstrap/class.AddFile.php b/views/bootstrap/class.AddFile.php
index 58d5ddc31..ce06e8baa 100644
--- a/views/bootstrap/class.AddFile.php
+++ b/views/bootstrap/class.AddFile.php
@@ -157,28 +157,52 @@ $(document).ready( function() {
getMLText("local_file"),
($enablelargefileupload ? $this->getFineUploaderHtml() : $this->getFileChooser('userfile[]', false))
);
- $html = '';
+ foreach($versions as $version) {
+ $options[] = array($version->getVersion(), getMLText('version')." ".$version->getVersion());
+ }
$this->formField(
getMLText("version"),
- $html
+ array(
+ 'element'=>'select',
+ 'id'=>'version',
+ 'name'=>'version',
+ 'options'=>$options
+ )
);
$this->formField(
getMLText("name"),
- ''
+ array(
+ 'element'=>'input',
+ 'type'=>'text',
+ 'id'=>'name',
+ 'name'=>'name',
+ )
);
$this->formField(
getMLText("comment"),
- ''
+ array(
+ 'element'=>'textarea',
+ 'id'=>'comment',
+ 'name'=>'comment',
+ 'rows'=>4,
+ 'cols'=>80,
+ 'required'=>$strictformcheck
+ )
);
if ($document->getAccessMode($user) >= M_READWRITE) {
$this->formField(
getMLText("document_link_public"),
- ''
+ array(
+ 'element'=>'input',
+ 'type'=>'checkbox',
+ 'id'=>'public',
+ 'name'=>'public',
+ 'value'=>'true',
+ 'checked'=>true,
+ )
);
}
$this->formSubmit(getMLText('add'));
diff --git a/views/bootstrap/class.AddSubFolder.php b/views/bootstrap/class.AddSubFolder.php
index b83ac08cd..52048d3cd 100644
--- a/views/bootstrap/class.AddSubFolder.php
+++ b/views/bootstrap/class.AddSubFolder.php
@@ -86,11 +86,23 @@ $(document).ready( function() {
formField(
getMLText("name"),
- ''
+ array(
+ 'element'=>'input',
+ 'type'=>'text',
+ 'id'=>'name',
+ 'name'=>'name',
+ 'required'=>true
+ )
);
$this->formField(
getMLText("comment"),
- ''
+ array(
+ 'element'=>'textarea',
+ 'name'=>'comment',
+ 'rows'=>4,
+ 'cols'=>80,
+ 'required'=>$strictformcheck
+ )
);
$this->formField(getMLText("sequence"), $this->getSequenceChooser($folder->getSubFolders('s')).($orderby != 's' ? "
".getMLText('order_by_sequence_off') : ''));
diff --git a/views/bootstrap/class.ApproveDocument.php b/views/bootstrap/class.ApproveDocument.php
index 632467661..f335dbfab 100644
--- a/views/bootstrap/class.ApproveDocument.php
+++ b/views/bootstrap/class.ApproveDocument.php
@@ -134,15 +134,29 @@ $(document).ready(function() {
formField(
getMLText("comment"),
- ''
+ array(
+ 'element'=>'textarea',
+ 'name'=>'comment',
+ 'rows'=>4,
+ 'cols'=>80
+ )
);
$this->formField(
getMLText("approval_file"),
$this->getFileChooser('approvalfile', false)
);
+ $options = array();
+ if($approvalStatus['status'] != 1)
+ $options[] = array('1', getMLText("status_approved"));
+ if($approvalStatus['status'] != -1)
+ $options[] = array('-1', getMLText("rejected"));
$this->formField(
getMLText("approval_status"),
- ''
+ array(
+ 'element'=>'select',
+ 'name'=>'approvalStatus',
+ 'options'=>$options,
+ )
);
$this->formSubmit(getMLText('submit_approval'), $approvaltype.'Approval');
?>
diff --git a/views/bootstrap/class.AttributeMgr.php b/views/bootstrap/class.AttributeMgr.php
index 59cadfd00..919059616 100644
--- a/views/bootstrap/class.AttributeMgr.php
+++ b/views/bootstrap/class.AttributeMgr.php
@@ -191,7 +191,12 @@ $(document).ready( function() {
}
$this->formField(
getMLText("attrdef_name"),
- ''
+ array(
+ 'element'=>'input',
+ 'type'=>'text',
+ 'name'=>'name',
+ 'value'=>($attrdef ? htmlspecialchars($attrdef->getName()) : '')
+ )
);
?>
@@ -213,24 +218,56 @@ $(document).ready( function() {
formField(
getMLText("attrdef_multiple"),
- 'getMultipleValues() ? " checked" : "").'/>'
+ array(
+ 'element'=>'input',
+ 'type'=>'checkbox',
+ 'name'=>'multiple',
+ 'value'=>1,
+ 'checked'=>($attrdef && $attrdef->getMultipleValues())
+ )
);
$this->formField(
getMLText("attrdef_minvalues"),
- ''
+ array(
+ 'element'=>'input',
+ 'type'=>'text',
+ 'name'=>'minvalues',
+ 'value'=>($attrdef ? $attrdef->getMinValues() : ''),
+ )
);
$this->formField(
getMLText("attrdef_maxvalues"),
- ''
+ array(
+ 'element'=>'input',
+ 'type'=>'text',
+ 'name'=>'maxvalues',
+ 'value'=>($attrdef ? $attrdef->getMaxValues() : ''),
+ )
);
$this->formField(
getMLText("attrdef_valueset"),
- (($attrdef && strlen($attrdef->getValueSet()) > 30) ? '
-' : '')
+ (($attrdef && strlen($attrdef->getValueSet()) > 30)
+ ? array(
+ 'element'=>'textarea',
+ 'name'=>'valueset',
+ 'rows'=>5,
+ 'value'=>(($attrdef && $attrdef->getValueSet()) ? $attrdef->getValueSetSeparator().implode("\n".$attrdef->getValueSetSeparator(), $attrdef->getValueSetAsArray()) : ''),
+ )
+ : array(
+ 'element'=>'input',
+ 'type'=>'text',
+ 'name'=>'valueset',
+ 'value'=>($attrdef ? $attrdef->getValueSet() : ''),
+ ))
);
$this->formField(
getMLText("attrdef_regex"),
- ''
+ array(
+ 'element'=>'input',
+ 'type'=>'text',
+ 'name'=>'regex',
+ 'value'=>($attrdef ? $attrdef->getRegex() : ''),
+ )
);
$this->formSubmit(' '.getMLText('save'));
?>
diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php
index bac2fe662..db5e8be7c 100644
--- a/views/bootstrap/class.Bootstrap.php
+++ b/views/bootstrap/class.Bootstrap.php
@@ -845,15 +845,36 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
echo $value;
} elseif(is_array($value)) {
switch($value['element']) {
+ case 'select':
+ echo '';
+ break;
+ case 'textarea':
+ echo '";
+ break;
case 'input':
default:
- echo '";
+ echo '";
break;
}
}
diff --git a/views/bootstrap/class.Calendar.php b/views/bootstrap/class.Calendar.php
index d19473d1b..0d19dff85 100644
--- a/views/bootstrap/class.Calendar.php
+++ b/views/bootstrap/class.Calendar.php
@@ -81,11 +81,23 @@ class SeedDMS_View_Calendar extends SeedDMS_Bootstrap_Style {
);
$this->formField(
getMLText("name"),
- ''
+ array(
+ 'element'=>'input',
+ 'type'=>'text',
+ 'name'=>'name',
+ 'value'=>htmlspecialchars($event["name"])
+ )
);
$this->formField(
getMLText("comment"),
- ''
+ array(
+ 'element'=>'textarea',
+ 'name'=>'comment',
+ 'rows'=>4,
+ 'cols'=>80,
+ 'value'=>htmlspecialchars($event["comment"]),
+ 'required'=>$strictformcheck
+ )
);
$this->formSubmit(" ".getMLText('save'));
?>
diff --git a/views/bootstrap/class.Categories.php b/views/bootstrap/class.Categories.php
index 60b907594..fda5ddb50 100644
--- a/views/bootstrap/class.Categories.php
+++ b/views/bootstrap/class.Categories.php
@@ -113,7 +113,12 @@ $(document).ready( function() {
formField(
getMLText("name"),
- ''
+ array(
+ 'element'=>'input',
+ 'type'=>'text',
+ 'name'=>'name',
+ 'value'=>($category ? htmlspecialchars($category->getName()) : '')
+ )
);
$this->formSubmit(" ".getMLText('save'));
?>
diff --git a/views/bootstrap/class.ChangePassword.php b/views/bootstrap/class.ChangePassword.php
index 802af783d..92684195e 100644
--- a/views/bootstrap/class.ChangePassword.php
+++ b/views/bootstrap/class.ChangePassword.php
@@ -74,7 +74,13 @@ document.form1.newpassword.focus();
}
$this->formField(
getMLText("confirm_pwd"),
- ''
+ array(
+ 'element'=>'input',
+ 'type'=>'password',
+ 'id'=>'passwordrepeat',
+ 'name'=>'newpasswordrepeat',
+ 'autocomplete'=>'off',
+ )
);
$this->formSubmit(getMLText('submit_password'));
?>
diff --git a/views/bootstrap/class.EditComment.php b/views/bootstrap/class.EditComment.php
index 7becec2ae..bc131ee27 100644
--- a/views/bootstrap/class.EditComment.php
+++ b/views/bootstrap/class.EditComment.php
@@ -91,7 +91,13 @@ $(document).ready(function() {
formField(
getMLText("comment"),
- ''
+ array(
+ 'element'=>'textarea',
+ 'name'=>'comment',
+ 'rows'=>4,
+ 'cols'=>80,
+ 'value'=>htmlspecialchars($version->getComment())
+ )
);
$this->formSubmit(" ".getMLText('save'));
?>
diff --git a/views/bootstrap/class.EditDocumentFile.php b/views/bootstrap/class.EditDocumentFile.php
index dfa0f72a3..f0d015505 100644
--- a/views/bootstrap/class.EditDocumentFile.php
+++ b/views/bootstrap/class.EditDocumentFile.php
@@ -51,27 +51,48 @@ class SeedDMS_View_EditDocumentFile extends SeedDMS_Bootstrap_Style {
- ';
+ $options = array();
+ $options[] = array("", getMLText('document'));
$versions = $document->getContent();
foreach($versions as $version)
- $html .= "";
- $html .= "";
+ $options[] = array($version->getVersion(), getMLText('version')." ".$version->getVersion(), $version->getVersion() == $file->getVersion());
$this->formField(
getMLText("version"),
- $html
+ array(
+ 'element'=>'select',
+ 'name'=>'version',
+ 'id'=>'version',
+ 'options'=>$options,
+ )
);
$this->formField(
getMLText("name"),
- ''
+ array(
+ 'element'=>'input',
+ 'type'=>'text',
+ 'name'=>'name',
+ 'value'=>htmlspecialchars($file->getName()),
+ )
);
$this->formField(
getMLText("comment"),
- ''
+ array(
+ 'element'=>'textarea',
+ 'name'=>'comment',
+ 'rows'=>4,
+ 'cols'=>80,
+ 'value'=>htmlspecialchars($file->getComment())
+ )
);
$this->formField(
getMLText("document_link_public"),
- 'isPublic() ? " checked" : "").' />'
+ array(
+ 'element'=>'input',
+ 'type'=>'checkbox',
+ 'name'=>'public',
+ 'value'=>'true',
+ 'checked'=>$file->isPublic()
+ )
);
?>
formField(
getMLText("name"),
- ''
+ array(
+ 'element'=>'input',
+ 'type'=>'text',
+ 'name'=>'name',
+ 'value'=>htmlspecialchars($folder->getName()),
+ 'required'=>true
+ )
);
$this->formField(
getMLText("comment"),
- ''
+ array(
+ 'element'=>'textarea',
+ 'name'=>'comment',
+ 'rows'=>4,
+ 'cols'=>80,
+ 'value'=>htmlspecialchars($folder->getComment()),
+ 'required'=>$strictformcheck
+ )
);
$parent = ($folder->getID() == $rootfolderid) ? false : $folder->getParent();
if ($parent && $parent->getAccessMode($user) > M_READ) {
diff --git a/views/bootstrap/class.EditUserData.php b/views/bootstrap/class.EditUserData.php
index 42e270e9d..4e19c433a 100644
--- a/views/bootstrap/class.EditUserData.php
+++ b/views/bootstrap/class.EditUserData.php
@@ -104,7 +104,14 @@ $(document).ready( function() {
formField(
getMLText("current_password"),
- ''
+ array(
+ 'element'=>'input',
+ 'type'=>'password',
+ 'id'=>'currentpwd',
+ 'name'=>'currentpwd',
+ 'autocomplete'=>'off',
+ 'required'=>true
+ )
);
$this->formField(
getMLText("new_password"),
@@ -118,19 +125,42 @@ $(document).ready( function() {
}
$this->formField(
getMLText("confirm_pwd"),
- ''
+ array(
+ 'element'=>'input',
+ 'type'=>'password',
+ 'id'=>'pwdconf',
+ 'name'=>'pwdconf',
+ 'autocomplete'=>'off',
+ )
);
$this->formField(
getMLText("name"),
- ''
+ array(
+ 'element'=>'input',
+ 'type'=>'text',
+ 'id'=>'fullname',
+ 'name'=>'fullname',
+ 'value'=>htmlspecialchars($user->getFullName()),
+ )
);
$this->formField(
getMLText("email"),
- ''
+ array(
+ 'element'=>'input',
+ 'type'=>'text',
+ 'id'=>'email',
+ 'name'=>'email',
+ 'value'=>htmlspecialchars($user->getEmail()),
+ )
);
$this->formField(
getMLText("comment"),
- ''
+ array(
+ 'element'=>'textarea',
+ 'name'=>'comment',
+ 'rows'=>4,
+ 'value'=>htmlspecialchars($user->getComment()),
+ )
);
if ($enableuserimage){
@@ -144,27 +174,33 @@ $(document).ready( function() {
);
}
if ($enablelanguageselector){
- $html = '';
$this->formField(
getMLText("language"),
- $html
+ array(
+ 'element'=>'select',
+ 'name'=>'language',
+ 'options'=>$options
+ )
);
}
if ($enablethemeselector){
- $html = '';
$this->formField(
getMLText("theme"),
- $html
+ array(
+ 'element'=>'select',
+ 'name'=>'theme',
+ 'options'=>$options
+ )
);
}
$this->formSubmit(" ".getMLText('save'));
diff --git a/views/bootstrap/class.GroupMgr.php b/views/bootstrap/class.GroupMgr.php
index ac51a51af..69ff63dff 100644
--- a/views/bootstrap/class.GroupMgr.php
+++ b/views/bootstrap/class.GroupMgr.php
@@ -191,11 +191,23 @@ $(document).ready( function() {
}
$this->formField(
getMLText("name"),
- ''
+ array(
+ 'element'=>'input',
+ 'type'=>'text',
+ 'id'=>'name',
+ 'name'=>'name',
+ 'value'=>($group ? htmlspecialchars($group->getName()) : '')
+ )
);
$this->formField(
getMLText("comment"),
- ''
+ array(
+ 'element'=>'textarea',
+ 'id'=>'comment',
+ 'name'=>'comment',
+ 'rows'=>4,
+ 'value'=>($group ? htmlspecialchars($group->getComment()) : '')
+ )
);
$this->formSubmit(" ".getMLText('save'));
?>
diff --git a/views/bootstrap/class.ImportFS.php b/views/bootstrap/class.ImportFS.php
index cf4f39b27..a4fdd4d4d 100644
--- a/views/bootstrap/class.ImportFS.php
+++ b/views/bootstrap/class.ImportFS.php
@@ -69,7 +69,12 @@ class SeedDMS_View_ImportFS extends SeedDMS_Bootstrap_Style {
$this->formField(
getMLText("removeFolderFromDropFolder"),
- ''
+ array(
+ 'element'=>'input',
+ 'type'=>'checkbox',
+ 'name'=>'remove',
+ 'value'=>'1'
+ )
);
$this->formSubmit(" ".getMLText('import'));
print "\n";
diff --git a/views/bootstrap/class.OverrideContentStatus.php b/views/bootstrap/class.OverrideContentStatus.php
index b1743200c..f26db9794 100644
--- a/views/bootstrap/class.OverrideContentStatus.php
+++ b/views/bootstrap/class.OverrideContentStatus.php
@@ -90,16 +90,25 @@ $(document).ready(function() {
formField(
getMLText("comment"),
- ''
+ array(
+ 'element'=>'textarea',
+ 'name'=>'comment',
+ 'rows'=>4,
+ )
);
- $html = '";
+ $options = array();
+ $options[] = array('', '');
+ if ($overallStatus["status"] == S_OBSOLETE)
+ $options[] = array(S_RELEASED, getOverallStatusText(S_RELEASED));
+ if ($overallStatus["status"] == S_RELEASED)
+ $options[] = array(S_OBSOLETE, getOverallStatusText(S_OBSOLETE));
$this->formField(
getMLText("status"),
- $html
+ array(
+ 'element'=>'select',
+ 'name'=>'overrideStatus',
+ 'options'=>$options,
+ )
);
$this->formSubmit(" ".getMLText('update'));
?>
diff --git a/views/bootstrap/class.PasswordForgotten.php b/views/bootstrap/class.PasswordForgotten.php
index fc8a76c95..bccbbdff8 100644
--- a/views/bootstrap/class.PasswordForgotten.php
+++ b/views/bootstrap/class.PasswordForgotten.php
@@ -83,11 +83,27 @@ document.form1.email.focus();
formField(
getMLText("user_login"),
- ''
+ array(
+ 'element'=>'input',
+ 'type'=>'text',
+ 'id'=>'login',
+ 'name'=>'login',
+ 'placeholder'=>'login',
+ 'autocomplete'=>'off',
+ 'required'=>true
+ )
);
$this->formField(
getMLText("email"),
- ''
+ array(
+ 'element'=>'input',
+ 'type'=>'text',
+ 'id'=>'email',
+ 'name'=>'email',
+ 'placeholder'=>'email',
+ 'autocomplete'=>'off',
+ 'required'=>true
+ )
);
$this->formSubmit(getMLText('submit_password_forgotten'));
?>
diff --git a/views/bootstrap/class.SendLoginData.php b/views/bootstrap/class.SendLoginData.php
index e844ab065..7d1d7d22b 100644
--- a/views/bootstrap/class.SendLoginData.php
+++ b/views/bootstrap/class.SendLoginData.php
@@ -49,7 +49,10 @@ class SeedDMS_View_SendLoginData extends SeedDMS_Bootstrap_Style {
formField(
getMLText("comment"),
- ''
+ array(
+ 'element'=>'textarea',
+ 'name'=>'comment',
+ )
);
$this->formSubmit(" ".getMLText('send_email'));
?>
diff --git a/views/bootstrap/class.SetExpires.php b/views/bootstrap/class.SetExpires.php
index c5690598a..cd4df87ba 100644
--- a/views/bootstrap/class.SetExpires.php
+++ b/views/bootstrap/class.SetExpires.php
@@ -67,18 +67,21 @@ $(document).ready( function() {