Subversion Repositories DevTools

Rev

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

Rev 151 Rev 191
Line 36... Line 36...
36
Dim Query_String
36
Dim Query_String
37
Dim parVCSTag
37
Dim parVCSTag
38
Dim parBSName
38
Dim parBSName
39
Dim submit_action_url
39
Dim submit_action_url
40
Dim on_submit_validation
40
Dim on_submit_validation
-
 
41
Dim sDefaultLabel, sLabel, sLabelReadOnly
-
 
42
Dim isWIP
41
'------------ Constants Declaration -----------
43
'------------ Constants Declaration -----------
42
'------------ Variable Init -------------------
44
'------------ Variable Init -------------------
43
Set objFormCollector = CreateObject("Scripting.Dictionary")
45
Set objFormCollector = CreateObject("Scripting.Dictionary")
44
parPv_id = QStrPar("pv_id")
46
parPv_id = QStrPar("pv_id")
45
parVCSTag = QStrPar("vcs_tag")
47
parVCSTag = QStrPar("vcs_tag")
Line 387... Line 389...
387
   rsTemp.Edit
389
   rsTemp.Edit
388
 
390
 
389
   ' Only update build critical sections (label, source path) if allowed
391
   ' Only update build critical sections (label, source path) if allowed
390
   If criticalSectionIsEditable Then
392
   If criticalSectionIsEditable Then
391
 
393
 
392
      If (objFormCollector.Item("vcs_tag") <> enum_VCS_CLEARCASE_TAG) AND (objFormCollector.Item("vcs_tag") <> enum_VCS_CVS_TAG) Then
394
      If (objFormCollector.Item("vcs_tag") = enum_VCS_CLEARCASE_TAG) OR _
-
 
395
         (objFormCollector.Item("vcs_tag") = enum_VCS_CVS_TAG) Then
-
 
396
        rsTemp.Fields("pkg_label").Value = SSLabel
-
 
397
      ElseIf (objFormCollector.Item("vcs_tag") = enum_VCS_SVN_TAG) and isWIP Then
393
         rsTemp.Fields("pkg_label").Value = "N/A"
398
        rsTemp.Fields("pkg_label").Value = SSLabel
394
      Else
399
      Else
395
         rsTemp.Fields("pkg_label").Value = SSLabel
400
        rsTemp.Fields("pkg_label").Value = "N/A"
396
      End If
401
      End If
397
 
402
 
398
      rsTemp.Fields("src_path").Value = SSPath
403
      rsTemp.Fields("src_path").Value = SSPath
399
   End If
404
   End If
400
 
405
 
Line 620... Line 625...
620
 
625
 
621
 
626
 
622
'--- Access Control Setup ------------
627
'--- Access Control Setup ------------
623
pageIsEditable = Is_Page_Editable ( objFormCollector.Item ("dlocked") )
628
pageIsEditable = Is_Page_Editable ( objFormCollector.Item ("dlocked") )
624
criticalSectionIsEditable = Is_Critical_Section_Editable ( objFormCollector.Item("dlocked") )
629
criticalSectionIsEditable = Is_Critical_Section_Editable ( objFormCollector.Item("dlocked") )
-
 
630
isWIP = PackageExists(parRtag_id,parPv_id,"work_in_progress")
625
 
631
 
626
If criticalSectionIsEditable then
632
If criticalSectionIsEditable then
627
   disableCriticalSectionEdit = ""
633
   disableCriticalSectionEdit = ""
628
Else
634
Else
629
   disableCriticalSectionEdit = "disabled"
635
   disableCriticalSectionEdit = "disabled"
Line 869... Line 875...
869
                  <tr>
875
                  <tr>
870
                     <td>&nbsp;</td>
876
                     <td>&nbsp;</td>
871
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Label<%=Quick_Help ( "pkg_label" )%></td>
877
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Label<%=Quick_Help ( "pkg_label" )%></td>
872
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
878
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
873
                        <%
879
                        <%
874
                        Dim sDefaultLabel, sLabel, sLabelReadOnly
-
 
875
                        sLabelReadOnly = ""
880
                        sLabelReadOnly = ""
876
                        sDefaultLabel = Default_Label(parPv_id, objFormCollector.Item("build_type"), objFormCollector.Item("pkg_name"), objFormCollector.Item("pkg_version"), objFormCollector.Item("v_ext"))
881
                        sDefaultLabel = Default_Label(parPv_id, objFormCollector.Item("build_type"), objFormCollector.Item("pkg_name"), objFormCollector.Item("pkg_version"), objFormCollector.Item("v_ext"))
877
 
882
 
878
                        If objFormCollector.Item("build_type") = "A" AND NOT criticalSectionIsEditable Then
883
                        If objFormCollector.Item("build_type") = "A" AND NOT criticalSectionIsEditable Then
879
                           sLabelReadOnly = "readonly"
884
                           sLabelReadOnly = "readonly"
Line 928... Line 933...
928
                        <br>
933
                        <br>
929
                        Example:<br>MASS_Dev_Infra/core_cs/trunk@12843 <br>
934
                        Example:<br>MASS_Dev_Infra/core_cs/trunk@12843 <br>
930
                     </td>
935
                     </td>
931
                     <td valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_txt"><%=objForm.Validate ("FRpath")%></td>
936
                     <td valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_txt"><%=objForm.Validate ("FRpath")%></td>
932
                  </tr>
937
                  </tr>
-
 
938
                  <%If isWIP Then %>
-
 
939
                  <tr>
-
 
940
                     <td>&nbsp;</td>
-
 
941
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">WIP Tag</td>
-
 
942
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
-
 
943
                        <%
-
 
944
                        sLabelReadOnly = ""
-
 
945
                        sDefaultLabel = Default_Label(parPv_id, objFormCollector.Item("build_type"), objFormCollector.Item("pkg_name"), objFormCollector.Item("pkg_version"), objFormCollector.Item("v_ext"))
-
 
946
 
-
 
947
                        If objFormCollector.Item("build_type") = "A" AND NOT criticalSectionIsEditable Then
-
 
948
                           sLabelReadOnly = "readonly"
-
 
949
                        End If
-
 
950
 
-
 
951
                        If objForm.IsPostBack Then
-
 
952
                           sLabel = Request("FRlabel")
-
 
953
 
-
 
954
                           ' If a user has switched the form back and forth between different VCS settings, and the previous one did not utilise a label
-
 
955
                           ' the FRlabel request we just did will return a null/empty, so set sLabel to the default label once more if this is the case.
-
 
956
                           ' Also, we use the SetValueForced() function to force the value of sLabel into the object that does some of our validation for us.
-
 
957
                           ' That function (as opposed to the plain SetValue() function) cares nothing about the setting of the IsPostBack flag in the
-
 
958
                           ' object. If we didnt do this, the field on the visible form would be highlighted with "Required" because SetValue() just does
-
 
959
                           ' a Request() in IsPostBack situations, and so our sLabel value will not be acquired by the object for validation.
-
 
960
                           If IsNull(sLabel) OR sLabel = "" Then
-
 
961
                              sLabel = sDefaultLabel
-
 
962
                              objForm.SetValueForced "FRlabel", sLabel
-
 
963
                           End If
-
 
964
                        Else
-
 
965
                           If (objFormCollector.Item("pkg_label") = "N/A") Then
-
 
966
                              sLabel = "N/A"
-
 
967
                           Else
-
 
968
                              If objFormCollector.Item("pkg_label") = "" OR IsNull(objFormCollector.Item("pkg_label"))  Then
-
 
969
                                 sLabel = sDefaultLabel
-
 
970
                              Else
-
 
971
                                 sLabel = objFormCollector.Item("pkg_label")
-
 
972
                              End If
-
 
973
                              objForm.SetValue "FRlabel", sLabel
-
 
974
                           End If
-
 
975
                        End If
-
 
976
                        %>
-
 
977
                        <input type="text" name="FRlabel" id="FRlabel" maxlength="50" size="60" class="form_item" <%=disableCriticalSectionEdit%> value="<%=sLabel%>" <%=sLabelReadOnly%>>
-
 
978
                     </td>
-
 
979
                     <td valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_txt"><%=objForm.Validate ("FRlabel")%></td>
-
 
980
                  </tr>
-
 
981
                  <%End If%>
933
               <%ElseIf (objFormCollector.Item("vcs_tag") = enum_VCS_CVS_TAG) Then%>
982
               <%ElseIf (objFormCollector.Item("vcs_tag") = enum_VCS_CVS_TAG) Then%>
934
                  <tr>
983
                  <tr>
935
                     <td>&nbsp;</td>
984
                     <td>&nbsp;</td>
936
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Label<%=Quick_Help ( "pkg_label" )%></td>
985
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Label<%=Quick_Help ( "pkg_label" )%></td>
937
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
986
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">