/**
* FusionForge Documentation Manager
*
- * Copyright 2012, Franck Villaume - TrivialDev
+ * Copyright 2012-2013, Franck Villaume - TrivialDev
* http://fusionforge.org
*
* This file is part of FusionForge. FusionForge is free software;
echo '<div id="editFile" >';
echo '<form id="editdocdata" name="editdocdata" method="post" enctype="multipart/form-data">';
-echo '<table border="0">';
+echo '<table>';
echo ' <tr>';
-echo ' <td><strong>'. _('Document Title:') .'</strong>'. utils_requiredField() .'<br />';
-echo ' <input id="title" type="text" name="title" size="40" maxlength="255"/></td>';
+echo ' <td><strong>'. _('Document Title')._(': ').'</strong>'. utils_requiredField() .'<br />';
+echo ' <input pattern=".{5,}" title="'.sprintf(_('(at least %s characters)'), 5).'" id="title" type="text" name="title" size="40" maxlength="255"/></td>';
echo ' </tr>';
echo ' <tr>';
-echo ' <td><strong>'. _('Description:') .'</strong>'. utils_requiredField() .'<br />';
-echo ' <input id="description" type="text" name="description" size="40" maxlength="255"/></td>';
+echo ' <td><strong>'. _('Description')._(': ').'</strong>'. utils_requiredField() .'<br />';
+echo ' <input pattern=".{10,}" title="'.sprintf(_('(at least %s characters)'), 10).'" id="description" type="text" name="description" size="40" maxlength="255"/></td>';
echo ' </tr>';
if ($g->useDocmanSearch()) {
echo ' <tr>';
- echo ' <td>'. _('Both fields are used by document search engine.'). '.</td>';
+ echo ' <td>'. _('Both fields are used by the document search engine.') .'</td>';
echo ' </tr>';
}
echo ' <tr>';
-echo ' <td><strong>'. _('File:') .'</strong>';
-echo ' <a id="filelink" />';
+echo ' <td><strong>'. _('File')._(': ').'</strong>';
+echo ' <a id="filelink"></a>';
echo ' </td>';
echo ' </tr>';
if ($g->useCreateOnline()) {
echo ' </tr>';
}
echo ' <tr>';
-echo ' <td><strong>'. _('Folder that document belongs in:') .'</strong><br />';
-echo ' <select name="doc_group" id="doc_group" />';
+echo ' <td><strong>'. _('Folder that document belongs to:') .'</strong><br />';
+echo ' <select name="doc_group" id="doc_group"></select>';
echo ' </td>';
echo ' </tr>';
echo ' <tr>';
-echo ' <td><strong>'. _('State:') .'</strong><br />';
-echo ' <select name="stateid" id="stateid" />';
+echo ' <td><strong>'. _('State')._(': ').'</strong><br />';
+echo ' <select name="stateid" id="stateid"></select>';
echo ' </td>';
echo ' </tr>';
echo ' <tr id="fileurlroweditfile">';
echo ' <td><strong>'. _('Specify an new outside URL where the file will be referenced:') .'</strong>'. utils_requiredField() .'<br />';
-echo ' <input id="fileurl" type="text" name="file_url" size="50" />';
+echo ' <input id="fileurl" type="url" name="file_url" size="50" pattern="ftp://.+|https?://.+" />';
echo ' </td>';
echo ' </tr>';
echo ' <tr id="uploadnewroweditfile">';
echo ' <td><strong>'. _('OPTIONAL: Upload new file:') .'</strong><br />';
-echo ' <input type="file" name="uploaded_data" size="30" />'.sprintf(_('(max upload size: %1$s)'),human_readable_bytes(util_get_maxuploadfilesize()));
+echo ' <input type="file" name="uploaded_data" size="30" /><br />'.sprintf(_('(max upload size: %s)'),human_readable_bytes(util_get_maxuploadfilesize()));
echo ' </td>';
echo ' </tr>';
echo '</table>';