Changing required fields on add content

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2010 04:22 PM
Does anybody know of a way to modify which fields are required on the "Modify Content Properties" screen of the add content dialog? I thought that I could simply modify jsp/content/add-content-dialog.jsp; however, that particular screen isn't dealt with there. I want to make the description and author properties of the final screen required fields just like the name field, but I can find no way to do so. Perhaps there is also some way to do this through configuration … I'm just not sure.
Labels:
- Labels:
-
Archive
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2010 02:58 AM
The configuration file is "repository/config/alfresco/model/contentModel.xml". Add the mandatory tag <mandatory enforced="true">true</mandatory> for the fields that are to be made mandatory.
Better approach is to add the configuration as custom content model. Refer http://wiki.alfresco.com/wiki/Step-By-Step:_Creating_A_Custom_Model
or Alfresco Developer guide for more details.
Better approach is to add the configuration as custom content model. Refer http://wiki.alfresco.com/wiki/Step-By-Step:_Creating_A_Custom_Model
or Alfresco Developer guide for more details.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2010 06:47 PM
well easyest way is to add java script to do so.
function checkButtonState(){if (document.getElementById("dialog:dialog-body:name").value.length == 0 ){document.getElementById("dialog:finish-button").disabled = true;}else{document.getElementById("dialog:finish-button").disabled = false;}}function validate(){if (finishButtonPressed){finishButtonPressed = false;return validateName(document.getElementById("dialog:dialog-body:name"),decodeURI('</f:verbatim><a:outputText value="#{msg.validation_invalid_character}" encodeForJavaScript="true" /><f:verbatim>'),true);}else{return true;}}
you get the idea.
