MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / add_to_form

Method add_to_form

thirdparty/clientform/clientform.py:2028–2045  ·  view source on GitHub ↗
(self, form)

Source from the content-addressed store, hash-verified

2026 self._closed = True
2027
2028 def add_to_form(self, form):
2029 assert self._form is None or form == self._form, (
2030 "can't add control to more than one form")
2031 self._form = form
2032 if self.name is None:
2033 # always count nameless elements as separate controls
2034 Control.add_to_form(self, form)
2035 else:
2036 for ii in xrange(len(form.controls)-1, -1, -1):
2037 control = form.controls[ii]
2038 if control.name == self.name and control.type == self.type:
2039 if control._closed:
2040 Control.add_to_form(self, form)
2041 else:
2042 control.merge_control(self)
2043 break
2044 else:
2045 Control.add_to_form(self, form)
2046
2047 def merge_control(self, control):
2048 assert bool(control.multiple) == bool(self.multiple)

Callers

nothing calls this directly

Calls 3

xrangeClass · 0.85
merge_controlMethod · 0.80
add_to_formMethod · 0.45

Tested by

no test coverage detected