Skip to content

Commit

Permalink
Fixing coding style to match opendcim#1064 opendcim#1063
Browse files Browse the repository at this point in the history
  • Loading branch information
wilpig committed Aug 8, 2018
1 parent f87e03d commit 964a947
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
20 changes: 8 additions & 12 deletions configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -452,18 +452,14 @@ function formatOffset($offset) {
var value_to_set = $(this).parent().next().children('span').text();

// Only for selects, try to assign an existing option, so to avoid to default to an empty value that cannot be saved
if (a.is("select"))
{
a.find('option').each(function ()
{
if ($(this).val().toLowerCase() === value_to_set.toLowerCase())
{
value_to_set = $(this).val();
}
});
}

a.val(value_to_set);
if (a.is("select")){
a.find('option').each(function (){
if ($(this).val().toLowerCase() === value_to_set.toLowerCase()){
value_to_set = $(this).val();
}
});
}
a.val(value_to_set);

if(a.hasClass('color-picker')){
a.minicolors('value', $(this).parent().next().children('span').text()).trigger('change');
Expand Down
3 changes: 1 addition & 2 deletions rackrequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,7 @@
}

// When opening a new request, set the default value for the "Requestor" field's <select> to the logged in person
if (!isset($contact->UserID) && !isset($_POST["action"]))
{
if(!isset($contact->UserID) && !isset($_POST["action"])){
$contact = $person;
}

Expand Down

0 comments on commit 964a947

Please sign in to comment.