Commit 213b191bf04e8e0eb166972cc0de365bab6dad1b
1 parent
d2adbd4b
Fixed cancel button to avoid use javascrit action
Signed-off-by: Macartur Sousa <macartur.sc@gmail.com>
Showing
2 changed files
with
1 additions
and
7 deletions
Show diff stats
src/noosfero-spb/gov_user/public/views/create-institution.js
... | ... | @@ -165,11 +165,6 @@ modulejs.define('CreateInstitution', ['jquery', 'NoosferoRoot', 'SelectElement'] |
165 | 165 | }); |
166 | 166 | } |
167 | 167 | |
168 | - function cancel_institution(evt){ | |
169 | - evt.preventDefault(); | |
170 | - $('#institution_modal').modal('toggle'); | |
171 | - } | |
172 | - | |
173 | 168 | function institution_already_exists(){ |
174 | 169 | if( this.value.length >= 3 ) { |
175 | 170 | $.get(AJAX_URL.institution_already_exists, {name:this.value}, function(response){ |
... | ... | @@ -371,7 +366,6 @@ modulejs.define('CreateInstitution', ['jquery', 'NoosferoRoot', 'SelectElement'] |
371 | 366 | }); |
372 | 367 | |
373 | 368 | $('#save_institution_button').click(save_institution); |
374 | - $('#cancel_institution_button').click(cancel_institution); | |
375 | 369 | |
376 | 370 | $("#community_name").keyup(institution_already_exists); |
377 | 371 | ... | ... |
src/noosfero-spb/gov_user/views/gov_user_plugin/_institution.html.erb
... | ... | @@ -181,7 +181,7 @@ |
181 | 181 | <%= button(:cancel, _("Cancel"), {:controller => "admin_panel", :action => 'index'}) %> |
182 | 182 | <% else %> |
183 | 183 | <%= link_to(_('Save'), '#', :id=>'save_institution_button', :class=>'button with-text icon-add') %> |
184 | - <%= link_to(_('Cancel'), '#', :id=>"cancel_institution_button", :class=>'button with-text icon-cancel') %> | |
184 | + <%= link_to(_('Cancel'), '#', :id=>"cancel_institution_button", :class=>'button with-text icon-cancel', "data-dismiss".to_sym => "modal") %> | |
185 | 185 | <%= hidden_field_tag :institution_error_message, _("Could not send the form data to the server") %> |
186 | 186 | <% end %> |
187 | 187 | </div> | ... | ... |