When creating a new entry, and validation redirects back to the form, ensure our RDN readonly is preserved
All checks were successful
Create Docker Image / Test Application (x86_64) (push) Successful in 27s
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 1m22s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 4m33s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s
All checks were successful
Create Docker Image / Test Application (x86_64) (push) Successful in 27s
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 1m22s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 4m33s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s
This commit is contained in:
parent
00a8350f1d
commit
baf5acc01a
@ -137,7 +137,7 @@ class HomeController extends Controller
|
|||||||
abort(599,$e->getDetailedError()->getErrorMessage());
|
abort(599,$e->getDetailedError()->getErrorMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
// @todo To test and valide this Exception is caught
|
// @todo when we create an entry, and it already exists, enable a redirect to it
|
||||||
} catch (LdapRecordException $e) {
|
} catch (LdapRecordException $e) {
|
||||||
$request->flash();
|
$request->flash();
|
||||||
|
|
||||||
|
@ -34,8 +34,13 @@
|
|||||||
@section('page-scripts')
|
@section('page-scripts')
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
var rdn_value_set = null;
|
var rdn_value_set = $('input#rdn_value').val();
|
||||||
var rdn_attr = null;
|
rdn_attr = $('select#rdn').val();
|
||||||
|
|
||||||
|
if (rdn_attr) {
|
||||||
|
$('#'+rdn_attr).find('input').attr('readonly',true);
|
||||||
|
set_rdn_value();
|
||||||
|
}
|
||||||
|
|
||||||
function set_rdn_value() {
|
function set_rdn_value() {
|
||||||
if (rdn_attr && rdn_value_set)
|
if (rdn_attr && rdn_value_set)
|
||||||
|
@ -68,6 +68,7 @@
|
|||||||
@section('page-scripts')
|
@section('page-scripts')
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var oc = {!! $oo->getObject('objectclass')->values !!};
|
var oc = {!! $oo->getObject('objectclass')->values !!};
|
||||||
|
var rdn_attr;
|
||||||
|
|
||||||
function editmode() {
|
function editmode() {
|
||||||
// Find all input items and turn off readonly
|
// Find all input items and turn off readonly
|
||||||
@ -76,6 +77,10 @@
|
|||||||
if ($(this)[0].name.match(/^objectclass/))
|
if ($(this)[0].name.match(/^objectclass/))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Dont take of the readonly value for our RDN if it is set
|
||||||
|
if (rdn_attr && ($(this)[0].name === rdn_attr+'[]'))
|
||||||
|
return;
|
||||||
|
|
||||||
$(this).attr('readonly',false);
|
$(this).attr('readonly',false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user