name="Name" />
name="FromBaseType" />
name="DisplaySize" />
 |
|
<%
if (!bSealed)
{
%>
|
<%
}
else
{
%>
|
<%
}
%>
 |
|
| |
|
 |
| |
<%
if (bAllowFieldTypeChange == false)
{
%>
|
<%SPHttpUtility.HtmlEncode(spField.TypeShortDescription, Response.Output);%>
name="Type" />
|
<%
}
else
{
%>
<%
}
%>
|
| | |
 |
|
|
|
|
| | |
<%
if (FieldTypeName == "PageSeparator")
goto showSubmitButtons;
%>
 |
|
|
<%
if (!bSealed)
{
switch ( FieldTypeName )
{
case "Boolean" : break;
case "Calculated" : break;
default :
if (spList != null &&
spList.AllowContentTypes &&
spList.ContentTypesEnabled)
{
SPContentTypeCollection cts = spList.ContentTypes;
bool bShowRequiredProp = true;
if (cts.Count > 1)
{
bShowRequiredProp = false;
if (cts.Count == 2)
{
SPContentTypeId ctId = cts.BestMatch(SPBuiltInContentTypeId.Folder);
bShowRequiredProp = ctId.Parent == SPBuiltInContentTypeId.Folder;
}
}
if (!bShowRequiredProp)
break;
}
%>
|
<%
%>
|
<%
break;
}
%>
<%
bool bShowEnforceUniqueValuesControl = false;
if (spField.TypeAsString != FieldTypeName)
{
bShowEnforceUniqueValuesControl = CanSetUniquenessOnNewField(FieldTypeName);
}
else
{
bShowEnforceUniqueValuesControl = CanSetUniquenessOnField(spField);
}
if (bShowEnforceUniqueValuesControl)
{
%>
|
|
|
<%
}
%>
<%
switch ( FieldTypeName )
{
case "Note" :
if (SPBaseType.DocumentLibrary == iBaseType ||
SPBaseType.UnspecifiedBaseType == iBaseType)
{
string strYes = (string)(this.GetGlobalResourceObject("wss", "fldedit_UnlimitedLengthInDocumentLibraryYes"));
string strNo = (string)(this.GetGlobalResourceObject("wss", "fldedit_UnlimitedLengthInDocumentLibraryNo"));
%>
|  |
|
|
|
<%
}
%>
|
|
|
<%
if ((SPBaseType.DocumentLibrary != iBaseType)
&& (spField.Type == SPFieldType.Text || spField.Type == SPFieldType.Note)
)
{
%>
|
|
|
<%
}
if (bShowBidiDirection) {%>
| | | | |
<%}%>
<%
break;
case "Boolean":
%>
|
:
|
|
|
<%
break;
case "URL":
%>
|
|
|
|
" />
/>
|
|
<%if (bShowBidiDirection) {%>
| | | | |
<%}%>
<%
break;
case "Calculated" :
%>
|
| | |
|
|
|
| |
|
|
|
|
|
|
|
|
:
|
|
|
|
|
|
|
|
|
|
|
|
<%if (bShowBidiDirection) {%>
| | | | |
<%}%>
<%
break;
case "Number" :
%>
|
|
|
|  |
|
|
:
|
|
|
|  |
|
|
|
|  |
|
|
|
<%if (bShowBidiDirection) {%>
| | | | |
<%}%>
<%
break;
case "Currency":
%>
|
|
|
|  |
|
|
:
|
|
|
|  |
|
|
|
|  |
|
|
|
<%if (bShowBidiDirection) {%>
| | | | |
<%}%>
<%
break;
case "Lookup" :
case "User" :
%>
|
|
|
/>
<%
if (strLookupList == "UserInfo")
{
FieldTypeName = "User";
%>
<%
}
else if (strLookupList != "Docs")
{
FieldTypeName = "Lookup";
SPSecurity.CatchAccessDeniedException = false;
SPList spListLookup = null;
try
{
spListLookup = spLists[new Guid(strLookupList)];
if (spListLookup != null)
{
SPHttpUtility.HtmlEncode(spListLookup.Title,Response.Output);
}
}
catch (UnauthorizedAccessException)
{
}
catch (SPException)
{
}
finally
{
SPSecurity.CatchAccessDeniedException = bPrevDeniedState;
}
}
%>
|
|
| |
|
|
/>
<%
if (strLookupList == "UserInfo")
{
if (strLookupField == "ID")
{
%>
<%
}
else if (strLookupField == "EMail")
{
%>
<%
}
else if (strLookupField == "Name")
{
%>
<%
}
else
{
%>
<%
}
}
else if (strLookupList != "Docs")
{
SPSecurity.CatchAccessDeniedException = false;
spFields = null;
try
{
SPList spListLookup = spLists[new Guid(strLookupList)];
if (spListLookup != null)
spFields = spListLookup.Fields;
}
catch (UnauthorizedAccessException)
{
}
catch (SPException)
{
}
finally
{
SPSecurity.CatchAccessDeniedException = bPrevDeniedState;
}
if (spFields != null)
{
try
{
spField = spFields.GetFieldByInternalName(
strLookupField);
SPHttpUtility.HtmlEncode(spField.Title,Response.Output);
switch (spField.Type)
{
case SPFieldType.Counter:
case SPFieldType.Text:
break;
default:
string L_InvalidLookupFieldType_Text =
(string)(this.GetGlobalResourceObject("wss", "fldedit_invalidtype"));
SPHttpUtility.HtmlEncode(L_InvalidLookupFieldType_Text,Response.Output);
break;
}
}
catch (ArgumentException ae)
{
SPHttpUtility.HtmlEncode(strLookupField,Response.Output);
string L_DeletedLookupField_Text =
(string)(this.GetGlobalResourceObject("wss", "fldedit_L_DeletedLookupField_Text"));
SPHttpUtility.HtmlEncode(L_DeletedLookupField_Text,Response.Output);
}
}
}
%>
|
/>
|
|
<%
if (strLookupList == "UserInfo" && Web.EffectivePresenceEnabled)
{
%>
|  |
| |
|
|
<%
}
%>
<%if (bShowBidiDirection) {%>
| | | | |
<%}%>
<%
break;
case "Choice":
%>
|
|
:
|
|  |
|
|
|
|  |
|
|
|
|  |
|
|
|
<%if (bShowBidiDirection) {%>
| | | | |
<%}%>
<%
break;
case "GridChoice":
%>
|
|
|
:
|
|  |
|
|
:
|
<% int GridSelected = GridEndNum; %>
|
|
|
|
|
|
|
checked <% } %> />
<% if (strGridNATxt != null && strGridNATxt != "") {%>
/>
<%} else { %>
<%}%>
|
<%if (bShowBidiDirection) {%>
| | | | |
<%}%>
|
 |
<%
break;
case "DateTime":
%>
|
|
|
<%if (bShowCalendarUI) {%>
|
|
|
<%}%>
|  |
|
|
|
<%if (bShowBidiDirection) {%>
| | | | |
<%}%>
<%
break;
case "Text":
%>
|
|
:
|
|  |
|
|
|
<%if (bShowBidiDirection) {%>
| | | | |
<%}%>
<%
break;
}
}
else
{
if (bShowBidiDirection) {%>
| | | | |
<%}
}
%>
<%
if (bShowIME && !bSealed
&& FieldTypeName !="Lookup" && FieldTypeName!="DateTime" && FieldTypeName != "GridChoice"
&& FieldTypeName != "Calculated" && FieldTypeName != "Number"
&& FieldTypeName != "Currency" && FieldTypeName != "User" && FieldTypeName != "Boolean"
&& !(FieldTypeName == "Note" && bRichText == true) && strField != "PageSeparator")
{
%>
|
|
|
|
|
<% } %>
<%
if (spList == null)
{
%>
| | |
 |
|
|
|
|
<%
}
%>
| | |
 |
|
|
|
|
|
|
<%
switch (spField.Type)
{
case SPFieldType.Choice:
{
Int32 iChoiceIndex = 0;
SPFieldChoice field = (SPFieldChoice)spField;
StringCollection choices = field.Choices;
foreach(String choice in choices)
{
%>
|
|
<%
iChoiceIndex++;
}
%>
|
|
<% break;
}
case SPFieldType.Boolean:
{
SPFieldBoolean field = (SPFieldBoolean)spField;
%>
|
|
|
|
<%
break;
}
default:
{
%>
|
|
<%
break;
}
}
%>
|
| | |
<%
string strValidationSectionStyle = "";
if (!bSealed)
{
if (spField.Type == SPFieldType.MultiChoice)
strValidationSectionStyle = " style='display: none'";
string strValidationSettingsStyle = " style='display: none'";
string strValidationImgSrc = "/_layouts/images/plus.gif";
if (!String.IsNullOrEmpty(VldFormula.Text) || !String.IsNullOrEmpty(VldMessage.Text))
{
strValidationSettingsStyle = "";
strValidationImgSrc = "/_layouts/images/minus.gif";
}
switch (FieldTypeName)
{
case "Choice":
case "Currency":
case "DateTime":
case "Integer":
case "Number":
case "Text":
%>
>
 |
| |
>
|
|
|
|
| | |
|
|
|
|
| | |
<%
break;
}
%>
<%
}
%>
<%
showSubmitButtons:
%>
 |
 |
| |
| |