mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
- Minor fixes/enhancements git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2805 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
110 lines
4.2 KiB
Plaintext
110 lines
4.2 KiB
Plaintext
<%--
|
|
Copyright (C) 2005 Alfresco, Inc.
|
|
|
|
Licensed under the Mozilla Public License version 1.1
|
|
with a permitted attribution clause. You may obtain a
|
|
copy of the License at
|
|
|
|
http://www.alfresco.org/legal/license.txt
|
|
|
|
Unless required by applicable law or agreed to in writing,
|
|
software distributed under the License is distributed on an
|
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
|
either express or implied. See the License for the specific
|
|
language governing permissions and limitations under the
|
|
License.
|
|
--%>
|
|
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
|
|
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
|
|
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
|
|
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
|
|
|
|
<f:verbatim>
|
|
<script type="text/javascript" src="<%=request.getContextPath()%>/scripts/validation.js"> </script>
|
|
|
|
<script type="text/javascript">
|
|
var finishButtonPressed = false;
|
|
window.onload = pageLoaded;
|
|
|
|
function pageLoaded()
|
|
{
|
|
document.getElementById("wizard:wizard-body:file-name").focus();
|
|
document.getElementById("wizard").onsubmit = validate;
|
|
document.getElementById("wizard:next-button").onclick = function() {finishButtonPressed = true; clear_wizard();}
|
|
document.getElementById("wizard:finish-button").onclick = function() {finishButtonPressed = true; clear_wizard();}
|
|
}
|
|
|
|
function checkButtonState()
|
|
{
|
|
if (document.getElementById("wizard:wizard-body:file-name").value.length == 0 )
|
|
{
|
|
document.getElementById("wizard:next-button").disabled = true;
|
|
document.getElementById("wizard:finish-button").disabled = true;
|
|
}
|
|
else
|
|
{
|
|
document.getElementById("wizard:next-button").disabled = false;
|
|
document.getElementById("wizard:finish-button").disabled = false;
|
|
}
|
|
}
|
|
|
|
function validate()
|
|
{
|
|
if (finishButtonPressed)
|
|
{
|
|
finishButtonPressed = false;
|
|
return validateName(document.getElementById("wizard:wizard-body:file-name"),
|
|
'</f:verbatim><a:outputText value="#{msg.validation_invalid_character}" /><f:verbatim>',
|
|
true);
|
|
}
|
|
else
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
|
|
</script>
|
|
</f:verbatim>
|
|
|
|
<a:errors message="#{msg.error_wizard}" styleClass="errorMessage" />
|
|
|
|
<h:panelGrid columns="1" cellpadding="2" style="padding-top: 4px; padding-bottom: 4px;"
|
|
width="100%" rowClasses="wizardSectionHeading">
|
|
<h:outputText value=" #{msg.general_properties}" escape="false" />
|
|
</h:panelGrid>
|
|
|
|
<h:panelGrid columns="3" cellpadding="3" cellspacing="3" border="0">
|
|
<h:graphicImage value="/images/icons/required_field.gif" alt="Required Field" />
|
|
<h:outputText value="#{msg.name}:"/>
|
|
<h:inputText id="file-name" value="#{WizardManager.bean.fileName}"
|
|
maxlength="1024" size="35"
|
|
onkeyup="checkButtonState();"
|
|
onchange="checkButtonState();" />
|
|
|
|
<h:outputText value=""/>
|
|
<h:outputText value="#{msg.type}:"/>
|
|
<h:selectOneMenu value="#{WizardManager.bean.objectType}">
|
|
<f:selectItems value="#{WizardManager.bean.objectTypes}" />
|
|
</h:selectOneMenu>
|
|
|
|
<h:outputText value=""/>
|
|
<h:outputText value="#{msg.content_type}:"/>
|
|
<h:selectOneMenu value="#{WizardManager.bean.mimeType}"
|
|
valueChangeListener="#{WizardManager.bean.createContentChanged}">
|
|
<f:selectItems value="#{WizardManager.bean.createMimeTypes}" />
|
|
</h:selectOneMenu>
|
|
</h:panelGrid>
|
|
|
|
<h:panelGrid columns="1" cellpadding="3" cellspacing="3" border="0" style="padding-top: 4px;"
|
|
width="100%" rowClasses="wizardSectionHeading, paddingRow"
|
|
rendered="#{WizardManager.bean.otherPropertiesChoiceVisible}">
|
|
<h:outputText value=" #{msg.other_properties}" escape="false" />
|
|
<h:outputText value="#{msg.modify_props_help_text}" />
|
|
</h:panelGrid>
|
|
|
|
<h:panelGrid style="padding-top: 2px;" columns="2"
|
|
rendered="#{WizardManager.bean.otherPropertiesChoiceVisible}">
|
|
<h:selectBooleanCheckbox value="#{WizardManager.bean.showOtherProperties}" />
|
|
<h:outputText value="#{msg.modify_props_when_wizard_closes}" />
|
|
</h:panelGrid>
|