This commit is contained in:
Martin Lensment 2015-07-20 15:19:50 +03:00
parent d62a5d5b9b
commit 46a2a3b5fe
2 changed files with 4 additions and 7 deletions

View file

@ -95,13 +95,9 @@ class Epp::DomainsController < EppController
def renew def renew
authorize! :renew, @domain authorize! :renew, @domain
period = params[:parsed_frame].css('period').text.presence || 1 period_element = params[:parsed_frame].css('period').text
period_unit = 'y' period = (period_element.to_i == 0) ? 1 : period_element.to_i
period_element = params[:parsed_frame].css('period').first period_unit = Epp::Domain.parse_period_unit_from_frame(params[:parsed_frame]) || 'y'
if period_element.present? && period_element['unit'].present?
period_unit = period_element['unit']
end
ActiveRecord::Base.transaction do ActiveRecord::Base.transaction do
success = @domain.renew( success = @domain.renew(

View file

@ -18,6 +18,7 @@ Domain name mapping protocol short version:
<domain:period> 0-1 Registration period for domain. <domain:period> 0-1 Registration period for domain.
Must add up to 1 / 2 / 3 years. Must add up to 1 / 2 / 3 years.
Attribute: unit="y/m/d" Attribute: unit="y/m/d"
Default is 1 year.
<domain:registrant> 1 Contact reference to the registrant <domain:registrant> 1 Contact reference to the registrant
Attribute: Attribute:
"verified" # optional, allowed values 'yes', 'no' "verified" # optional, allowed values 'yes', 'no'