mirror of
https://github.com/internetee/registry.git
synced 2025-08-06 01:35:10 +02:00
Modifications for updating business and private contacts
This commit is contained in:
parent
4afd32ebff
commit
eb64b3aca4
10 changed files with 159 additions and 163 deletions
|
@ -1,10 +0,0 @@
|
|||
builder.extension do
|
||||
builder.tag!('changePoll:changeData',
|
||||
'xmlns:changePoll' => Xsd::Schema.filename(for_prefix: 'changePoll', for_version: '1.0')) do
|
||||
builder.tag!('changePoll:operation', action.operation)
|
||||
builder.tag!('changePoll:date', action.created_at.utc.xmlschema)
|
||||
builder.tag!('changePoll:svTRID', action.id)
|
||||
builder.tag!('changePoll:who', action.user)
|
||||
builder.tag!('changePoll:reason', 'Auto-update according to official data') if action.bulk_action?
|
||||
end
|
||||
end
|
18
app/views/epp/poll/_extension.xml.builder
Normal file
18
app/views/epp/poll/_extension.xml.builder
Normal file
|
@ -0,0 +1,18 @@
|
|||
builder.extension do
|
||||
builder.tag!('changePoll:changeData',
|
||||
'xmlns:changePoll' => Xsd::Schema.filename(for_prefix: 'changePoll',
|
||||
for_version: '1.0')) do
|
||||
case type
|
||||
when 'action'
|
||||
builder.tag!('changePoll:operation', obj.operation)
|
||||
builder.tag!('changePoll:date', obj.created_at.utc.xmlschema)
|
||||
builder.tag!('changePoll:svTRID', obj.id)
|
||||
builder.tag!('changePoll:who', obj.user)
|
||||
if obj.bulk_action?
|
||||
builder.tag!('changePoll:reason', 'Auto-update according to official data')
|
||||
end
|
||||
when 'state'
|
||||
builder.tag!('changePoll:operation', obj)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -29,18 +29,15 @@ xml.epp_head do
|
|||
if @notification.action || @notification.registry_lock?
|
||||
if @notification.registry_lock?
|
||||
state = @notification.text.include?('unlocked') ? 'unlock' : 'lock'
|
||||
xml.extension do
|
||||
xml.tag!('changePoll:changeData',
|
||||
'xmlns:changePoll': Xsd::Schema.filename(for_prefix: 'changePoll')) do
|
||||
xml.tag!('changePoll:operation', state)
|
||||
end
|
||||
end
|
||||
render(partial: 'epp/poll/extension',
|
||||
locals: { builder: xml,
|
||||
obj: state,
|
||||
type: 'state' })
|
||||
else
|
||||
render(partial: 'epp/poll/action',
|
||||
locals: {
|
||||
builder: xml,
|
||||
action: @notification.action,
|
||||
})
|
||||
render(partial: 'epp/poll/extension',
|
||||
locals: { builder: xml,
|
||||
obj: @notification.action,
|
||||
type: 'action' })
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue