Fixed doble form submision issue
* updated code to handle double form submision * fixed some typos Change-Id: I3384b573ad56fd96e0a1ce3adefdd9106d645c03
This commit is contained in:
parent
c69f433db2
commit
1df67dc90a
|
@ -1,6 +1,6 @@
|
|||
@extends('layout')
|
||||
@section('content')
|
||||
<h1>OpenstackId Idp - 400</h1>
|
||||
<h1>OpenStackId Idp - 400</h1>
|
||||
<div class="container">
|
||||
<p>
|
||||
400. That’s an error.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@extends('layout')
|
||||
@section('content')
|
||||
<h1>OpenstackId Idp - 404</h1>
|
||||
<h1>OpenStackId Idp - 404</h1>
|
||||
<div class="container">
|
||||
<p>
|
||||
404. That's an error.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@extends('layout')
|
||||
|
||||
@section('title')
|
||||
<title>Welcome to openstackId - Server Admin - Banned Ips</title>
|
||||
<title>Welcome to OpenStackId - Server Admin - Banned Ips</title>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@extends('layout')
|
||||
|
||||
@section('title')
|
||||
<title>Welcome to openstackId - Server Admin - Configuration</title>
|
||||
<title>Welcome to OpenStackId - Server Admin - Configuration</title>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@extends('layout')
|
||||
|
||||
@section('title')
|
||||
<title>Welcome to openstackId - Server Admin - Users</title>
|
||||
<title>Welcome to OpenStackId - Server Admin - Users</title>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@extends('layout')
|
||||
@section('title')
|
||||
<title>Welcome to openstackId</title>
|
||||
<title>Welcome to openStackId</title>
|
||||
@stop
|
||||
@section('meta')
|
||||
<meta http-equiv="X-XRDS-Location" content="{{ URL::action("DiscoveryController@idp")}}" />
|
||||
|
@ -9,7 +9,7 @@
|
|||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<h1>OpenstackId Identity Provider</h1>
|
||||
<h1>OpenStackId Identity Provider</h1>
|
||||
<div class="panel">
|
||||
<div class="panel-heading strong">Log in to OpenStack</div>
|
||||
<div style="text-align: center">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@extends('layout')
|
||||
@section('title')
|
||||
<title>Welcome to openstackId</title>
|
||||
<title>Welcome to OpenStackId</title>
|
||||
@stop
|
||||
@section('meta')
|
||||
<meta http-equiv="X-XRDS-Location" content="{{ URL::action("DiscoveryController@idp")}}" />
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@extends('layout')
|
||||
@section('title')
|
||||
<title>Welcome to openstackId - Sign in </title>
|
||||
@stop
|
||||
<title>Welcome to OpenStackId - Sign in </title>
|
||||
@append
|
||||
@section('meta')
|
||||
<meta http-equiv="X-XRDS-Location" content="{{ URL::action("DiscoveryController@idp")}}" />
|
||||
@append
|
||||
|
@ -22,7 +22,7 @@
|
|||
|
||||
<div class="col-md-4" id="sidebar">
|
||||
<div class="well">
|
||||
{{ Form::open(array('url' => URL::action('UserController@postLogin'), 'method' => 'post', "autocomplete" => "off")) }}
|
||||
{{ Form::open(array('id'=>'login_form','url' => URL::action('UserController@postLogin'), 'method' => 'post', "autocomplete" => "off")) }}
|
||||
|
||||
<legend>Login</legend>
|
||||
<div class="form-group">
|
||||
|
@ -84,4 +84,7 @@
|
|||
</div>
|
||||
<div class="col-md-8">
|
||||
</div>
|
||||
@stop
|
||||
@append
|
||||
@section('scripts')
|
||||
{{ HTML::script('assets/js/login.js') }}
|
||||
@append
|
|
@ -36,8 +36,8 @@
|
|||
</p>
|
||||
{{ Form::open(array('url' => URL::action("UserController@postConsent") ,'id'=>'authorization_form', 'method' => 'post', "autocomplete" => "off")) }}
|
||||
<input type="hidden" name='trust' id='trust' value=""/>
|
||||
<button class="btn btn-default btn-md" id="cancel-authorization" type="button">Cancel</button>
|
||||
<button class="btn btn-primary btn-md" id="approve-authorization" type="button">Accept</button>
|
||||
<button class="btn btn-default btn-md btn-consent-action" id="cancel-authorization" type="button">Cancel</button>
|
||||
<button class="btn btn-primary btn-md btn-consent-action" id="approve-authorization" type="button">Accept</button>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@extends('layout')
|
||||
|
||||
@section('title')
|
||||
<title>Welcome to openstackId - Server Admin - Api Scope Groups</title>
|
||||
<title>Welcome to OpenStackId - Server Admin - Api Scope Groups</title>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@extends('layout')
|
||||
|
||||
@section('title')
|
||||
<title>Welcome to openstackId - Server Admin - OAUTH2 - Clients</title>
|
||||
<title>Welcome to OpenStackId - Server Admin - OAUTH2 - Clients</title>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@extends('layout')
|
||||
|
||||
@section('title')
|
||||
<title>Welcome to openstackId - Server Admin - Edit Api Scope Group</title>
|
||||
<title>Welcome to OpenStackId - Server Admin - Edit Api Scope Group</title>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@extends('layout')
|
||||
|
||||
@section('title')
|
||||
<title>Welcome to openstackId - Server Admin - Edit API</title>
|
||||
<title>Welcome to OpenStackId - Server Admin - Edit API</title>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@extends('layout')
|
||||
|
||||
@section('title')
|
||||
<title>Welcome to openstackId - Server Admin - Edit API Endpoint</title>
|
||||
<title>Welcome to OpenStackId - Server Admin - Edit API Endpoint</title>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@extends('layout')
|
||||
|
||||
@section('title')
|
||||
<title>Welcome to openstackId - Server Admin - Edit Resource Server</title>
|
||||
<title>Welcome to OpenStackId - Server Admin - Edit Resource Server</title>
|
||||
@stop
|
||||
|
||||
@section('css')
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@extends('layout')
|
||||
@section('title')
|
||||
<title>Welcome to openstackId - Server Admin - Edit API Scope</title>
|
||||
<title>Welcome to OpenStackId - Server Admin - Edit API Scope</title>
|
||||
@stop
|
||||
@section('content')
|
||||
@include('menu',array('is_oauth2_admin' => $is_oauth2_admin, 'is_openstackid_admin' => $is_openstackid_admin))
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@extends('layout')
|
||||
|
||||
@section('title')
|
||||
<title>Welcome to openstackId - Server Admin - Resource Server</title>
|
||||
<title>Welcome to OpenStackId - Server Admin - Resource Server</title>
|
||||
@stop
|
||||
|
||||
@section('css')
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@extends('layout')
|
||||
@section('title')
|
||||
<title>Welcome to openstackId - Server Admin - Server Private Keys</title>
|
||||
<title>Welcome to OpenStackId - Server Admin - Server Private Keys</title>
|
||||
@stop
|
||||
@section('css')
|
||||
{{ HTML::style('bower_assets/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') }}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@extends('layout')
|
||||
@section('title')
|
||||
<title>Welcome to openstackId - OAUTH2 Console - Clients</title>
|
||||
<title>Welcome to OpenStackId - OAUTH2 Console - Clients</title>
|
||||
@stop
|
||||
@section('content')
|
||||
@include('menu',array('is_oauth2_admin' => $is_oauth2_admin, 'is_openstackid_admin' => $is_openstackid_admin))
|
||||
|
|
|
@ -136,7 +136,7 @@
|
|||
<input type="hidden" id="id" name="id" value="{{$client->id}}"/>
|
||||
<input type="hidden" id="application_type" name="application_type" value="{{$client->application_type}}"/>
|
||||
<input type="hidden" id="user_id" name="user_id" value="{{$client->user_id}}"/>
|
||||
<button type="submit" class="btn btn-default btn-md active">Save</button>
|
||||
<button type="submit" class="btn btn-default btn-md active btn-save-client-data">Save</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@extends('layout')
|
||||
|
||||
@section('title')
|
||||
<title>Welcome to openstackId - OAUTH2 Console - Edit Client</title>
|
||||
<title>Welcome to OpenStackId - OAUTH2 Console - Edit Client</title>
|
||||
@stop
|
||||
@section('css')
|
||||
{{ HTML::style('bower_assets/bootstrap-tagsinput/dist/bootstrap-tagsinput.css') }}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@extends('layout')
|
||||
@section('title')
|
||||
<title>Welcome to openstackId - My Account</title>
|
||||
<title>Welcome to OpenStackId - My Account</title>
|
||||
@stop
|
||||
@section('content')
|
||||
@include('menu',array('is_oauth2_admin' => $is_oauth2_admin, 'is_openstackid_admin' => $is_openstackid_admin))
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
@extends('layout')
|
||||
@section('title')
|
||||
<title>Welcome to openstackId - consent </title>
|
||||
@stop
|
||||
@append
|
||||
|
||||
@section('header_right')
|
||||
@if(Auth::check())
|
||||
Welcome, <a href="{{ URL::action("UserController@getProfile") }}">{{Auth::user()->identifier}}</a>
|
||||
@endif
|
||||
@stop
|
||||
@append
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
|
@ -40,13 +40,12 @@ Welcome, <a href="{{ URL::action("UserController@getProfile") }}">{{Auth::user()
|
|||
Deny Forever
|
||||
</label>
|
||||
</div>
|
||||
{{ Form::submit('Ok',array("id" => "send_authorization", 'class' => 'btn btn-default btn-lg active')) }}
|
||||
{{ Form::button('Cancel',array('id' => 'cancel_authorization', 'class' => 'btn active btn-lg btn-danger cancel_authorization')) }}
|
||||
{{ Form::submit('Ok',array("id" => "send_authorization", 'class' => 'btn btn-default btn-lg active btn-consent-action')) }}
|
||||
{{ Form::button('Cancel',array('id' => 'cancel_authorization', 'class' => 'btn active btn-lg btn-danger cancel_authorization btn-consent-action')) }}
|
||||
</fieldset>
|
||||
{{ Form::close() }}
|
||||
|
||||
</div>
|
||||
@stop
|
||||
@append
|
||||
@section('scripts')
|
||||
{{ HTML::script('assets/js/openid/consent.js') }}
|
||||
@stop
|
||||
@append
|
|
@ -1,7 +1,7 @@
|
|||
@extends('layout')
|
||||
|
||||
@section('title')
|
||||
<title>Welcome to openstackId - OpenStack ID Account Settings</title>
|
||||
<title>Welcome to OpenStackId - OpenStack ID Account Settings</title>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
jQuery(document).ready(function($){
|
||||
|
||||
$('#login_form').submit(function(){
|
||||
$('.btn-primary').attr('disabled', 'disabled');
|
||||
return true;
|
||||
});
|
||||
|
||||
});
|
|
@ -14,7 +14,7 @@ jQuery(document).ready(function($){
|
|||
});
|
||||
|
||||
$("body").on('click',"#cancel-authorization",function(event){
|
||||
$form = $('#authorization_form');
|
||||
var $form = $('#authorization_form');
|
||||
$('#trust').attr('value','DenyOnce');
|
||||
$form.submit();
|
||||
event.preventDefault();
|
||||
|
@ -22,10 +22,15 @@ jQuery(document).ready(function($){
|
|||
});
|
||||
|
||||
$("body").on('click',"#approve-authorization",function(event){
|
||||
$form = $('#authorization_form');
|
||||
var $form = $('#authorization_form');
|
||||
$('#trust').attr('value','AllowOnce');
|
||||
$form.submit();
|
||||
event.preventDefault();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#authorization_form').submit(function(){
|
||||
$('.btn-consent-action').attr('disabled', 'disabled');
|
||||
return true;
|
||||
});
|
||||
});
|
|
@ -120,10 +120,12 @@ jQuery(document).ready(function($){
|
|||
application_dialog.on('hidden.bs.modal', function () {
|
||||
application_form.cleanForm();
|
||||
application_validator.resetForm();
|
||||
$('.add-client').removeAttr('disabled');
|
||||
})
|
||||
|
||||
$("body").on('click',".add-client",function(event){
|
||||
application_dialog.modal('show');
|
||||
$('.add-client').attr('disabled','disabled');
|
||||
event.preventDefault();
|
||||
return false;
|
||||
});
|
||||
|
@ -131,6 +133,7 @@ jQuery(document).ready(function($){
|
|||
$("body").on('click',"#save-application",function(event){
|
||||
var is_valid = application_form.valid();
|
||||
if (is_valid){
|
||||
$('#save-application').attr('disabled','disabled');
|
||||
var application = application_form.serializeForm();
|
||||
application.user_id = userId;
|
||||
var link = $(this).attr('href');
|
||||
|
@ -158,9 +161,11 @@ jQuery(document).ready(function($){
|
|||
type: "info",
|
||||
customClass: "auto-width"
|
||||
});
|
||||
$('#save-application').removeAttr('disabled');
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
ajaxError(jqXHR, textStatus, errorThrown);
|
||||
$('#save-application').removeAttr('disabled');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -177,7 +177,7 @@ jQuery(document).ready(function($){
|
|||
form.submit(function(e){
|
||||
var is_valid = $(this).valid();
|
||||
if (is_valid) {
|
||||
|
||||
$('.btn-save-client-data').attr('disabled','disabled');
|
||||
var application_data = $(this).serializeForm();
|
||||
|
||||
$.ajax(
|
||||
|
@ -189,9 +189,11 @@ jQuery(document).ready(function($){
|
|||
dataType: "json",
|
||||
timeout: 60000,
|
||||
success: function (data, textStatus, jqXHR) {
|
||||
$('.btn-save-client-data').removeAttr('disabled');
|
||||
displaySuccessMessage('Data saved successfully.', form);
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
$('.btn-save-client-data').removeAttr('disabled');
|
||||
ajaxError(jqXHR, textStatus, errorThrown);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ jQuery(document).ready(function($){
|
|||
form.submit(function(e){
|
||||
var is_valid = $(this).valid();
|
||||
if (is_valid) {
|
||||
|
||||
$('#save-application-security').attr('disabled','disabled');
|
||||
var application_data = $(this).serializeForm();
|
||||
|
||||
$.ajax(
|
||||
|
@ -71,9 +71,11 @@ jQuery(document).ready(function($){
|
|||
dataType: "json",
|
||||
timeout: 60000,
|
||||
success: function (data, textStatus, jqXHR) {
|
||||
$('#save-application-security').removeAttr('disabled');
|
||||
displaySuccessMessage('Data saved successfully.', form);
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
$('#save-application-security').removeAttr('disabled');
|
||||
ajaxError(jqXHR, textStatus, errorThrown);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
jQuery(document).ready(function($){
|
||||
|
||||
$("body").on('click',"#cancel_authorization",function(event){
|
||||
$form = $('#authorization_form');
|
||||
var $form = $('#authorization_form');
|
||||
$("#deny_once").prop("checked", true)
|
||||
$form.submit();
|
||||
event.preventDefault();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#authorization_form').submit(function(){
|
||||
$('.btn-consent-action').attr('disabled', 'disabled');
|
||||
return true;
|
||||
})
|
||||
});
|
Loading…
Reference in New Issue