Subversion Repositories DevTools

Rev

Rev 191 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 191 Rev 1376
Line 557... Line 557...
557
'----------------------------------------------------------------------------------------------------------------------
557
'----------------------------------------------------------------------------------------------------------------------
558
' This subroutine sets up the on_submit_validation string to be used in the form tag to validate certain fields
558
' This subroutine sets up the on_submit_validation string to be used in the form tag to validate certain fields
559
' in client-side javascript when a user tries to submit the form
559
' in client-side javascript when a user tries to submit the form
560
Sub Determine_On_Submit_Validation
560
Sub Determine_On_Submit_Validation
561
   on_submit_validation = ""
561
   on_submit_validation = ""
-
 
562
   Dim args
562
 
563
 
563
   If (objFormCollector.Item("vcs_tag") = enum_VCS_CLEARCASE_TAG) Then
564
   If (objFormCollector.Item("vcs_tag") = enum_VCS_CLEARCASE_TAG) Then
564
      ' Do clearcase path + label validation
565
      ' Do clearcase path + label validation
565
      on_submit_validation = "onSubmit=""MM_validateForm('FRlabel','Label','RisCCLabel','FRpath','Source Path','RisCCPath' ); return document.MM_returnValue"""
566
      args = "'FRlabel','Label','RisCCLabel','FRpath','Source Path','RisCCPath'"
566
   ElseIf (objFormCollector.Item("vcs_tag") = enum_VCS_SUBVERSION_TAG) Then
567
   ElseIf (objFormCollector.Item("vcs_tag") = enum_VCS_SUBVERSION_TAG) Then
567
      ' Do subversion tag validation
568
      ' Do subversion tag validation
-
 
569
      args = "'FRpath','Source Path','RisSVNPath'"
-
 
570
      args = args & ",'FRlabel','Subversion Tag','RisSVNTag'"
-
 
571
      If (objFormCollector.Item("build_type") = "M" ) Then
568
      on_submit_validation = "onSubmit=""MM_validateForm('FRpath','Subversion TAG','RisSVNTag' ); return document.MM_returnValue"""
572
          args = args & ",'FRlabel','Subversion Tag','RisSVNPegTag'"
-
 
573
      End If
569
   End If
574
   End If
-
 
575
   on_submit_validation = "onSubmit=""MM_validateForm(" & args & "); return document.MM_returnValue"""
570
 
576
 
571
End Sub
577
End Sub
572
'----------------------------------------------------------------------------------------------------------------------
578
'----------------------------------------------------------------------------------------------------------------------
573
' This function obtains a BM_ID (build machine ID) from a buidl machine name by querrying the database
579
' This function obtains a BM_ID (build machine ID) from a buidl machine name by querrying the database
574
Function Get_BM_ID_for_BM_Name(nBm_Name)
580
Function Get_BM_ID_for_BM_Name(nBm_Name)
Line 605... Line 611...
605
 
611
 
606
 
612
 
607
 
613
 
608
'--- From Validation Rule Changes ----
614
'--- From Validation Rule Changes ----
609
 
615
 
610
' Dont need the label if not using clearcase
616
' Dont need the label if the package version is uncontrolled
611
If (objFormCollector.Item("vcs_tag") <> enum_VCS_CLEARCASE_TAG) AND (objFormCollector.Item("vcs_tag") <> enum_VCS_CVS_TAG)  Then
617
If (objFormCollector.Item("vcs_tag") = enum_VCS_UNCONTROLLED_TAG) Then
612
   objForm.UpdateRules ("id='FRlabel' IsRequired='N'")
618
   objForm.UpdateRules ("id='FRlabel' IsRequired='N'")
613
End If
619
End If
614
 
620
 
615
' Dont need the path if the package version is uncontrolled
621
' Dont need the path if the package version is uncontrolled
616
If (objFormCollector.Item("vcs_tag") = enum_VCS_UNCONTROLLED_TAG) Then
622
If (objFormCollector.Item("vcs_tag") = enum_VCS_UNCONTROLLED_TAG) Then
Line 794... Line 800...
794
}
800
}
795
 
801
 
796
// This function will replace back slashes with forward slashes and can be used with an onchange event on fields
802
// This function will replace back slashes with forward slashes and can be used with an onchange event on fields
797
// where back slashes may be entered
803
// where back slashes may be entered
798
function replace_back_slashes(e) {
804
function replace_back_slashes(e) {
-
 
805
   strip_whitespace(e);
799
   var str = e.value;
806
   var str = e.value;
800
   e.value = str.replace(/\\/g,"/");
807
   e.value = str.replace(/\\/g,"/");
801
}
808
}
802
 
809
 
-
 
810
function strip_whitespace(e) {
-
 
811
   var str = e.value;
-
 
812
   str = str.replace(/^\s+/,"");
-
 
813
   e.value =  str.replace(/\s+$/,"");
-
 
814
}
-
 
815
 
803
//-->
816
//-->
804
</script>
817
</script>
805
</head>
818
</head>
806
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
819
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
807
<!-- TIPS LAYERS -------------------------------------->
820
<!-- TIPS LAYERS -------------------------------------->
Line 870... Line 883...
870
                     <% Call RenderVCSCombo(objFormCollector.Item("vcs_tag"))%>
883
                     <% Call RenderVCSCombo(objFormCollector.Item("vcs_tag"))%>
871
                  </td>
884
                  </td>
872
               </tr>
885
               </tr>
873
 
886
 
874
               <%If (objFormCollector.Item("vcs_tag") = enum_VCS_CLEARCASE_TAG) Then%>
887
               <%If (objFormCollector.Item("vcs_tag") = enum_VCS_CLEARCASE_TAG) Then%>
-
 
888
 
-
 
889
                  <tr>
-
 
890
                     <td>&nbsp;</td>
-
 
891
                     <td valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Source Path<%=Quick_Help ( "src_path" )%></td>
-
 
892
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
-
 
893
                        <input name="FRpath" type="text" class="form_item" <%=disableCriticalSectionEdit%> id="FRpath" onchange="replace_back_slashes(this);" value="<%=objForm.GetValue( "FRpath", objFormCollector.Item("src_path") )%>" size="60" maxlength="2000">
-
 
894
                        <br>&nbsp;Example: /MASS_Dev_Infra/core_cs <br>
-
 
895
                     </td>
-
 
896
                     <td valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_txt"><%=objForm.Validate ("FRpath")%></td>
-
 
897
                  </tr>
-
 
898
               
875
                  <tr>
899
                  <tr>
876
                     <td>&nbsp;</td>
900
                     <td>&nbsp;</td>
877
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Label<%=Quick_Help ( "pkg_label" )%></td>
901
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Label<%=Quick_Help ( "pkg_label" )%></td>
878
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
902
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
879
                        <%
903
                        <%
Line 908... Line 932...
908
                              End If
932
                              End If
909
                              objForm.SetValue "FRlabel", sLabel
933
                              objForm.SetValue "FRlabel", sLabel
910
                           End If
934
                           End If
911
                        End If
935
                        End If
912
                        %>
936
                        %>
913
                        <input type="text" name="FRlabel" id="FRlabel" maxlength="50" size="60" class="form_item" <%=disableCriticalSectionEdit%> value="<%=sLabel%>" <%=sLabelReadOnly%>>
937
                        <input type="text" name="FRlabel" id="FRlabel" maxlength="50" size="60" class="form_item" <%=disableCriticalSectionEdit%> onchange="strip_whitespace(this);" value="<%=sLabel%>" <%=sLabelReadOnly%>>
-
 
938
                        <br>&nbsp;Example: core_cs_1.0.0000.cr<br>
914
                     </td>
939
                     </td>
915
                     <td valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_txt"><%=objForm.Validate ("FRlabel")%></td>
940
                     <td valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_txt"><%=objForm.Validate ("FRlabel")%></td>
916
                  </tr>
941
                  </tr>
917
                  <tr>
-
 
918
                     <td>&nbsp;</td>
-
 
919
                     <td valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Source Path<%=Quick_Help ( "src_path" )%></td>
-
 
920
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
-
 
921
                        <input name="FRpath" type="text" class="form_item" <%=disableCriticalSectionEdit%> id="FRpath" onchange="replace_back_slashes(this);" value="<%=objForm.GetValue( "FRpath", objFormCollector.Item("src_path") )%>" size="60" maxlength="2000">
942
 
922
                        <br>
-
 
923
                        Example:<br>/MASS_Dev_Infra/core_cs <br>
-
 
924
                     </td>
-
 
925
                     <td valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_txt"><%=objForm.Validate ("FRpath")%></td>
-
 
926
                  </tr>
-
 
927
               <%ElseIf (objFormCollector.Item("vcs_tag") = enum_VCS_SUBVERSION_TAG) Then%>
943
               <%ElseIf (objFormCollector.Item("vcs_tag") = enum_VCS_SUBVERSION_TAG) Then%>
928
                  <tr>
944
                  <tr>
929
                     <td>&nbsp;</td>
945
                     <td>&nbsp;</td>
930
                     <td valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_field">SubVersion Tag<%=Quick_Help ( "svn_tag" )%></td>
946
                     <td valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Source Path<%=Quick_Help ( "svn_source_path" )%></td>
931
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
947
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
932
                        <input name="FRpath" type="text" class="form_item" <%=disableCriticalSectionEdit%> id="FRpath" onchange="replace_back_slashes(this);" value="<%=objForm.GetValue( "FRpath", objFormCollector.Item("src_path") )%>" size="60" maxlength="2000">
948
                        <input name="FRpath" type="text" class="form_item" <%=disableCriticalSectionEdit%> id="FRpath" onchange="replace_back_slashes(this);" value="<%=objForm.GetValue( "FRpath", objFormCollector.Item("src_path") )%>" size="60" maxlength="2000">
933
                        <br>
-
 
934
                        Example:<br>MASS_Dev_Infra/core_cs/trunk@12843 <br>
949
                        <br>&nbsp;Example: AUPERASVN01/RepoName/myPackage/trunk<br>
935
                     </td>
950
                     </td>
936
                     <td valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_txt"><%=objForm.Validate ("FRpath")%></td>
951
                     <td valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_txt"><%=objForm.Validate ("FRpath")%></td>
937
                  </tr>
952
                  </tr>
938
                  <%If isWIP Then %>
-
 
939
                  <tr>
953
                  <tr>
940
                     <td>&nbsp;</td>
954
                     <td>&nbsp;</td>
941
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">WIP Tag</td>
955
                     <td nowrap valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Tag<%=Quick_Help ( "svn_tag" )%></td>
942
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
956
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
943
                        <%
957
                        <%
944
                        sLabelReadOnly = ""
958
                        sLabelReadOnly = ""
945
                        sDefaultLabel = Default_Label(parPv_id, objFormCollector.Item("build_type"), objFormCollector.Item("pkg_name"), objFormCollector.Item("pkg_version"), objFormCollector.Item("v_ext"))
959
                        sDefaultLabel = Default_Label(parPv_id, objFormCollector.Item("build_type"), objFormCollector.Item("pkg_name"), objFormCollector.Item("pkg_version"), objFormCollector.Item("v_ext"))
946
 
960
 
Line 972... Line 986...
972
                              End If
986
                              End If
973
                              objForm.SetValue "FRlabel", sLabel
987
                              objForm.SetValue "FRlabel", sLabel
974
                           End If
988
                           End If
975
                        End If
989
                        End If
976
                        %>
990
                        %>
-
 
991
 
977
                        <input type="text" name="FRlabel" id="FRlabel" maxlength="50" size="60" class="form_item" <%=disableCriticalSectionEdit%> value="<%=sLabel%>" <%=sLabelReadOnly%>>
992
                        <input type="text" name="FRlabel" id="FRlabel" maxlength="50" size="60" class="form_item" <%=disableCriticalSectionEdit%> onchange="strip_whitespace(this);" value="<%=sLabel%>" <%=sLabelReadOnly%>>
-
 
993
                        <%
-
 
994
                        If objFormCollector.Item("build_type") = "M" Then
-
 
995
                            %> <br>&nbsp;Example: <%=sDefaultLabel%>@1234<br> <%
-
 
996
                        Else
-
 
997
                            %> <br>&nbsp;Example: <%=sDefaultLabel%>[@1234]<br> <%
-
 
998
                        End If
-
 
999
                        %>
978
                     </td>
1000
                     </td>
979
                     <td valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_txt"><%=objForm.Validate ("FRlabel")%></td>
1001
                     <td valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_txt"><%=objForm.Validate ("FRlabel")%></td>
980
                  </tr>
1002
                  </tr>
981
                  <%End If%>
-
 
-
 
1003
 
982
               <%ElseIf (objFormCollector.Item("vcs_tag") = enum_VCS_CVS_TAG) Then%>
1004
               <%ElseIf (objFormCollector.Item("vcs_tag") = enum_VCS_CVS_TAG) Then%>
983
                  <tr>
1005
                  <tr>
984
                     <td>&nbsp;</td>
1006
                     <td>&nbsp;</td>
985
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Label<%=Quick_Help ( "pkg_label" )%></td>
1007
                     <td valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Source Path<%=Quick_Help ( "src_path" )%></td>
986
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
1008
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
987
                        <input type="text" name="FRlabel" id="FRlabel" maxlength="50" size="60" class="form_item" <%=disableCriticalSectionEdit%> value="<%=objForm.GetValue( "FRlabel", objFormCollector.Item("pkg_label") )%>" >
1009
                        <input name="FRpath" type="text" class="form_item" <%=disableCriticalSectionEdit%> id="FRpath" onchange="replace_back_slashes(this);" value="<%=objForm.GetValue( "FRpath", objFormCollector.Item("src_path") )%>" size="60" maxlength="2000">
-
 
1010
                        <br>&nbsp;Example: /MASS_Dev_Infra/core_cs<br>
988
                     </td>
1011
                     </td>
989
                     <td valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_txt"><%=objForm.Validate ("FRlabel")%></td>
1012
                     <td valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_txt"><%=objForm.Validate ("FRpath")%></td>
990
                  </tr>
1013
                  </tr>
-
 
1014
 
991
                  <tr>
1015
                  <tr>
992
                     <td>&nbsp;</td>
1016
                     <td>&nbsp;</td>
993
                     <td valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Source Path<%=Quick_Help ( "src_path" )%></td>
1017
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Label<%=Quick_Help ( "pkg_label" )%></td>
994
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
1018
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
995
                        <input name="FRpath" type="text" class="form_item" <%=disableCriticalSectionEdit%> id="FRpath" onchange="replace_back_slashes(this);" value="<%=objForm.GetValue( "FRpath", objFormCollector.Item("src_path") )%>" size="60" maxlength="2000">
1019
                        <input type="text" name="FRlabel" id="FRlabel" maxlength="50" size="60" class="form_item" <%=disableCriticalSectionEdit%> onchange="strip_whitespace(this);" value="<%=objForm.GetValue( "FRlabel", objFormCollector.Item("pkg_label") )%>" >
996
                        <br>
-
 
997
                        Example:<br>/MASS_Dev_Infra/core_cs <br>
-
 
998
                     </td>
1020
                     </td>
999
                     <td valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_txt"><%=objForm.Validate ("FRpath")%></td>
1021
                     <td valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_txt"><%=objForm.Validate ("FRlabel")%></td>
1000
                  </tr>
1022
                  </tr>
-
 
1023
 
1001
               <%ElseIf (objFormCollector.Item("vcs_tag") = enum_VCS_UNCONTROLLED_TAG) Then%>
1024
               <%ElseIf (objFormCollector.Item("vcs_tag") = enum_VCS_UNCONTROLLED_TAG) Then%>
1002
                  <input name="FRlabel" type="hidden" id="FRlabel" value="<%=sLabel%>">
-
 
1003
                  <input name="FRpath"  type="hidden" id="FRpath"  value="<%=objForm.GetValue( "FRpath", objFormCollector.Item("src_path") )%>">
1025
                  <input name="FRpath"  type="hidden" id="FRpath"  value="<%=objForm.GetValue( "FRpath", objFormCollector.Item("src_path") )%>">
-
 
1026
                  <input name="FRlabel" type="hidden" id="FRlabel" value="<%=sLabel%>">
1004
               <%Else%>
1027
               <%Else%>
1005
                  <tr>
1028
                  <tr>
1006
                     <td>&nbsp;</td>
1029
                     <td>&nbsp;</td>
1007
                     <td colspan=3 background="images/bg_form_lightbluedark.gif" class="sublbox_txt">
1030
                     <td colspan=3 background="images/bg_form_lightbluedark.gif" class="sublbox_txt">
1008
                        <span class='err_alert'><b>WARNING:</b> Release Manager Website does not currently support the selected Version Control System</span>
1031
                        <span class='err_alert'><b>WARNING:</b> Release Manager Website does not currently support the selected Version Control System</span>
1009
                     </td>
1032
                     </td>
1010
                  </tr>
1033
                  </tr>
1011
                  <input name="FRlabel" type="hidden" id="FRlabel" value="<%=sLabel%>">
-
 
1012
                  <input name="FRpath"  type="hidden" id="FRpath"  value="<%=objForm.GetValue( "FRpath", objFormCollector.Item("src_path") )%>">
1034
                  <input name="FRpath"  type="hidden" id="FRpath"  value="<%=objForm.GetValue( "FRpath", objFormCollector.Item("src_path") )%>">
-
 
1035
                  <input name="FRlabel" type="hidden" id="FRlabel" value="<%=sLabel%>">
1013
               <%End If%>
1036
               <%End If%>
1014
 
1037
 
1015
               <tr>
1038
               <tr>
1016
                  <td>&nbsp;</td>
1039
                  <td>&nbsp;</td>
1017
                  <td valign="top" background="images/bg_form_lightbluedark.gif" class="form_field">Short Package Description<%=Quick_Help ( "pkg_info_short_desc" )%></td>
1040
                  <td valign="top" background="images/bg_form_lightbluedark.gif" class="form_field">Short Package Description<%=Quick_Help ( "pkg_info_short_desc" )%></td>