* fix bulkedit
* change multiple-attachment to a field which tells it is used for a image gallery
+* update JS and remove deprecations
* complete profile view. Groups still missing.
* minimal theme
** https://watercss.kognise.dev/
-<h3 class="uk-h3">Manage your fields for: <a href="index.php?p=managecolletions&m=edit&id=<?php echo $TemplateData['editData']['id']; ?>"><?php echo $TemplateData['editData']['name']; ?></a></h3>
+<h3 >Manage your fields for: <a href="index.php?p=managecolletions&m=edit&id=<?php echo $TemplateData['editData']['id']; ?>"><?php echo $TemplateData['editData']['name']; ?></a></h3>
-<h4 class="uk-h4">Add or remove a field</h4>
+<h4 >Add or remove a field</h4>
<p>
Just use drag and drop below to add, remove or order your fields.<br />
Removing a field will <b>remove</b> the stored data from the collection.<br />
<form method="post" onsubmit="return saveOrderAndSubmit()">
<input type="hidden" name="fdata[fieldSortString]" id="fieldSort"
value="<?php echo Summoner::ifset($TemplateData['editData'], 'fieldSortString'); ?>">
- <input class="uk-button uk-button-primary" type="submit" name="submitForm" value="Save">
+ <input type="submit" name="submitForm" value="Save">
</form>
</div>
</form>
-<h4 class="uk-h4">Available collections</h4>
+<h4>Available collections</h4>
<div class="sunken-panel">
<table width="100%">
<thead>
--- /dev/null
+<?php
+$existingFieldValue = array();
+if(Summoner::ifset($TemplateData['editData'], $field['identifier'])) {
+ $existingFieldValue = $TemplateData['editData'][$field['identifier']];
+}
+?>
+<div class="field-row-stacked">
+ <label for="<?php echo $field['identifier']; ?>-input"><?php echo $field['displayname']; ?></label>
+
+ <div class="input-multiple-listbox" id="<?php echo $field['identifier']; ?>-listbox">
+ <?php
+ if(!empty($existingFieldValue)) {
+ foreach($existingFieldValue as $ev) { ?>
+
+ <div class="input-multiple-template" id="<?php echo $field['identifier']; ?>-<?php echo $ev; ?>">
+ <a onclick="removeTag('<?php echo $ev; ?>','<?php echo $field['identifier']; ?>')" title="click to remove"><span><?php echo $ev; ?></span>></a>
+ </div>
+
+ <?php
+ }
+ }
+ ?>
+ </div>
+ <input id="<?php echo $field['identifier']; ?>-input" type="text" autocomplete="off"
+ name="<?php echo $field['identifier']; ?>-input"
+ list="<?php echo $field['identifier']; ?>-datalist"
+ onkeypress="addTag(event,'<?php echo $field['identifier']; ?>','<?php echo $field['inputValidation']; ?>')"
+ placeholder="Write and press enter."
+ >
+ <?php if(Summoner::ifset($field,'bulkedit')) { ?>
+ <select name="fdata[additionalEditOption][<?php echo $field['identifier']; ?>]">
+ <option value="">Select bulk edit option</option>
+ <option value="add">Add</option>
+ <option value="replace">Replace</option>
+ <option value="empty">Clear</option>
+ </select>
+ <?php } ?>
+
+</div>
+
+<datalist id="<?php echo $field['identifier']; ?>-datalist">
+ <?php
+ if(isset($field['suggestion'])) {
+ foreach($field['suggestion'] as $t) {
+ ?>
+ <option value="<?php echo $t; ?>"><?php echo $t; ?></option>
+ <?php
+ }
+ }
+ ?>
+</datalist>
+
+<input type="hidden" name="fdata[<?php echo $field['identifier']; ?>]" id="<?php echo $field['identifier']; ?>-save" value="<?php echo implode(',',$existingFieldValue); ?>" />
+
+<div class="input-multiple-template" id="<?php echo $field['identifier']; ?>-template" style="display: none;">
+ <a onclick="removeTag('','<?php echo $field['identifier']; ?>')" title="click to remove"><span></span></a>
+</div>
--- /dev/null
+<div class="field-row-stacked">
+ <label for="<?php echo $field['identifier']; ?>"><?php echo $field['displayname']; ?></label>
+ <input id="<?php echo $field['identifier']; ?>" type="number"
+ autocomplete="off" maxlength="10"
+ name="fdata[<?php echo $field['identifier']; ?>]"
+ value="<?php echo Summoner::ifset($TemplateData['editData'], $field['identifier']); ?>"
+ />
+
+ <?php if(Summoner::ifset($field,'bulkedit')) { ?>
+ <select name="fdata[additionalEditOption][<?php echo $field['identifier']; ?>]">
+ <option value="">Select bulk edit option</option>
+ <option value="replace">Replace</option>
+ <option value="empty">Clear</option>
+ </select>
+ <?php } ?>
+</div>
--- /dev/null
+<div class="field-row-stacked">
+ <label for="<?php echo $field['identifier']; ?>"><?php echo $field['displayname']; ?></label>
+ <select id="<?php echo $field['identifier']; ?>" name="fdata[<?php echo $field['identifier']; ?>]">
+ <option value="">Please select</option>
+ <?php foreach($field['options'] as $k=>$v) { ?>
+ <option value="<?php echo $v; ?>"
+ <?php if(Summoner::ifsetValue($TemplateData['editData'], $field['identifier'],$v)) echo 'selected'; ?>
+ ><?php echo $v; ?></option>
+ <?php } ?>
+ </select>
+
+ <?php if(Summoner::ifset($field,'bulkedit')) { ?>
+ <select name="fdata[additionalEditOption][<?php echo $field['identifier']; ?>]">
+ <option value="">Select bulk edit option</option>
+ <option value="replace">Replace</option>
+ <option value="empty">Clear</option>
+ </select>
+ <?php } ?>
+</div>
--- /dev/null
+<div class="field-row-stacked">
+ <label for="<?php echo $field['identifier']; ?>"><?php echo $field['displayname']; ?>
+ (<span id="<?php echo $field['identifier']; ?>_counter"><?php echo 128-strlen(Summoner::ifset($TemplateData['editData'], $field['identifier'])); ?></span>)
+ </label>
+ <input id="<?php echo $field['identifier']; ?>" type="text" autocomplete="off"
+ name="fdata[<?php echo $field['identifier']; ?>]"
+ value="<?php echo Summoner::ifset($TemplateData['editData'], $field['identifier']); ?>"
+ maxlength="128"
+ />
+
+ <?php if(Summoner::ifset($field,'bulkedit')) { ?>
+ <select name="fdata[additionalEditOption][<?php echo $field['identifier']; ?>]">
+ <option value="">Select bulk edit option</option>
+ <option value="add">Add</option>
+ <option value="replace">Replace</option>
+ <option value="empty">Clear</option>
+ </select>
+ <?php } ?>
+</div>
+
+<script type="text/javascript">
+{
+ const inputElement = document.getElementById("<?php echo $field['identifier']; ?>");
+ const inputCounter = document.getElementById("<?php echo $field['identifier']; ?>_counter");
+
+ inputElement.addEventListener("input", event => {
+ const target = event.currentTarget;
+ const maxLength = target.getAttribute("maxlength");
+ const currentLength = target.value.length;
+
+ inputCounter.innerHTML = `${maxLength - currentLength}`;
+ });
+}
+</script>
--- /dev/null
+<div class="field-row-stacked">
+ <label for="<?php echo $field['identifier']; ?>">
+ <?php echo $field['displayname']; ?>
+ (<span id="<?php echo $field['identifier']; ?>_counter" ><?php echo 255-strlen(Summoner::ifset($TemplateData['editData'], $field['identifier'])); ?></span>)
+ </label>
+ <textarea autocomplete="off"
+ id="<?php echo $field['identifier']; ?>"
+ rows="3" maxlength="255"
+ name="fdata[<?php echo $field['identifier']; ?>]"><?php echo Summoner::ifset($TemplateData['editData'], $field['identifier']); ?></textarea>
+
+ <?php if(Summoner::ifset($field,'bulkedit')) { ?>
+ <select name="fdata[additionalEditOption][<?php echo $field['identifier']; ?>]">
+ <option value="">Select bulk edit option</option>
+ <option value="add">Add</option>
+ <option value="replace">Replace</option>
+ <option value="empty">Clear</option>
+ </select>
+ <?php } ?>
+</div>
+
+<script type="text/javascript">
+{
+ const textarea = document.getElementById("<?php echo $field['identifier']; ?>");
+ const textareaCounter = document.getElementById("<?php echo $field['identifier']; ?>_counter");
+
+ textarea.addEventListener("input", event => {
+ const target = event.currentTarget;
+ const maxLength = target.getAttribute("maxlength");
+ const currentLength = target.value.length;
+
+ textareaCounter.innerHTML = `${maxLength - currentLength}`;
+ });
+}
+</script>
--- /dev/null
+<div class="field-row-stacked">
+ <label for="<?php echo $field['identifier']; ?>"><?php echo $field['displayname']; ?></label>
+ <textarea autocomplete="off"
+ id="<?php echo $field['identifier']; ?>"
+ rows="10"
+ name="fdata[<?php echo $field['identifier']; ?>]"><?php echo Summoner::ifset($TemplateData['editData'], $field['identifier']); ?></textarea>
+ <?php if(Summoner::ifset($field,'bulkedit')) { ?>
+ <select name="fdata[additionalEditOption][<?php echo $field['identifier']; ?>]">
+ <option value="">Select bulk edit option</option>
+ <option value="add">Add</option>
+ <option value="replace">Replace</option>
+ <option value="empty">Clear</option>
+ </select>
+ <?php } ?>
+</div>
--- /dev/null
+<div class="field-row-stacked">
+ <label>Missing template for: <?php echo $field['identifier']; ?></label>
+</div>
--- /dev/null
+<div class="field-row-stacked">
+ <label for="<?php echo $field['identifier']; ?>"><?php echo $field['displayname']; ?></label>
+
+ <input type="file" id="<?php echo $field['identifier']; ?>" multiple="false"
+ name="fdata[<?php echo $field['identifier']; ?>]"
+ />
+
+ <?php if(Summoner::ifset($TemplateData['editData'], $field['identifier'])) { ?>
+ <?php echo '<a href="'.$TemplateData['storagePath'].'/'.Summoner::ifset($TemplateData['editData'], $field['identifier']).'">'.Summoner::ifset($TemplateData['editData'], $field['identifier']).'</a>'; ?>
+ <input type="checkbox" value="<?php echo Summoner::ifset($TemplateData['editData'], $field['identifier']); ?>"
+ name="fdata[<?php echo $field['identifier']; ?>_delete]"
+ title="Delete"
+ id="fdata[<?php echo $field['identifier']; ?>_delete"
+ />
+ <label for="fdata[<?php echo $field['identifier']; ?>_delete">Delete</label>
+ <?php } ?>
+
+</div>
--- /dev/null
+<div class="field-row-stacked">
+ <label for="<?php echo $field['identifier']; ?>"><?php echo $field['displayname']; ?></label>
+ <input type="file" id="<?php echo $field['identifier']; ?>" multiple="true"
+ name="fdata[<?php echo $field['identifier']; ?>][]"
+ />
+
+ <?php
+ if(isset($TemplateData['editData']) && !empty($TemplateData['editData'][$field['identifier']])) {
+ foreach($TemplateData['editData'][$field['identifier']] as $e) {
+ ?>
+ <a target="_blank" href="<?php echo $TemplateData['storagePath'].'/'.$e; ?>"><?php echo $e; ?></a>
+ <input type="checkbox" value="<?php echo $e; ?>"
+ name="fdata[<?php echo $field['identifier']; ?>_delete][]"
+ title="Delete"
+ id="<?php echo $field['identifier']; ?>_delete"
+ />
+ <label for="<?php echo $field['identifier']; ?>_delete">Delete</label>
+ <br>
+ <?php
+ }
+ }
+ ?>
+</div>
--- /dev/null
+<div class="field-row-stacked">
+ <label for="<?php echo $field['identifier']; ?>"><?php echo $field['displayname']; ?></label>
+ <input id="<?php echo $field['identifier']; ?>" type="number" autocomplete="off"
+ placeholder="YYYY" min="0000" max="9999"
+ name="fdata[<?php echo $field['identifier']; ?>]"
+ value="<?php echo Summoner::ifset($TemplateData['editData'], $field['identifier']); ?>"
+ />
+
+ <?php if(Summoner::ifset($field,'bulkedit')) { ?>
+ <select name="fdata[additionalEditOption][<?php echo $field['identifier']; ?>]">
+ <option value="">Select bulk edit option</option>
+ <option value="replace">Replace</option>
+ <option value="empty">Clear</option>
+ </select>
+ <?php } ?>
+</div>
--- /dev/null
+<?php
+if(!empty($TemplateData['editFields'])) {
+ $_entry = '';
+ if(!empty($TemplateData['editData']) && isset($TemplateData['editData']['id'])) {
+ $_entry = $TemplateData['editData']['id'];
+?>
+ <h3>Update an entry in: <a href="index.php?p=collections&collection=<?php echo $TemplateData['loadedCollection']['id']; ?>"><?php echo $TemplateData['loadedCollection']['name']; ?></a></h3>
+ <p>
+ <a href="index.php?p=entry&collection=<?php echo $TemplateData['loadedCollection']['id']; ?>&id=<?php echo $TemplateData['editData']['id']; ?>">View entry</a>
+ </p>
+<?php } else { ?>
+ <h3>Add an entry to: <a href="index.php?p=collections&collection=<?php echo $TemplateData['loadedCollection']['id']; ?>"><?php echo $TemplateData['loadedCollection']['name']; ?></a></h3>
+<?php } ?>
+
+<?php if(!empty($TemplateData['availableTools'])) { ?>
+<h4>Available tools</h4>
+<ul>
+ <?php foreach($TemplateData['availableTools'] as $tool) { ?>
+ <li><a href="index.php?p=tool&t=<?php echo $tool['action']; ?>&collection=<?php echo $TemplateData['loadedCollection']['id']; ?>&id=<?php echo $_entry; ?>"
+ target="<?php echo $tool['target']; ?>"><?php echo $tool['name']; ?> (<?php echo $tool['description']; ?>)</a></li>
+ <?php } ?>
+</ul>
+<?php } ?>
+
+<script type="text/javascript" src="view/98/ui/js/suggest-tag.js"></script>
+
+<form class="maxSizeForm" method="post" enctype="multipart/form-data">
+
+ <?php
+ foreach($TemplateData['editFields'] as $field) {
+ $_editFieldView = Summoner::themefile('manageentry/field-'.$field['type'].'.html', UI_THEME);
+ if(file_exists($_editFieldView)) {
+ require $_editFieldView;
+ }
+ else {
+ require $TemplateData['_editFieldViewDefault'];
+ }
+ }
+
+ if(!empty($TemplateData['editData']['_isOwner'])) {
+ ?>
+
+ <div class="field-row-stacked">
+ <label>Rights *</label></td>
+
+ <table>
+ <thead>
+ <tr>
+ <th>User</th>
+ <th>Group</th>
+ <th>Other</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <input id="user_read" type="checkbox" name="fdata[rights][user][read]" value="1"
+ <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['user'], 'read', 'r')) echo "checked"; ?>>
+ <label for="user_read">r </label>
+
+ <input id="user_write" type="checkbox" name="fdata[rights][user][write]" value="1"
+ <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['user'], 'write', 'w')) echo "checked"; ?>>
+ <label for="user_write">w </label>
+
+ <input id="user_delete" type="checkbox" name="fdata[rights][user][delete]" value="1"
+ <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['user'], 'delete', 'x')) echo "checked"; ?>>
+ <label for="user_delete">x </label>
+ </td>
+ <td>
+ <input id="group_read" type="checkbox" name="fdata[rights][group][read]" value="1"
+ <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['group'], 'read', 'r')) echo "checked"; ?>>
+ <label for="group_read">r </label>
+
+ <input id="group_write" type="checkbox" name="fdata[rights][group][write]" value="1"
+ <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['group'], 'write', 'w')) echo "checked"; ?>>
+ <label for="group_write">w </label>
+
+ <input id="group_delete" type="checkbox" name="fdata[rights][group][delete]" value="1"
+ <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['group'], 'delete', 'x')) echo "checked"; ?>>
+ <label for="group_delete">x </label>
+ </td>
+ <td>
+ <input id="other_read" type="checkbox" name="fdata[rights][other][read]" value="1"
+ <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['other'], 'read', 'r')) echo "checked"; ?>>
+ <label for="other_read">r </label>
+
+ <input id="other_write" type="checkbox" name="fdata[rights][other][write]" value="1"
+ <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['other'], 'write', 'w')) echo "checked"; ?>>
+ <label for="other_write">w </label>
+
+ <input id="other_delete" type="checkbox" name="fdata[rights][other][delete]" value="1"
+ <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['other'], 'delete', 'x')) echo "checked"; ?>>
+ <label for="other_delete">x </label>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+ <?php } ?>
+
+ <?php if(!empty($TemplateData['editData']['_canDelete'])) { ?>
+
+ <div class="field-row-stacked">
+ <input id="doDelete" type="checkbox" name="fdata[doDelete]" value="1">
+ <label for="doDelete">Delete</label>
+ </div>
+
+ <?php } ?>
+
+ <div class="field-row-stacked">
+ <input type="submit" name="submitForm" value="Save">
+ </div>
+</form>
+
+<?php } else { ?>
+<h3>Please select a collection first</h3>
+<div class="sunken-panel">
+ <table width="100%">
+ <thead>
+ <tr>
+ <th width="100px">Name</th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach($TemplateData['existingCollections'] as $k=>$v) { ?>
+ <tr>
+ <td><a href="index.php?p=manageentry&collection=<?php echo $k; ?>"><?php echo $v['name']; ?></a></td>
+ <td><?php echo $v['description']; ?></td>
+ <tr>
+ <?php } ?>
+ </tbody>
+ </table>
+</div>
+
+<?php } ?>
-<h3 class="uk-h3">Group management</h3>
-<h4 class="uk-h4">Add or modify a group</h4>
+<h3>Group management</h3>
+<h4>Add or modify a group</h4>
<form class="maxSizeForm" method="post">
<div class="field-row-stacked">
</div>
</form>
-<h4 class="uk-h4">Available groups</h4>
+<h4>Available groups</h4>
<div class="sunken-panel">
<table width="100%">
<thead>
<?php if(!empty($TemplateData['loadedCollection'])) { ?>
- <h3 class="uk-h3">Manage Tags in: <a href="index.php?p=collections&collection=<?php echo $TemplateData['loadedCollection']['id']; ?>"><?php echo $TemplateData['loadedCollection']['name']; ?></a></h3>
+ <h3 >Manage Tags in: <a href="index.php?p=collections&collection=<?php echo $TemplateData['loadedCollection']['id']; ?>"><?php echo $TemplateData['loadedCollection']['name']; ?></a></h3>
<p>
The actions are top down. If you choose to move and rename, only move will be executed.<br />
Deletion will remove without recover!<br />
-<h3 class="uk-h3">User management</h3>
-<h4 class="uk-h4">Add or modify a user</h4>
+<h3>User management</h3>
+<h4>Add or modify a user</h4>
<form method="post" class="maxSizeForm">
<div class="field-row-stacked">
</div>
</form>
-<h4 class="uk-h4">Available users</h4>
+<h4>Available users</h4>
<div class="sunken-panel">
<table width="100%">
<thead>
--- /dev/null
+/**
+ * remove a tag from the tag "cloud"
+ *
+ * @param tagString
+ * @param targetStartString
+ */
+function removeTag(tagString,targetStartString) {
+ let toRemove = document.getElementById(targetStartString + '-' + tagString);
+ let saveInput = document.getElementById(targetStartString + '-save');
+
+ if(toRemove && saveInput) {
+ let newSaveValue = _removeFromCommaString(saveInput.value,tagString);
+ saveInput.value = newSaveValue;
+ toRemove.remove();
+ }
+ else {
+ console.log("Delete element not found");
+ }
+}
+
+/**
+ * add a tag to the visible tag "cloud" and hidden form input
+ * used in the form for saving
+ *
+ * @param e
+ * @param targetStartString
+ * @param allowWhiteSpace
+ */
+function addTag(e,targetStartString,allowWhiteSpace) {
+ e = e || window.event;
+
+ if(e.keyCode === 13) {
+ let elem = e.srcElement || e.target;
+ let saveInput = document.getElementById(targetStartString + '-save');
+ let listBox = document.getElementById(targetStartString + '-listbox');
+ let newTagTemplate = document.getElementById(targetStartString + '-template');
+
+ let validateMethod = false;
+ if (allowWhiteSpace !== undefined && allowWhiteSpace.length > 0) {
+ validateMethod = allowWhiteSpace;
+ }
+
+ let checkString = _checkForSpaceString(elem.value,validateMethod);
+
+ if(saveInput && listBox && elem && newTagTemplate && checkString) {
+ let toAdd = elem.value;
+ let newSaveValue = _appendToCommaString(saveInput.value,toAdd);
+
+ let newT = newTagTemplate.cloneNode(true);
+ newT = _fillTagTemplate(newT,toAdd,targetStartString);
+ listBox.appendChild(newT);
+
+ saveInput.value = newSaveValue;
+ }
+
+ elem.value = '';
+ e.preventDefault();
+ }
+}
+
+/**
+ * add given string to given existing string seperated with a comma
+ *
+ * @returns {string}
+ * @private
+ * @param theString
+ * @param toAdd
+ */
+function _appendToCommaString(theString,toAdd) {
+ if(theString.length > 0 && toAdd.length > 0) {
+ let theArray = theString.split(',');
+ if(!theArray.includes(toAdd)) {
+ theString = theString + "," + toAdd
+ }
+ }
+ else if (toAdd.length > 0) {
+ theString = toAdd;
+ }
+
+ return theString;
+}
+
+/**
+ * add given string to given existing string seperated with a comma
+ *
+ * @returns {string}
+ * @private
+ * @param theString
+ * @param toRemove
+ */
+function _removeFromCommaString(theString,toRemove) {
+ if(theString.length > 0 && toRemove.length > 0) {
+ let theArray = theString.split(',');
+
+ if(theArray.includes(toRemove)) {
+ for( let i = theArray.length-1; i >= 0; i--){
+ if ( theArray[i] === toRemove) theArray.splice(i, 1);
+ }
+
+ theString = theArray.join(",");
+ }
+ }
+
+ return theString;
+}
+
+/**
+ * remove from given list the given value if it exists
+ *
+ * @private
+ * @param list
+ * @param value
+ */
+function _removeFromDatalist(list, value) {
+ if(list.options.length > 0 && value && value.length > 0) {
+ for (i = 0; i < list.options.length; i++) {
+ if(list.options[i].value == value) {
+ list.options[i].remove();
+ }
+ }
+ }
+}
+
+/**
+ * fill the tag template with the right data and js calls
+ * depends on the html template created in the html code
+ *
+ * @returns Object the cloned el
+ * @private
+ * @param el
+ * @param newTagString
+ * @param targetStartString
+ */
+function _fillTagTemplate(el,newTagString,targetStartString) {
+ el.removeAttribute('style');
+ el.setAttribute('id',targetStartString + '-' + newTagString);
+
+ let spanEl = el.querySelector('span');
+ spanEl.innerHTML = newTagString;
+
+ let aEl = el.querySelector('a');
+ aEl.setAttribute('onclick', "removeTag('"+newTagString+"','"+targetStartString+"');");
+
+ return el;
+}
+
+/**
+ * simple check if the string is empty or contains whitespace chars
+ *
+ * @returns boolean
+ * @private
+ * @param stringTocheck
+ * @param validateMethod
+ */
+function _checkForSpaceString(stringTocheck,validateMethod) {
+ let check = stringTocheck.replace(/\s/gm,'');
+ if(validateMethod && validateMethod == "allowSpace") {
+ check = stringTocheck.trim();
+ }
+
+ if(check === stringTocheck && check.length > 0) {
+ return true;
+ }
+ return false;
+}
}
else { // ADD
// special case. Title field should be always available.
- if (!empty($_fieldsToSave) && isset($_fieldsToSave['title'])) {
+ if (!empty($_fieldsToSave) && !empty($_fieldsToSave['title']['valueToSave'])) {
$do = $ManageEntry->create($_fieldsToSave, $_owner, $_group, $_rights);
if (!empty($do)) {
$TemplateData['message']['content'] = "<a href='index.php?p=entry&collection=".$_collection."&id=".$do."'>View your new entry</a> | <a href='index.php?p=manageentry&collection=".$_collection."&id=".$do."'>Edit your new entry</a>";